IccMAX 2.1.27
Color Profile Tools
|
#include <IccArrayFactory.h>
Public Member Functions | |
~CIccArrayCreator () | |
Static Public Member Functions | |
static IIccArray * | CreateArray (icArraySignature arrayTypeSig, CIccTagArray *pTagArray=NULL) |
static icArraySignature | GetArraySig (const icChar *arrayName) |
static bool | GetArraySigName (std::string &arrayName, icArraySignature arrayTypeSig, bool bFillUnknown=true) |
static IIccArrayFactory * | PopFactory () |
static void | PushFactory (IIccArrayFactory *pFactory) |
Private Member Functions | |
CIccArrayCreator () | |
IIccArray * | DoCreateArray (icArraySignature arrayTypeSig, CIccTagArray *pArray) |
icArraySignature | DoGetArraySig (const icChar *arrayName) |
bool | DoGetArraySigName (std::string &arrayName, icArraySignature arrayTypeSig, bool bFillUnknown=true) |
IIccArrayFactory * | DoPopFactory (bool bAll=false) |
void | DoPushFactory (IIccArrayFactory *pFactory) |
Static Private Member Functions | |
static CIccArrayCreator * | GetInstance () |
Private Attributes | |
CIccArrayFactoryList | factoryStack |
Static Private Attributes | |
static CIccArrayCreatorPtr | theArrayCreator |
Class: CIccArrayCreator
Purpose: CIccArrayCreator uses a singleton pattern to provide dynamically upgradeable IIccArrayObject derived object creation based on element signature.
CIccArrayCreator::~CIccArrayCreator | ( | ) |
References DoPopFactory().
|
inlineprivate |
Only GetInstance() can create the singleton
|
inlinestatic |
Function: CreateArray(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 CIccProcessArray object of the given signature type. Each factory in the factoryStack is used until a factory supports the signature type.
References DoCreateArray(), and GetInstance().
Referenced by CIccTagArray::GetArrayHandler(), and CIccTagArray::SetTagArrayType().
|
private |
References IIccArrayFactory::CreateArray(), and factoryStack.
Referenced by CreateArray().
|
private |
References factoryStack, and IIccArrayFactory::GetArraySig().
Referenced by GetArraySig().
|
private |
References factoryStack, and IIccArrayFactory::GetArraySigName().
Referenced by GetArraySigName().
|
private |
References factoryStack.
Referenced by ~CIccArrayCreator(), and PopFactory().
|
private |
References factoryStack.
Referenced by GetInstance(), and PushFactory().
|
inlinestatic |
Function: GetArraySig(arrayName) Get signature associate with display name arrayName handler
Parameter(s): arrayName = string to find signature for
Returns array signuture if arrayName arrays are recognized by any factory, 0 if all factories do not create arrayName arrays.
References DoGetArraySig(), and GetInstance().
Referenced by CIccTagXmlArray::ParseXml().
|
inlinestatic |
Function: GetArraySigName(structTypeSig) Get display name of structTypeSig.
Parameter(s): arrayName = string to put struct name into arrayTypeSig = signature of the ICC struct type to get a name for bFillUnknown = flag to fill in arrayName if arryTypeSig is unknown
Returns true if struct type is recognized by any factory, false if all factories do not create arrayTypeSig arrays. If arrayTypeSig is not recognized by any factories a suitable display name will be placed in arrayName if bFindUnkown is true (otherwise arrayName will be empty).
References DoGetArraySigName(), and GetInstance().
Referenced by CIccTagArray::Describe(), CIccInfo::GetArraySigName(), and CIccTagXmlArray::ToXml().
|
staticprivate |
Function: GetInstance() Private static function to access singleton CiccArrayCreator Object.
Parameter(s): None
Returns the singleton CIccArrayCreator object. It will allocate a new one and push a single CIccSpecArray Factory object onto the factory stack if the singleton has not been initialized.
References DoPushFactory(), and theArrayCreator.
Referenced by CreateArray(), GetArraySig(), GetArraySigName(), PopFactory(), and PushFactory().
|
inlinestatic |
Function: PopFactory() Remove the top IIccArrayFactory from the stack of element factories tracked by the system.
Parameter(s): None
Returns the top IIccArrayFactory 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 IIccArrayFactory to the stack of element factories tracked by the system.
Parameter(s): pFactory = pointer to an IIccArrayFactory object to add to the system. The pFactory must be created with new, and will be owned CIccArrayCreator 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 DoCreateArray(), DoGetArraySig(), DoGetArraySigName(), DoPopFactory(), and DoPushFactory().
|
staticprivate |
Referenced by GetInstance().