Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
|
Class: CIccArrayCreator. More...
#include <IccArrayFactory.h>
Public Member Functions | |
~CIccArrayCreator () | |
Static Public Member Functions | |
static IIccArray * | CreateArray (icArraySignature arrayTypeSig, CIccTagArray *pTagArray=NULL) |
Function: CreateArray(structTypeSig) Create a element of type structTypeSig. | |
static icArraySignature | GetArraySig (const icChar *arrayName) |
Function: GetArraySig(arrayName) Get signature associate with display name arrayName handler. | |
static bool | GetArraySigName (std::string &arrayName, icArraySignature arrayTypeSig, bool bFillUnknown=true) |
Function: GetArraySigName(structTypeSig) Get display name of structTypeSig. | |
static IIccArrayFactory * | PopFactory () |
Function: PopFactory() Remove the top IIccArrayFactory from the stack of element factories tracked by the system. | |
static void | PushFactory (IIccArrayFactory *pFactory) |
Function: PushFactory(pFactory) Add an IIccArrayFactory to the stack of element factories tracked by the system. | |
Private Member Functions | |
CIccArrayCreator () | |
Only GetInstance() can create the singleton. | |
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 () |
Function: GetInstance() Private static function to access singleton CiccArrayCreator Object. | |
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.
Definition at line 220 of file IccArrayFactory.h.
CIccArrayCreator::~CIccArrayCreator | ( | ) |
Definition at line 145 of file IccArrayFactory.cpp.
|
inlineprivate |
Only GetInstance() can create the singleton.
Definition at line 306 of file IccArrayFactory.h.
|
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.
Definition at line 237 of file IccArrayFactory.h.
References DoCreateArray(), and GetInstance().
Referenced by CIccTagArray::GetArrayHandler(), and CIccTagArray::SetTagArrayType().
|
private |
Definition at line 166 of file IccArrayFactory.cpp.
Referenced by CreateArray().
|
private |
Definition at line 191 of file IccArrayFactory.cpp.
Referenced by GetArraySig().
|
private |
Definition at line 179 of file IccArrayFactory.cpp.
Referenced by GetArraySigName().
|
private |
Definition at line 210 of file IccArrayFactory.cpp.
Referenced by PopFactory().
|
private |
Definition at line 205 of file IccArrayFactory.cpp.
|
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.
Definition at line 268 of file IccArrayFactory.h.
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).
Definition at line 254 of file IccArrayFactory.h.
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.
Definition at line 155 of file IccArrayFactory.cpp.
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.
Definition at line 301 of file IccArrayFactory.h.
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.
Definition at line 284 of file IccArrayFactory.h.
References GetInstance().
|
private |
Definition at line 329 of file IccArrayFactory.h.
|
staticprivate |
Definition at line 327 of file IccArrayFactory.h.