IccMAX 2.1.27
Color Profile Tools
|
#include <IccStructFactory.h>
Public Member Functions | |
~CIccStructCreator () | |
Static Public Member Functions | |
static IIccStruct * | CreateStruct (icStructSignature structTypeSig, CIccTagStruct *pTagStruct) |
static icStructSignature | GetStructSig (const icChar *structName) |
static bool | GetStructSigName (std::string &structName, icStructSignature structTypeSig, bool bFillUnknown=true) |
static IIccStructFactory * | PopFactory () |
static void | PushFactory (IIccStructFactory *pFactory) |
Private Member Functions | |
CIccStructCreator () | |
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 () |
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.
CIccStructCreator::~CIccStructCreator | ( | ) |
References DoPopFactory().
|
inlineprivate |
Only GetInstance() can create the singleton
|
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.
References DoCreateStruct(), and GetInstance().
Referenced by CIccTagStruct::Describe(), CIccTagStruct::GetStructHandler(), and CIccTagStruct::SetTagStructType().
|
private |
References IIccStructFactory::CreateStruct(), and factoryStack.
Referenced by CreateStruct().
|
private |
References factoryStack, and IIccStructFactory::GetStructSig().
Referenced by GetStructSig().
|
private |
References factoryStack, and IIccStructFactory::GetStructSigName().
Referenced by GetStructSigName().
|
private |
References factoryStack.
Referenced by ~CIccStructCreator(), and PopFactory().
|
private |
References factoryStack.
Referenced by GetInstance(), and PushFactory().
|
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.
References DoPushFactory(), and theStructCreator.
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.
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.
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.
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.
References DoPushFactory(), and GetInstance().
|
private |
Referenced by DoCreateStruct(), DoGetStructSig(), DoGetStructSigName(), DoPopFactory(), and DoPushFactory().
|
staticprivate |
Referenced by GetInstance().