Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
|
Class: CIccStructCreator. More...
#include <IccStructFactory.h>
Public Member Functions | |
~CIccStructCreator () | |
Static Public Member Functions | |
static IIccStruct * | CreateStruct (icStructSignature structTypeSig, CIccTagStruct *pTagStruct) |
Function: CreateStruct(structTypeSig) Create a element of type structTypeSig. | |
static icStructSignature | GetStructSig (const icChar *structName) |
Function: GetStructSig(structName) Get signature of structure from display name. | |
static bool | GetStructSigName (std::string &structName, icStructSignature structTypeSig, bool bFillUnknown=true) |
Function: GetStructSigName(structTypeSig) Get display name of structTypeSig. | |
static IIccStructFactory * | PopFactory () |
Function: PopFactory() Remove the top IIccStructFactory from the stack of element factories tracked by the system. | |
static void | PushFactory (IIccStructFactory *pFactory) |
Function: PushFactory(pFactory) Add an IIccStructFactory to the stack of element factories tracked by the system. | |
Private Member Functions | |
CIccStructCreator () | |
Only GetInstance() can create the singleton. | |
IIccStruct * | DoCreateStruct (icStructSignature structTypeSig, CIccTagStruct *pTagStruct=NULL) |
icStructSignature | DoGetStructSig (const char *structName) |
bool | DoGetStructSigName (std::string &structName, icStructSignature structTypeSig, bool bFillUnknown=true) |
IIccStructFactory * | DoPopFactory (bool bAll=false) |
void | DoPushFactory (IIccStructFactory *pFactory) |
Static Private Member Functions | |
static CIccStructCreator * | GetInstance () |
Function: GetInstance() Private static function to access singleton CiccStructCreator Object. | |
Private Attributes | |
CIccStructFactoryList | factoryStack |
Static Private Attributes | |
static CIccStructCreatorPtr | theStructCreator |
Class: CIccStructCreator.
Purpose: CIccStructCreator uses a singleton pattern to provide dynamically upgradeable IIccStructObject derived object creation based on element signature.
Definition at line 219 of file IccStructFactory.h.
CIccStructCreator::~CIccStructCreator | ( | ) |
Definition at line 165 of file IccStructFactory.cpp.
|
inlineprivate |
Only GetInstance() can create the singleton.
Definition at line 306 of file IccStructFactory.h.
|
inlinestatic |
Function: CreateStruct(structTypeSig) Create a element of type structTypeSig.
Parameter(s): structTypeSig = signature of the ICC element type for the element to be created
Returns a new CIccProcessStruct object of the given signature type. Each factory in the factoryStack is used until a factory supports the signature type.
Definition at line 236 of file IccStructFactory.h.
References DoCreateStruct(), and GetInstance().
Referenced by CIccTagStruct::Describe(), CIccTagStruct::GetStructHandler(), and CIccTagStruct::SetTagStructType().
|
private |
Definition at line 186 of file IccStructFactory.cpp.
Referenced by CreateStruct().
|
private |
Definition at line 211 of file IccStructFactory.cpp.
Referenced by GetStructSig().
|
private |
Definition at line 199 of file IccStructFactory.cpp.
Referenced by GetStructSigName().
|
private |
Definition at line 229 of file IccStructFactory.cpp.
Referenced by PopFactory().
|
private |
Definition at line 224 of file IccStructFactory.cpp.
|
staticprivate |
Function: GetInstance() Private static function to access singleton CiccStructCreator Object.
Parameter(s): None
Returns the singleton CIccStructCreator object. It will allocate a new one and push a single CIccSpecStruct Factory object onto the factory stack if the singleton has not been intialized.
Definition at line 175 of file IccStructFactory.cpp.
Referenced by CreateStruct(), GetStructSig(), GetStructSigName(), PopFactory(), and PushFactory().
|
inlinestatic |
Function: GetStructSig(structName) Get signature of structure from display name.
Parameter(s): structName = struct display name
Returns signature of structure if it is recognized by any factory, 0 if the all the factories don't create a structure with such a display name.
Definition at line 266 of file IccStructFactory.h.
References DoGetStructSig(), and GetInstance().
Referenced by CIccTagXmlStruct::ParseXml().
|
inlinestatic |
Function: GetStructSigName(structTypeSig) Get display name of structTypeSig.
Parameter(s): structName = string to put struct name into structTypeSig = signature of the ICC struct type to get a name for bFillUnknown = flag to indicate structName is filled if not found
Returns true if struct type is recognized by any factory, false if all factories do not create structTypeSig structs. If struct type is not recognized by any factories a suitable display name will be placed in structName if bFillUknown is true.
Definition at line 253 of file IccStructFactory.h.
References DoGetStructSigName(), and GetInstance().
Referenced by CIccTagStruct::Describe(), and CIccInfo::GetStructSigName().
|
inlinestatic |
Function: PopFactory() Remove the top IIccStructFactory from the stack of element factories tracked by the system.
Parameter(s): None
Returns the top IIccStructFactory from the stack of element factories tracked by the system. The returned element factory is no longer owned by the system and needs to be deleted to avoid memory leaks.
Note: The initial CIccBasicElemFactory cannot be popped off the stack.
Definition at line 301 of file IccStructFactory.h.
References DoPopFactory(), and GetInstance().
|
inlinestatic |
Function: PushFactory(pFactory) Add an IIccStructFactory to the stack of element factories tracked by the system.
Parameter(s): pFactory = pointer to an IIccStructFactory object to add to the system. The pFactory must be created with new, and will be owned CIccStructCreator until popped off the stack using PopFactory(). Any factories not popped off will be taken care of properly on application shutdown.
Definition at line 284 of file IccStructFactory.h.
References GetInstance().
|
private |
Definition at line 329 of file IccStructFactory.h.
|
staticprivate |
Definition at line 327 of file IccStructFactory.h.