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

Class: CIccMpeUnknown. More...

#include <IccTagMPE.h>

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

Public Member Functions

virtual void Apply (CIccApplyMpe *pApply, icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel) const
 
virtual bool Begin (icElemInterp nIterp=icElemInterpLinear, CIccTagMultiProcessElement *pMPE=NULL)
 
 CIccMpeUnknown ()
 Name: CIccMpeUnknown::CIccMpeUnknown.
 
 CIccMpeUnknown (const CIccMpeUnknown &elem)
 Name: CIccMpeUnknown::CIccMpeUnknown.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccMpeUnknown::Describe.
 
virtual const icCharGetClassName () const
 
icUInt8NumberGetData ()
 
virtual CIccApplyMpeGetNewApply ()
 
virtual icElemTypeSignature GetType () const
 
virtual bool IsSupported ()
 
virtual CIccMultiProcessElementNewCopy () const
 
CIccMpeUnknownoperator= (const CIccMpeUnknown &elem)
 Name: CIccMpeUnknown::operator=.
 
virtual bool Read (icUInt32Number nSize, CIccIO *pIO)
 Name: CIccMpeUnknown::Read.
 
void SetChannels (icUInt16Number nInputChannels, icUInt16Number nOutputChannels)
 Name: CIccMpeUnknown::Describe.
 
bool SetDataSize (icUInt32Number nSize, bool bZeroData=true)
 Name: CIccMpeUnknown::SetDataSize.
 
void SetType (icElemTypeSignature sig)
 Name: CIccMpeUnknown::SetType.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccTagMultiProcessElement *pMPE=NULL, const CIccProfile *pProfile=NULL) const
 Name: CIccMpeUnknown::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccMpeUnknown::Write.
 
virtual ~CIccMpeUnknown ()
 Name: CIccMpeUnknown::~CIccMpeUnknown.
 
- Public Member Functions inherited from CIccMultiProcessElement
 CIccMultiProcessElement ()
 
virtual icAcsSignature GetBAcsSig ()
 
virtual icAcsSignature GetEAcsSig ()
 
virtual IIccExtensionMpeGetExtension ()
 
virtual CIccApplyMpeGetNewApply (CIccApplyTagMpe *pApplyTag)
 Name: CIccMultiProcessElement::GetNewApply()
 
virtual bool IsAcs ()
 
virtual bool IsLateBinding () const
 
virtual bool IsLateBindingReflectance () const
 
virtual icUInt16Number NumInputChannels () const
 
virtual icUInt16Number NumOutputChannels () const
 
virtual ~CIccMultiProcessElement ()
 

Protected Attributes

icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 
icUInt32Number m_nReserved
 
icUInt32Number m_nSize
 
icUInt8Numberm_pData
 
icElemTypeSignature m_sig
 
- Protected Attributes inherited from CIccMultiProcessElement
icUInt16Number m_nInputChannels
 
icUInt16Number m_nOutputChannels
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccMultiProcessElement
static CIccMultiProcessElementCreate (icElemTypeSignature sig)
 Name: CIccMultiProcessElement::Create.
 
- Public Attributes inherited from CIccMultiProcessElement
icUInt32Number m_nReserved
 

Detailed Description

Class: CIccMpeUnknown.

Purpose: Base Class for Process Elements

Definition at line 229 of file IccTagMPE.h.

Constructor & Destructor Documentation

◆ CIccMpeUnknown() [1/2]

CIccMpeUnknown::CIccMpeUnknown ( )

Name: CIccMpeUnknown::CIccMpeUnknown.

Purpose:

Args:

Return:

Definition at line 162 of file IccTagMPE.cpp.

163{
165 m_nReserved = 0;
168 m_nSize = 0;
169 m_pData = 0;
170}
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
#define icSigUnknownElemType
Convenience Enum Definitions - Not defined in proposal.

References icSigUnknownElemType.

◆ CIccMpeUnknown() [2/2]

CIccMpeUnknown::CIccMpeUnknown ( const CIccMpeUnknown & elem)

Name: CIccMpeUnknown::CIccMpeUnknown.

Purpose:

Args:

Return:

Definition at line 182 of file IccTagMPE.cpp.

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
Number definitions.

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

◆ ~CIccMpeUnknown()

CIccMpeUnknown::~CIccMpeUnknown ( )
virtual

Name: CIccMpeUnknown::~CIccMpeUnknown.

Purpose:

Args:

Return:

Definition at line 239 of file IccTagMPE.cpp.

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

Member Function Documentation

◆ Apply()

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

Implements CIccMultiProcessElement.

Definition at line 256 of file IccTagMPE.h.

256{}

◆ Begin()

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

