Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
|
Class: CIccTagCreator. More...
#include <IccTagFactory.h>
Public Member Functions | |
~CIccTagCreator () | |
Static Public Member Functions | |
static CIccTag * | CreateTag (icTagTypeSignature tagTypeSig) |
Function: CreateTag(tagTypeSig) Create a tag of type tagTypeSig. | |
static icTagSignature | GetTagNameSig (const icChar *szName) |
Function: GetTagNameSig(szTagName) Get signature from tag display name. | |
static const icChar * | GetTagSigName (icTagSignature tagTypeSig) |
Function: GetTagSigName(tagSig) Get display name of tagSig. | |
static icTagTypeSignature | GetTagTypeNameSig (const icChar *szName) |
Function: GetTagTypeNameSig(szTypeName) Get signature based on display name of tag type. | |
static const icChar * | GetTagTypeSigName (icTagTypeSignature tagTypeSig) |
Function: GetTagTypeSigName(tagTypeSig) Get display name of tagTypeSig. | |
static IIccTagFactory * | PopFactory () |
Function: PopFactory() Remove the top IIccTagFactory from the stack of tag factories tracked by the system. | |
static void | PushFactory (IIccTagFactory *pFactory) |
Function: PushFactory(pFactory) Add an IIccTagFactory to the stack of tag factories tracked by the system. | |
Private Member Functions | |
CIccTagCreator () | |
Only GetInstance() can create the signleton. | |
CIccTag * | DoCreateTag (icTagTypeSignature tagTypeSig) |
icTagSignature | DoGetTagNameSig (const icChar *szName) |
const icChar * | DoGetTagSigName (icTagSignature tagSig) |
icTagTypeSignature | DoGetTagTypeNameSig (const icChar *szName) |
const icChar * | DoGetTagTypeSigName (icTagTypeSignature tagTypeSig) |
IIccTagFactory * | DoPopFactory (bool bAll=false) |
void | DoPushFactory (IIccTagFactory *pFactory) |
Static Private Member Functions | |
static CIccTagCreator * | GetInstance () |
Function: GetInstance() Private static function to access singleton CiccTagCreator Object. | |
Private Attributes | |
CIccTagFactoryList | factoryStack |
Static Private Attributes | |
static CIccTagCreatorPtr | theTagCreator |
Class: CIccTagCreator.
Purpose: CIccTagCreator uses a singleton pattern to provide dynamically upgradeable CIccTag derived object creation based on tag signature.
Definition at line 263 of file IccTagFactory.h.
CIccTagCreator::~CIccTagCreator | ( | ) |
Definition at line 529 of file IccTagFactory.cpp.
|
inlineprivate |
|
inlinestatic |
Function: CreateTag(tagTypeSig) Create a tag of type tagTypeSig.
Parameter(s): tagTypeSig = signature of the ICC tag type for the tag to be created
Returns a new CIccTag object of the given signature type. Each factory in the factoryStack is used until a factory supports the signature type.
Definition at line 279 of file IccTagFactory.h.
References DoCreateTag(), and GetInstance().
Referenced by CIccTag::Create(), and CIccTagArray::Read().
|
private |
Definition at line 550 of file IccTagFactory.cpp.
Referenced by CreateTag().
|
private |
Definition at line 577 of file IccTagFactory.cpp.
References icSigUnknownTag, and szName.
Referenced by GetTagNameSig().
|
private |
Definition at line 563 of file IccTagFactory.cpp.
Referenced by GetTagSigName().
|
private |
Definition at line 606 of file IccTagFactory.cpp.
References icSigUnknownType, and szName.
Referenced by GetTagTypeNameSig().
|
private |
Definition at line 592 of file IccTagFactory.cpp.
Referenced by GetTagTypeSigName().
|
private |
Definition at line 625 of file IccTagFactory.cpp.
Referenced by PopFactory().
|
private |
Definition at line 620 of file IccTagFactory.cpp.
|
staticprivate |
Function: GetInstance() Private static function to access singleton CiccTagCreator Object.
Parameter(s): None
Returns the singleton CIccTagCreator object. It will allocate a new one and push a single CIccSpecTag Factory object onto the factory stack if the singleton has not been intialized.
Definition at line 539 of file IccTagFactory.cpp.
Referenced by CreateTag(), GetTagNameSig(), GetTagSigName(), GetTagTypeNameSig(), GetTagTypeSigName(), PopFactory(), and PushFactory().
|
inlinestatic |
Function: GetTagNameSig(szTagName) Get signature from tag display name.
Parameter(s): szTagName = name of tag
Returns tag signature of tag if tag name is recognized by the factory, icSigUnknownTag if the tag name is not recognized.
Definition at line 306 of file IccTagFactory.h.
References DoGetTagNameSig(), GetInstance(), and szName.
Referenced by icGetTagNameSig().
|
inlinestatic |
Function: GetTagSigName(tagSig) Get display name of tagSig.
Parameter(s): tagSig = signature of the ICC tag to get a name for
Returns ptr to string containing name of tag type if it is recognized by any factory, NULL if all factories do not create tagTypeSig tags.
Definition at line 292 of file IccTagFactory.h.
References DoGetTagSigName(), and GetInstance().
Referenced by CIccInfo::GetTagSigName(), and icGetTagSigName().
|
inlinestatic |
Function: GetTagTypeNameSig(szTypeName) Get signature based on display name of tag type.
Parameter(s): szTypeName = name of the ICC tag type to get a signature for
Returns tag type signature of tag type name if type name is recognized by the factory, icSigUnknownType if the type name is not recognized.
Definition at line 335 of file IccTagFactory.h.
References DoGetTagTypeNameSig(), GetInstance(), and szName.
Referenced by icGetTypeNameTagSig().
|
inlinestatic |
Function: GetTagTypeSigName(tagTypeSig) Get display name of tagTypeSig.
Parameter(s): tagTypeSig = signature of the ICC tag type to get a name for
Returns ptr to string containing name of tag type if it is recognized by any factory, NULL if all factories do not create tagTypeSig tags.
Definition at line 322 of file IccTagFactory.h.
References DoGetTagTypeSigName(), and GetInstance().
Referenced by CIccTagZipUtf8Text::Describe(), CIccInfo::GetTagTypeSigName(), icGetTagSigTypeName(), and CIccTagZipUtf8Text::Validate().
|
inlinestatic |
Function: PopFactory() Remove the top IIccTagFactory from the stack of tag factories tracked by the system.
Parameter(s): None
Returns the top IIccTagFactory from the stack of tag factories tracked by the system. The returned tag factory is no longer owned by the system and needs to be deleted to avoid memory leaks.
Note: The initial CIccSpecTagFactory cannot be popped off the stack.
Definition at line 367 of file IccTagFactory.h.
References DoPopFactory(), and GetInstance().
|
inlinestatic |
Function: PushFactory(pFactory) Add an IIccTagFactory to the stack of tag factories tracked by the system.
Parameter(s): pFactory = pointer to an IIccTagFactory object to add to the system. The pFactory must be created with new, and will be owned CIccTagCreator until popped off the stack using PopFactory(). Any factories not popped off will be taken care of properly on application shutdown.
Definition at line 351 of file IccTagFactory.h.
References GetInstance().
Referenced by main().
|
private |
Definition at line 397 of file IccTagFactory.h.
|
staticprivate |
Definition at line 395 of file IccTagFactory.h.