Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccBasicStructFactory Class Reference

Class: CIccBasicStructFactory. More...

#include <IccStructFactory.h>

+ Inheritance diagram for CIccBasicStructFactory:
+ Collaboration diagram for CIccBasicStructFactory:

Public Member Functions

virtual IIccStructCreateStruct (icStructSignature structSig, CIccTagStruct *pTagStruct=NULL)
 Function: CreateStruct(structTypeSig) Create a struct object of type structTypeSig.
 
virtual icStructSignature GetStructSig (const icChar *structName)
 Function: GetStructSig(structName) Get signature of structure from display name.
 
virtual bool GetStructSigName (std::string &structName, icStructSignature structTypeSig, bool bFindUnknown=false)
 Function: GetStructSigName(structTypeSig) Get display name of structTypeSig.
 
- Public Member Functions inherited from IIccStructFactory
virtual ~IIccStructFactory ()
 

Detailed Description

Class: CIccBasicStructFactory.

Purpose: CIccBasicStructFactory provides creation of CIccProcessStruct's defined by the ICC profile specification. The CIccStructCreator always creates a CIccBasicElemFactory.

Definition at line 164 of file IccStructFactory.h.

Member Function Documentation

◆ CreateStruct()

IIccStruct * CIccBasicStructFactory::CreateStruct ( icStructSignature structSig,
CIccTagStruct * pTagStruct = NULL )
virtual

Function: CreateStruct(structTypeSig) Create a struct object of type structTypeSig.

Parameter(s): structTypeSig = signature of the ICC struct type for the struct to be created

Returns a new CIccProcessStruct object of the given signature type. Unrecognized structTypeSig's will be created as a CIccStructUnknown object.

Implements IIccStructFactory.

Definition at line 83 of file IccStructFactory.cpp.

84{
85 switch(structTypeSig) {
86 case icSigBRDFStruct:
87 return new CIccStructBRDF(pTagStruct);
88
90 return new CIccStructColorantInfo(pTagStruct);
91
93 return new CIccStructColorEncodingParams(pTagStruct);
94
96 return new CIccStructMeasurementInfo(pTagStruct);
97
99 return new CIccStructNamedColor(pTagStruct);
100
102 return new CIccStructProfileInfo(pTagStruct);
103
105 return new CIccStructTintZero(pTagStruct);
106
107 default:
108 return new CIccStructUnknown(pTagStruct);
109 }
110}
Class: CIccStructBRDF.
Class: CIccStructColorEncodingParams.
Class: CIccStructColorantInfo.
Class: CIccStructMeasurementInfo.
Class: CIccStructNamedColor.
Class: CIccStructProfileInfo.
Class: CIccStructTintZero.
Class: CIccStructUnknown.
@ icSigMeasurementInfoStruct
@ icSigColorantInfoStruct
@ icSigTintZeroStruct
@ icSigNamedColorStruct
@ icSigBRDFStruct
@ icSigProfileInfoStruct
@ icSigColorEncodingParamsSruct

References icSigBRDFStruct, icSigColorantInfoStruct, icSigColorEncodingParamsSruct, icSigMeasurementInfoStruct, icSigNamedColorStruct, icSigProfileInfoStruct, and icSigTintZeroStruct.

◆ GetStructSig()

icStructSignature CIccBasicStructFactory::GetStructSig ( const icChar * structName)
virtual

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 the factory, 0 if the factory doesn't create structures with such a display name.

Implements IIccStructFactory.

Definition at line 151 of file IccStructFactory.cpp.

152{
153 int i;
154 for (i = 0; g_icStructNames[i].sig; i++) {
155 if (!strcmp(g_icStructNames[i].szStructName, szStructName)) {
156 return g_icStructNames[i].sig;
157 }
158 }
159 return (icStructSignature)0;
160}
const icChar * szStructName
static struct @3 g_icStructNames[]
icStructSignature
Tag Structure type signatures.

References g_icStructNames, and szStructName.

◆ GetStructSigName()

bool CIccBasicStructFactory::GetStructSigName ( std::string & structName,
icStructSignature structTypeSig,
bool bFindUnknown = false )
virtual

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

Returns true if struct type is recognized by the factory, false if the factory doesn't create structTypeSig structs.

Implements IIccStructFactory.

Definition at line 128 of file IccStructFactory.cpp.

129{
130 int i;
131 for (i = 0; g_icStructNames[i].sig; i++) {
132 if (g_icStructNames[i].sig == structTypeSig) {
133 structName = g_icStructNames[i].szStructName;
134 return true;
135 }
136 }
137
138 if (!bFindUnknown) {
139 char sig[20];
140 structName = "UnknownStruct_";
141 icGetSigStr(sig, structTypeSig);
142 structName += sig;
143 }
144 else {
145 structName = "";
146 }
147
148 return false;
149}
icArraySignature sig
const icChar * icGetSigStr(icChar *pBuf, icUInt32Number nSig)
Definition IccUtil.cpp:1056

References g_icStructNames, icGetSigStr(), and sig.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: