WizOps Class Reference

This collection of WizOps is used by the Wizard Properties dialog. More...

#include <tmpltarg.h>

Inheritance diagram for WizOps:

List CCObject SimpleCCObject List of all members.

Public Member Functions

 ~WizOps ()
 We need an overridden destructor to delete the WizOp's we stuck on the heap.
BOOL InitializeFromRegistry ()
 Goes whizzing through the registry to find all the WizOp's in it. Then builds this WizOps collection using those entries.
WizOpGetFirstWizOp () const
 Cheapskate duplicate code container enumeration.
WizOpGetNextWizOp (const WizOp *const pWizOp) const
 Cheapskate duplicate code container enumeration.
WizOpFindWizOpFromInternalName (const StringBase &InternalName) const
 Allows access to the WizOp's vital statistics.

Protected Member Functions

BOOL AddWizOp (const StringBase &InternalName, const StringBase &UserName, const StringBase &ParamHint)
 Adds a WizOp with the given gubbins to this set.
BOOL GetInternalNameFromCLSID (const CLSID &WizOpCLSID, StringBase *const pString) const
BOOL GetUserNameFromCLSID (const CLSID &WizOpCLSID, StringBase *const pString) const
BOOL GetParamHintFromCLSID (const CLSID &WizOpCLSID, StringBase *const pString) const

Private Member Functions

 CC_DECLARE_MEMDUMP (WizOps)

Detailed Description

This collection of WizOps is used by the Wizard Properties dialog.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com> G.Barfoot
Date:
11/06/97

Definition at line 151 of file tmpltarg.h.


Constructor & Destructor Documentation

WizOps::~WizOps  ) 
 

We need an overridden destructor to delete the WizOp's we stuck on the heap.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97

Definition at line 314 of file tmpltarg.cpp.

00315 {
00316 //  TRACE( _T("Deleting those WizOps now\n"));
00317     DeleteAll();
00318 }


Member Function Documentation

BOOL WizOps::AddWizOp const StringBase InternalName,
const StringBase UserName,
const StringBase ParamHint
[protected]
 

Adds a WizOp with the given gubbins to this set.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Returns:
TRUE if if worked FALSE if it didn't

Definition at line 398 of file tmpltarg.cpp.

00400 {
00401     BOOL Success = TRUE;
00402 
00403     WizOp* const pNewWizOp = new WizOp(InternalName, UserName, ParamHint);
00404 
00405     if (pNewWizOp != NULL)
00406     {
00407         AddTail(pNewWizOp);
00408     }
00409     else
00410     {
00411         Success = FALSE;
00412     }
00413 
00414     return Success;
00415 }

WizOps::CC_DECLARE_MEMDUMP WizOps   )  [private]
 

WizOp * WizOps::FindWizOpFromInternalName const StringBase InternalName  )  const
 

Allows access to the WizOp's vital statistics.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Parameters:
InternalName : The InternalName of the desired WizOp [INPUTS]
Returns:
NULL if none found The WizOp with the InternalName (CLSID), given in the constructor, InternalName.

Definition at line 471 of file tmpltarg.cpp.

00472 {
00473     WizOp* pWizOp = GetFirstWizOp();
00474 
00475     BOOL Found = FALSE;
00476     while (pWizOp != NULL && !Found)
00477     {
00478         if (pWizOp->GetInternalName() == InternalName)
00479         {
00480             Found = TRUE;
00481         }
00482 
00483         if (!Found)
00484         {
00485             pWizOp = GetNextWizOp(pWizOp);
00486         }
00487     }
00488 
00489     return pWizOp;
00490 }

WizOp * WizOps::GetFirstWizOp  )  const
 

Cheapskate duplicate code container enumeration.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Returns:
The first WizOp in the set

Definition at line 431 of file tmpltarg.cpp.

00432 {
00433     return (WizOp*)GetHead();
00434 }

BOOL WizOps::GetInternalNameFromCLSID const CLSID WizOpCLSID,
StringBase *const   pString
const [protected]
 

WizOp * WizOps::GetNextWizOp const WizOp *const   pWizOp  )  const
 

Cheapskate duplicate code container enumeration.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97
Parameters:
pWizOp,: Don't know why it's a pointer. [INPUTS]
Returns:
The WizOp after the given one in the set

Definition at line 450 of file tmpltarg.cpp.

00451 {
00452     return (WizOp*)GetNext(pWizOp);
00453 }

BOOL WizOps::GetParamHintFromCLSID const CLSID WizOpCLSID,
StringBase *const   pString
const [protected]
 

BOOL WizOps::GetUserNameFromCLSID const CLSID WizOpCLSID,
StringBase *const   pString
const [protected]
 

BOOL WizOps::InitializeFromRegistry  ) 
 

Goes whizzing through the registry to find all the WizOp's in it. Then builds this WizOps collection using those entries.

Author:
Colin_Barfoot (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/06/97

Definition at line 333 of file tmpltarg.cpp.

00334 {
00335 
00336     PORTNOTETRACE("other"," WizOps::InitializeFromRegistry - do nothing");
00337 #ifndef EXCLUDE_FROM_XARALX
00338     BOOL Ok = TRUE;
00339     WizOpProbe Probe;
00340     GetLocalRegistry()->InitializeProbe(Probe);
00341     
00342     while (!Probe.IsLast() && Ok)
00343     {
00344         WizOpRegistryEntry Entry;
00345         // The internal name is given by the registry entry
00346         Ok = Probe.GetNextEntry(&Entry);
00347         
00348         String_64 InternalName;
00349         if (Ok)
00350         {   
00351             Ok = Entry.GetInternalName(&InternalName);
00352         }
00353 
00354         String_64 UserName;
00355         if (Ok)
00356         {   
00357             Entry.GetUserName(&UserName);
00358             if (UserName.IsEmpty())
00359             {
00360                 UserName = InternalName;
00361             }
00362         }
00363 
00364         String_256 ParamHint;
00365         if (Ok)
00366         {   
00367             Entry.GetParamHint(&ParamHint);
00368         }
00369 
00370         if (Ok)
00371         {   
00372             Ok = AddWizOp(InternalName, UserName, ParamHint);
00373         }
00374     }
00375 
00376     if (!Ok)
00377     {
00378         TRACE( _T("Not all WizOps were created properly\n"));
00379     }
00380 #endif
00381     return TRUE;    // we'll pretend it worked 'cos otherwise camelot won't start
00382 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:03:10 2007 for Camelot by  doxygen 1.4.4