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

#include <IccTagMPE.h>

+ Inheritance diagram for CIccMpeUnknown:
+ Collaboration diagram for CIccMpeUnknown:

Public Member Functions

 CIccMpeUnknown ()
 
 CIccMpeUnknown (const CIccMpeUnknown &elem)
 
virtual ~CIccMpeUnknown ()
 
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 icCharGetClassName () const
 
icUInt8NumberGetData ()
 
virtual icAcsSignature GetEAcsSig ()
 
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
 
CIccMpeUnknownoperator= (const CIccMpeUnknown &elem)
 
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 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

Class: CIccMpeUnknown

Purpose: Base Class for Process Elements

Constructor & Destructor Documentation

◆ CIccMpeUnknown() [1/2]

CIccMpeUnknown::CIccMpeUnknown ( )

Name: CIccMpeUnknown::CIccMpeUnknown

Purpose:

Args:

Return:

163{
165 m_nReserved = 0;
168 m_nSize = 0;
169 m_pData = 0;
170}
#define icSigUnknownElemType
Definition icProfileHeader.h:668
icUInt16Number m_nOutputChannels
Definition IccTagMPE.h:264
icUInt32Number m_nReserved
Definition IccTagMPE.h:262
icElemTypeSignature m_sig
Definition IccTagMPE.h:261
icUInt16Number m_nInputChannels
Definition IccTagMPE.h:263
icUInt32Number m_nSize
Definition IccTagMPE.h:265
icUInt8Number * m_pData
Definition IccTagMPE.h:266

References m_nInputChannels, m_nOutputChannels, m_nReserved, m_nSize, m_pData, and m_sig.

Referenced by CIccBasicMpeFactory::CreateElement().

+ Here is the caller graph for this function:

◆ CIccMpeUnknown() [2/2]

CIccMpeUnknown::CIccMpeUnknown ( const CIccMpeUnknown elem)

Name: CIccMpeUnknown::CIccMpeUnknown

Purpose:

Args:

Return:

183{
184 m_sig = elem.m_sig;
188 m_nSize = elem.m_nSize;
189 if (m_nSize) {
190 m_pData = (icUInt8Number*)malloc(m_nSize);
191 if (m_pData)
192 memcpy(m_pData, elem.m_pData, m_nSize);
193 }
194 else
195 m_pData = NULL;
196}
unsigned char icUInt8Number
Definition icProfileHeader.h:250

References m_nInputChannels, m_nOutputChannels, m_nReserved, m_nSize, m_pData, and m_sig.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccMpeUnknown()

CIccMpeUnknown::~CIccMpeUnknown ( )
virtual

Name: CIccMpeUnknown::~CIccMpeUnknown

Purpose:

Args:

Return:

240{
241 if (m_pData)
242 free(m_pData);
243}

References m_pData.

Member Function Documentation

◆ Apply()

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

Implements CIccMultiProcessElement.

256{}

◆ Begin()

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

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 
)
virtual

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

References icGetSig(), icMemDump(), m_nSize, m_pData, and 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 icChar * CIccMpeUnknown::GetClassName ( ) const
inlinevirtual

Implements CIccMultiProcessElement.

Reimplemented in CIccMpeXmlUnknown.

239{ return "CIccMpeUnknown"; }

◆ GetData()

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

References m_pData.

◆ GetEAcsSig()

virtual icAcsSignature CIccMultiProcessElement::GetEAcsSig ( )
inlinevirtualinherited

Reimplemented in CIccMpeEAcs.

179{ return icSigAcsZero; }

◆ GetExtension()

◆ GetNewApply() [1/2]

virtual CIccApplyMpe * CIccMpeUnknown::GetNewApply ( )
inlinevirtual
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
inlinevirtual

Implements CIccMultiProcessElement.

238{ return m_sig; }

References m_sig.

Referenced by CIccMpeXmlUnknown::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 ( )
inlinevirtual

Reimplemented from CIccMultiProcessElement.

241{ return false; }

◆ NewCopy()

virtual CIccMultiProcessElement * CIccMpeUnknown::NewCopy ( ) const
inlinevirtual

Implements CIccMultiProcessElement.

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

References CIccMpeUnknown().

+ Here is the call graph for this function:

◆ NumInputChannels()

◆ NumOutputChannels()

◆ operator=()

CIccMpeUnknown & CIccMpeUnknown::operator= ( const CIccMpeUnknown elem)

Name: CIccMpeUnknown::operator=

Purpose:

Args:

Return:

209{
210 if (m_pData)
211 free(m_pData);
212
213 m_sig = elem.m_sig;
217 m_nSize = elem.m_nSize;
218 if (m_nSize) {
219 m_pData = (icUInt8Number*)malloc(m_nSize);
220 if (m_pData)
221 memcpy(m_pData, elem.m_pData, m_nSize);
222 }
223 else
224 m_pData = NULL;
225
226 return (*this);
227}

References m_nInputChannels, m_nOutputChannels, m_nReserved, m_nSize, m_pData, and m_sig.

◆ Read()

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

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
unsigned long icUInt32Number
Definition icProfileHeader.h:262
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
bool SetDataSize(icUInt32Number nSize, bool bZeroData=true)
Definition IccTagMPE.cpp:311

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

+ Here is the call graph for this function:

◆ SetChannels()

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

Name: CIccMpeUnknown::Describe

Purpose:

Args:

Return:

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

References m_nInputChannels, and m_nOutputChannels.

Referenced by CIccMpeXmlUnknown::ParseXml().

+ Here is the caller graph for this function:

◆ SetDataSize()

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

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}

References m_nSize, and m_pData.

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

+ Here is the caller graph for this function:

◆ SetType()

void CIccMpeUnknown::SetType ( icElemTypeSignature  sig)

Name: CIccMpeUnknown::SetType

Purpose:

Args:

Return:

256{
257 m_sig = sig;
258}

References m_sig.

Referenced by CIccMpeXmlUnknown::ParseXml().

+ Here is the caller graph for this function:

◆ Validate()

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

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 m_sig.

+ Here is the call graph for this function:

◆ Write()

bool CIccMpeUnknown::Write ( CIccIO pIO)
virtual

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 m_nInputChannels, m_nOutputChannels, m_nReserved, m_nSize, m_pData, m_sig, CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Field Documentation

◆ m_nInputChannels

icUInt16Number CIccMpeUnknown::m_nInputChannels
protected

◆ m_nOutputChannels

icUInt16Number CIccMpeUnknown::m_nOutputChannels
protected

◆ m_nReserved

icUInt32Number CIccMpeUnknown::m_nReserved
protected

◆ m_nSize

◆ m_pData

◆ m_sig


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