Implements CIccMultiProcessElement.

Definition at line 254 of file IccTagMPE.h.

254{ return false; }

◆ Describe()

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

Name: CIccMpeUnknown::Describe.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 286 of file IccTagMPE.cpp.

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:109
void icMemDump(std::string &sDump, void *pBuf, icUInt32Number nNum)
Definition IccUtil.cpp:951
const icChar * icGetSig(icChar *pBuf, icUInt32Number nSig, bool bGetHexVal)
Definition IccUtil.cpp:1028

References icGetSig(), and icMemDump().

+ Here is the call graph for this function:

◆ GetClassName()

virtual const icChar * CIccMpeUnknown::GetClassName ( ) const
inlinevirtual

Implements CIccMultiProcessElement.

Reimplemented in CIccMpeXmlUnknown.

Definition at line 239 of file IccTagMPE.h.

239{ return "CIccMpeUnknown"; }

◆ GetData()

icUInt8Number * CIccMpeUnknown::GetData ( )
inline

Definition at line 249 of file IccTagMPE.h.

249{ return m_pData; }

◆ GetNewApply()

virtual CIccApplyMpe * CIccMpeUnknown::GetNewApply ( )
inlinevirtual

Definition at line 255 of file IccTagMPE.h.

255{ return NULL; }

◆ GetType()

virtual icElemTypeSignature CIccMpeUnknown::GetType ( ) const
inlinevirtual

Implements CIccMultiProcessElement.

Definition at line 238 of file IccTagMPE.h.

238{ return m_sig; }

◆ IsSupported()

virtual bool CIccMpeUnknown::IsSupported ( )
inlinevirtual

Reimplemented from CIccMultiProcessElement.

Definition at line 241 of file IccTagMPE.h.

241{ return false; }

◆ NewCopy()

virtual CIccMultiProcessElement * CIccMpeUnknown::NewCopy ( ) const
inlinevirtual

Implements CIccMultiProcessElement.

Definition at line 235 of file IccTagMPE.h.

235{ return new CIccMpeUnknown(*this);}
CIccMpeUnknown()
Name: CIccMpeUnknown::CIccMpeUnknown.

◆ operator=()

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

Name: CIccMpeUnknown::operator=.

Purpose:

Args:

Return:

Definition at line 208 of file IccTagMPE.cpp.

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.

Definition at line 341 of file IccTagMPE.cpp.

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}
icTagTypeSignature
unsigned int icUInt32Number
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)
Name: CIccMpeUnknown::SetDataSize.
unsigned short icUInt16Number
long icInt32Number

References CIccIO::Read16(), CIccIO::Read32(), and CIccIO::Read8().

+ Here is the call graph for this function:

◆ SetChannels()

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

Name: CIccMpeUnknown::Describe.

Purpose:

Args:

Return:

Definition at line 270 of file IccTagMPE.cpp.

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

◆ SetDataSize()

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

Name: CIccMpeUnknown::SetDataSize.

Purpose:

Args:

Return:

Definition at line 311 of file IccTagMPE.cpp.

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}

◆ SetType()

void CIccMpeUnknown::SetType ( icElemTypeSignature sig)

Name: CIccMpeUnknown::SetType.

Purpose:

Args:

Return:

Definition at line 255 of file IccTagMPE.cpp.

256{
257 m_sig = sig;
258}
icArraySignature sig

References sig.

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

Definition at line 427 of file IccTagMPE.cpp.

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:122
const char * icMsgValidateCriticalError
Definition IccUtil.cpp:92
Type: Class.
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614

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

+ Here is the call graph for this function:

◆ Write()

bool CIccMpeUnknown::Write ( CIccIO * pIO)
virtual

Name: CIccMpeUnknown::Write.

Purpose:

Args:

Return:

Implements CIccMultiProcessElement.

Definition at line 390 of file IccTagMPE.cpp.

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 CIccIO::Write16(), CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_nInputChannels

icUInt16Number CIccMpeUnknown::m_nInputChannels
protected

Definition at line 263 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().

◆ m_nOutputChannels

icUInt16Number CIccMpeUnknown::m_nOutputChannels
protected

Definition at line 264 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().

◆ m_nReserved

icUInt32Number CIccMpeUnknown::m_nReserved
protected

Definition at line 262 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().

◆ m_nSize

icUInt32Number CIccMpeUnknown::m_nSize
protected

Definition at line 265 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().

◆ m_pData

icUInt8Number* CIccMpeUnknown::m_pData
protected

Definition at line 266 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().

◆ m_sig

icElemTypeSignature CIccMpeUnknown::m_sig
protected

Definition at line 261 of file IccTagMPE.h.

Referenced by CIccMpeUnknown(), and operator=().


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