IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccMpeXmlUnknown Class Reference

#include <IccMpeXml.h>

+ Inheritance diagram for CIccMpeXmlUnknown:
+ Collaboration diagram for CIccMpeXmlUnknown:

Public Member Functions

virtual ~CIccMpeXmlUnknown ()
 
virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
 
virtual bool Begin (icElemInterp nIterp=icElemInterpLinear, CIccTagMultiProcessElement *pMPE=NULL)
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual icAcsSignature GetBAcsSig ()
 
virtual const char * GetClassName () const
 
icUInt8NumberGetData ()
 
virtual icAcsSignature GetEAcsSig ()
 
virtual const char * GetExtClassName ()
 
virtual IIccExtensionMpeGetExtension ()
 
virtual CIccApplyMpeGetNewApply ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 
virtual icElemTypeSignature GetType () const
 
virtual bool IsAcs ()
 
virtual bool IsLateBinding () const
 
virtual bool IsLateBindingReflectance () const
 
virtual bool IsSupported ()
 
virtual CIccMultiProcessElementNewCopy () const
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool Read (icUInt32Number nSize, CIccIO *pIO)
 
void SetChannels (icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
 
bool SetDataSize (icUInt32Number nSize, bool bZeroData=true)
 
void SetType (icElemTypeSignature sig)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccMultiProcessElementCreate (icElemTypeSignature sig)
 

Protected Attributes

icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 
icUInt32Number m_nReserved
 
icUInt32Number m_nSize
 
icUInt8Numberm_pData
 
icElemTypeSignature m_sig
 

Detailed Description

Constructor & Destructor Documentation

◆ ~CIccMpeXmlUnknown()

virtual CIccMpeXmlUnknown::~CIccMpeXmlUnknown ( )
inlinevirtual
90{}

Member Function Documentation

◆ Apply()

virtual void CIccMpeUnknown::Apply ( CIccApplyMpe pApply,
icFloatNumber pDestPixel,
const icFloatNumber pSrcPixel 
) const
inlinevirtualinherited

Implements CIccMultiProcessElement.

256{}

◆ Begin()

virtual bool CIccMpeUnknown::Begin ( icElemInterp  nIterp = icElemInterpLinear,
CIccTagMultiProcessElement pMPE = NULL 
)
inlinevirtualinherited

Implements CIccMultiProcessElement.

254{ return false; }

◆ Create()

CIccMultiProcessElement * CIccMultiProcessElement::Create ( icElemTypeSignature  sig)
staticinherited

Name: CIccMultiProcessElement::Create

Purpose:

Args:

Return:

132{
134}
static CIccMultiProcessElement * CreateElement(icElemTypeSignature elemTypeSig)
Definition IccMpeFactory.h:213

References CIccMpeCreator::CreateElement().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccSampledCalculatorCurve::Read(), CIccMpeCalculator::Read(), and CIccTagMultiProcessElement::Read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Describe()

void CIccMpeUnknown::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccMpeUnknown::Describe

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

287{
288 icChar buf[128], sigbuf[40];
289
290 sprintf(buf, "Unknown Element(%s) Type of %u Bytes.",
291 icGetSig(sigbuf, m_sig), m_nSize);
292 sDescription += buf;
293
294 if (nVerboseness > 50) {
295 sDescription += "\n\nData Follows:\n";
296
297 icMemDump(sDescription, m_pData, m_nSize);
298 }
299}
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API const icChar * icGetSig(icChar *pBuf, icUInt32Number sig, bool bGetHexVal=true)
Definition IccUtil.cpp:1028
ICCPROFLIB_API void icMemDump(std::string &sDump, void *pBuf, icUInt32Number nNum)
Definition IccUtil.cpp:951
icElemTypeSignature m_sig
Definition IccTagMPE.h:261
icUInt32Number m_nSize
Definition IccTagMPE.h:265
icUInt8Number * m_pData
Definition IccTagMPE.h:266

References icGetSig(), icMemDump(), CIccMpeUnknown::m_nSize, CIccMpeUnknown::m_pData, and CIccMpeUnknown::m_sig.

+ Here is the call graph for this function:

◆ GetBAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetBAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeBAcs.

178{ return icSigAcsZero; }
#define icSigAcsZero
Definition icProfileHeader.h:1100

Referenced by CIccMpeAcs::Describe().

+ Here is the caller graph for this function:

◆ GetClassName()

virtual const char * CIccMpeXmlUnknown::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccMpeUnknown.

92{ return "CIccTagXmlUnknown"; }

◆ GetData()

icUInt8Number * CIccMpeUnknown::GetData ( )
inlineinherited
249{ return m_pData; }

References CIccMpeUnknown::m_pData.

◆ GetEAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetEAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeEAcs.

179{ return icSigAcsZero; }

◆ GetExtClassName()

virtual const char * CIccMpeXml::GetExtClassName ( )
inlinevirtualinherited

Implements IIccExtensionMpe.

84{ return "CIccMpeXml"; }

◆ GetExtension()

virtual IIccExtensionMpe * CIccMpeXmlUnknown::GetExtension ( )
inlinevirtual

Reimplemented from CIccMultiProcessElement.

94{ return this; }

◆ GetNewApply() [1/2]

virtual CIccApplyMpe * CIccMpeUnknown::GetNewApply ( )
inlinevirtualinherited
255{ return NULL; }

◆ GetNewApply() [2/2]

CIccApplyMpe * CIccMultiProcessElement::GetNewApply ( CIccApplyTagMpe pApplyTag)
virtualinherited

Name: CIccMultiProcessElement::GetNewApply()

Purpose:

Args:

Return:

Reimplemented in CIccMpeCLUT, CIccMpeCalculator, and CIccMpeSpectralCLUT.

147{
148 return new CIccApplyMpe(this);
149}
Definition IccTagMPE.h:203

References CIccApplyMpe::CIccApplyMpe().

Referenced by CIccApplyTagMpe::AppendElem(), and CIccMpeCalculator::GetNewApply().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetType()

virtual icElemTypeSignature CIccMpeUnknown::GetType ( ) const
inlinevirtualinherited

Implements CIccMultiProcessElement.

238{ return m_sig; }

References CIccMpeUnknown::m_sig.

Referenced by ToXml().

+ Here is the caller graph for this function:

◆ IsAcs()

virtual bool CIccMultiProcessElement::IsAcs ( )
inlinevirtualinherited

Reimplemented in CIccMpeAcs.

177{ return false; }

Referenced by CIccTagMultiProcessElement::Apply().

+ Here is the caller graph for this function:

◆ IsLateBinding()

virtual bool CIccMultiProcessElement::IsLateBinding ( ) const
inlinevirtualinherited

Reimplemented in CIccMpeCalculator, CIccMpeSpectralMatrix, CIccMpeSpectralCLUT, and CIccMpeSpectralObserver.

184{ return false; }

Referenced by CIccMpeCalculator::IsLateBinding(), and CIccTagMultiProcessElement::IsLateBinding().

+ Here is the caller graph for this function:

◆ IsLateBindingReflectance()

virtual bool CIccMultiProcessElement::IsLateBindingReflectance ( ) const
inlinevirtualinherited

Reimplemented in CIccMpeCalculator, CIccMpeReflectanceCLUT, and CIccMpeReflectanceObserver.

185{ return false; }

Referenced by CIccMpeCalculator::IsLateBindingReflectance(), and CIccTagMultiProcessElement::IsLateBindingReflectance().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccMpeUnknown::IsSupported ( )
inlinevirtualinherited

Reimplemented from CIccMultiProcessElement.

241{ return false; }

◆ NewCopy()

virtual CIccMultiProcessElement * CIccMpeUnknown::NewCopy ( ) const
inlinevirtualinherited

Implements CIccMultiProcessElement.

235{ return new CIccMpeUnknown(*this);}
CIccMpeUnknown()
Definition IccTagMPE.cpp:162

References CIccMpeUnknown::CIccMpeUnknown().

+ Here is the call graph for this function:

◆ NumInputChannels()

◆ NumOutputChannels()

◆ ParseXml()

bool CIccMpeXmlUnknown::ParseXml ( xmlNode *  pNode,
std::string &  parseStr 
)
virtual

Implements CIccMpeXml.

108{
110 SetChannels(atoi(icXmlAttrValue(pNode, "InputChannels")), atoi(icXmlAttrValue(pNode, "OutputChannels")));
111
112 if (pNode->children && pNode->children->type == XML_TEXT_NODE && pNode->children->content) {
113 icUInt32Number nSize = icXmlGetHexDataSize((const char *)pNode->children->content);
114
115 if (!SetDataSize(nSize, false))
116 return false;
117
118 icXmlGetHexData(m_pData, (const char *)pNode->children->content, nSize);
119 }
120 else {
121 SetDataSize(0);
122 }
123 return true;
124}
icElemTypeSignature
Definition icProfileHeader.h:641
unsigned long icUInt32Number
Definition icProfileHeader.h:262
icUInt32Number icXmlGetHexDataSize(const char *szText)
Definition IccUtilXml.cpp:630
icUInt32Number icXmlGetHexData(void *pBuf, const char *szText, icUInt32Number nBufSize)
Definition IccUtilXml.cpp:609
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault="")
Definition IccUtilXml.cpp:572
icSignature icXmlStrToSig(const char *szStr)
Definition IccUtilXml.cpp:567
void SetType(icElemTypeSignature sig)
Definition IccTagMPE.cpp:255
bool SetDataSize(icUInt32Number nSize, bool bZeroData=true)
Definition IccTagMPE.cpp:311
void SetChannels(icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
Definition IccTagMPE.cpp:270

References icXmlAttrValue(), icXmlGetHexData(), icXmlGetHexDataSize(), icXmlStrToSig(), CIccMpeUnknown::m_pData, CIccMpeUnknown::SetChannels(), CIccMpeUnknown::SetDataSize(), and CIccMpeUnknown::SetType().

+ Here is the call graph for this function:

◆ Read()

bool CIccMpeUnknown::Read ( icUInt32Number  nSize,
CIccIO pIO 
)
virtualinherited

Name: CIccMpeUnknown::Read

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

342{
343 icUInt32Number nHeaderSize = sizeof(icTagTypeSignature) +
344 sizeof(icUInt32Number) +
345 sizeof(icUInt16Number) +
346 sizeof(icUInt16Number);
347
348 if (nHeaderSize > nSize)
349 return false;
350
351 if (!pIO) {
352 return false;
353 }
354
355 if (!pIO->Read32(&m_sig))
356 return false;
357
358 if (!pIO->Read32(&m_nReserved))
359 return false;
360
361 if (!pIO->Read16(&m_nInputChannels))
362 return false;
363
364 if (!pIO->Read16(&m_nOutputChannels))
365 return false;
366
367 icUInt32Number nDataSize = nSize - nHeaderSize;
368
369 if (nDataSize) {
370 if (!SetDataSize(nDataSize, false))
371 return false;
372
373 if (pIO->Read8(m_pData, nDataSize)!=(icInt32Number)nDataSize)
374 return false;
375 }
376
377 return true;
378}
unsigned short icUInt16Number
Definition icProfileHeader.h:256
long icInt32Number
Definition icProfileHeader.h:291
icTagTypeSignature
Definition icProfileHeader.h:526
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:264
icUInt32Number m_nReserved
Definition IccTagMPE.h:262
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:263

References CIccMpeUnknown::m_nInputChannels, CIccMpeUnknown::m_nOutputChannels, CIccMpeUnknown::m_nReserved, CIccMpeUnknown::m_pData, CIccMpeUnknown::m_sig, CIccIO::Read16(), CIccIO::Read32(), CIccIO::Read8(), and CIccMpeUnknown::SetDataSize().

+ Here is the call graph for this function:

◆ SetChannels()

void CIccMpeUnknown::SetChannels ( icUInt16Number  nInputChannels,
icUInt16Number  nOutputChannels 
)
inherited

Name: CIccMpeUnknown::Describe

Purpose:

Args:

Return:

271{
272 m_nInputChannels = nInputChannels;
273 m_nOutputChannels = nOutputChannels;
274}

References CIccMpeUnknown::m_nInputChannels, and CIccMpeUnknown::m_nOutputChannels.

Referenced by ParseXml().

+ Here is the caller graph for this function:

◆ SetDataSize()

bool CIccMpeUnknown::SetDataSize ( icUInt32Number  nSize,
bool  bZeroData = true 
)
inherited

Name: CIccMpeUnknown::SetDataSize

Purpose:

Args:

Return:

312{
313 bool rv = true;
314 if (m_pData)
315 free(m_pData);
316
317 m_nSize = nSize;
318 if (m_nSize) {
319 m_pData = (icUInt8Number*)malloc(m_nSize);
320 if (!m_pData) {
321 rv = false;
322 m_nSize = 0;
323 }
324 }
325 else
326 m_pData = NULL;
327
328 return rv;
329}
unsigned char icUInt8Number
Definition icProfileHeader.h:250

References CIccMpeUnknown::m_nSize, and CIccMpeUnknown::m_pData.

Referenced by ParseXml(), and CIccMpeUnknown::Read().

+ Here is the caller graph for this function:

◆ SetType()

void CIccMpeUnknown::SetType ( icElemTypeSignature  sig)
inherited

Name: CIccMpeUnknown::SetType

Purpose:

Args:

Return:

256{
257 m_sig = sig;
258}

References CIccMpeUnknown::m_sig.

Referenced by ParseXml().

+ Here is the caller graph for this function:

◆ ToXml()

bool CIccMpeXmlUnknown::ToXml ( std::string &  xml,
std::string  blanks = "" 
)
virtual

Implements CIccMpeXml.

84{
85 icUInt8Number *m_ptr = m_pData;
86
87 char line[256];
88 char buf[256];
89 char fix[256];
90 sprintf(line, "<UnknownElement Type=\"%s\" InputChannels=\"%d\" OutputChannels=\"%d\"",
92 xml += blanks + line;
93
94 if (m_nReserved) {
95 sprintf(line, " Reserved=\"%u\"", m_nReserved);
96 xml += buf;
97 }
98 xml += ">\n";
99
100 icXmlDumpHexData(xml, blanks + " ", m_pData, m_nSize);
101
102 xml += blanks + "</UnknownElement>\n";
103 return true;
104}
ICCPROFLIB_API const icChar * icGetSigStr(icChar *pBuf, icUInt32Number nSig)
Definition IccUtil.cpp:1056
icUInt32Number icXmlDumpHexData(std::string &xml, std::string blanks, void *pBuf, icUInt32Number nBufSize)
Definition IccUtilXml.cpp:648
const char * icFixXml(char *szDest, const char *szStr)
Definition IccUtilXml.cpp:305
virtual icUInt16Number NumInputChannels() const
Definition IccTagMPE.h:159
virtual icUInt16Number NumOutputChannels() const
Definition IccTagMPE.h:160
virtual icElemTypeSignature GetType() const
Definition IccTagMPE.h:238

References CIccMpeUnknown::GetType(), icFixXml(), icGetSigStr(), icXmlDumpHexData(), CIccMpeUnknown::m_nReserved, CIccMpeUnknown::m_nSize, CIccMpeUnknown::m_pData, CIccMultiProcessElement::NumInputChannels(), and CIccMultiProcessElement::NumOutputChannels().

+ Here is the call graph for this function:

◆ Validate()

icValidateStatus CIccMpeUnknown::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccTagMultiProcessElement pMPE = NULL,
const CIccProfile pProfile = NULL 
) const
virtualinherited

Name: CIccMpeUnknown::Validate

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

428{
429 CIccInfo Info;
430 icChar buf[40];
431 std::string sSigPathName = Info.GetSigPathName(sigPath);
432
434 sReport += sSigPathName;
435 sReport += " - Contains unknown processing element type (";
436 icGetSig(buf, m_sig, true);
437 sReport += buf;
438 sReport += ").\n";
439
441}
@ icValidateCriticalError
Definition IccDefs.h:123
ICCPROFLIB_API const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614

References CIccInfo::GetSigPathName(), icGetSig(), icMsgValidateCriticalError, icValidateCriticalError, and CIccMpeUnknown::m_sig.

+ Here is the call graph for this function:

◆ Write()

bool CIccMpeUnknown::Write ( CIccIO pIO)
virtualinherited

Name: CIccMpeUnknown::Write

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

391{
392 if (!pIO)
393 return false;
394
395 //icUInt32Number elemStart = pIO->Tell();
396
397 if (!pIO->Write32(&m_sig))
398 return false;
399
400 if (!pIO->Write32(&m_nReserved))
401 return false;
402
403 if (!pIO->Write16(&m_nInputChannels))
404 return false;
405
406 if (!pIO->Write16(&m_nOutputChannels))
407 return false;
408
409 if (m_nSize) {
411 return false;
412 }
413
414 return true;
415}
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152

References CIccMpeUnknown::m_nInputChannels, CIccMpeUnknown::m_nOutputChannels, CIccMpeUnknown::m_nReserved, CIccMpeUnknown::m_nSize, CIccMpeUnknown::m_pData, CIccMpeUnknown::m_sig, CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Field Documentation

◆ m_nInputChannels

◆ m_nOutputChannels

◆ m_nReserved

◆ m_nSize

◆ m_pData

◆ m_sig


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