Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
CIccTagXmlNum< T, A, Tsig > Class Template Reference

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlNum< T, A, Tsig >:
+ Collaboration diagram for CIccTagXmlNum< T, A, Tsig >:

Public Member Functions

virtual const char * GetClassName () const
 Name: CIccTagNum::GetClassName.
 
virtual IIccExtensionTagGetExtension ()
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual ~CIccTagXmlNum ()
 
- Public Member Functions inherited from CIccTagNum< T, Tsig >
 CIccTagNum (const CIccTagNum< T, Tsig > &ITNum)
 Name: CIccTagNum::CIccTagNum.
 
 CIccTagNum (int nSize=1)
 Name: CIccTagNum::CIccTagNum.
 
void Describe (std::string &sDescription, int nVerboseness)
 Function: Describe(sDescription) Each derived tag will implement it's own Describe() function.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagNum::Describe.
 
virtual icUInt32Number GetNumValues () const
 
icUInt32Number GetSize () const
 Returns the size of the data array.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
bool GetValues (icFloatNumber *DstVector, icUInt32Number nStart, icUInt32Number nVectorSize) const
 
bool GetValues (icFloatNumber *DstVector, icUInt32Number nStart, icUInt32Number nVectorSize) const
 
virtual bool GetValues (icFloatNumber *DstVector, icUInt32Number nStart=0, icUInt32Number nVectorSize=1) const
 Name: CIccTagNum::GetValues.
 
bool Interpolate (icFloatNumber *DstVector, icFloatNumber pos, icUInt32Number nVectorSize, icFloatNumber *zeroVals) const
 
bool Interpolate (icFloatNumber *DstVector, icFloatNumber pos, icUInt32Number nVectorSize, icFloatNumber *zeroVals) const
 
virtual bool Interpolate (icFloatNumber *DstVector, icFloatNumber val, icUInt32Number nVectorSize=1, icFloatNumber *zeroVals=NULL) const
 Name: CIccTagNum::Interpolate.
 
virtual bool IsArrayType ()
 
virtual bool IsMatrixArray () const
 
virtual bool IsNumArrayType () const
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagNumoperator= (const CIccTagNum< T, Tsig > &NumTag)
 Name: CIccTagNum::operator=.
 
T & operator[] (icUInt32Number index)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagNum::Read.
 
bool SetSize (icUInt32Number nSize, bool bZeroNew=true)
 Name: CIccTagNum::SetSize.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Function: Validate Each derived tag will implement it's own IsValid() function.
 
bool ValuePos (icFloatNumber &DstPos, icFloatNumber val, bool &bNoZero) const
 
bool ValuePos (icFloatNumber &DstPos, icFloatNumber val, bool &bNoZero) const
 
virtual bool ValuePos (icFloatNumber &DstPos, icFloatNumber val, bool &bNoZero) const
 Name: CIccTagNum::ValuePos.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagNum::Write.
 
virtual ~CIccTagNum ()
 Name: CIccTagNum::~CIccTagNum.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsMBBType ()
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 
- Public Member Functions inherited from CIccTagXml
virtual const char * GetExtClassName () const
 
virtual const char * GetExtDerivedClassName () const
 
virtual ~CIccTagXml (void)
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 
- Protected Attributes inherited from CIccTagNum< T, Tsig >
icUInt32Number m_nSize
 
T * m_Num
 

Detailed Description

template<class T, class A, icTagTypeSignature Tsig>
class CIccTagXmlNum< T, A, Tsig >

Definition at line 301 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ ~CIccTagXmlNum()

template<class T , class A , icTagTypeSignature Tsig>
virtual CIccTagXmlNum< T, A, Tsig >::~CIccTagXmlNum ( )
inlinevirtual

Definition at line 304 of file IccTagXml.h.

304{}

Member Function Documentation

◆ GetClassName()

template<class T , class A , icTagTypeSignature Tsig>
const icChar * CIccTagXmlNum< T, A, Tsig >::GetClassName ( ) const
virtual

Name: CIccTagNum::GetClassName.

Purpose: Returns the tag type class name

Reimplemented from CIccTagNum< T, Tsig >.

Definition at line 1304 of file IccTagXml.cpp.

1305{
1306 if (sizeof(T)==sizeof(icUInt8Number))
1307 return "CIccTagXmlUInt8";
1308 else if (sizeof(T)==sizeof(icUInt16Number))
1309 return "CIccTagXmlUInt16";
1310 else if (sizeof(T)==sizeof(icUInt32Number))
1311 return "CIccTagXmlUInt32";
1312 else if (sizeof(T)==sizeof(icUInt64Number))
1313 return "CIccTagXmlUInt64";
1314 else
1315 return "CIccTagXmlNum<>";
1316}
unsigned int icUInt32Number
unsigned char icUInt8Number
Number definitions.
unsigned short icUInt16Number
icUInt32Number icUInt64Number[2]

◆ GetExtension()

template<class T , class A , icTagTypeSignature Tsig>
virtual IIccExtensionTag * CIccTagXmlNum< T, A, Tsig >::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 308 of file IccTagXml.h.

308{return this; }

◆ ParseXml()

template<class T , class A , icTagTypeSignature Tsig>
bool CIccTagXmlNum< T, A, Tsig >::ParseXml ( xmlNode * pNode,
std::string & parseStr )
virtual

Implements CIccTagXml.

Definition at line 1355 of file IccTagXml.cpp.

1356{
1357 xmlNode *pDataNode = icXmlFindNode(pNode, "Data");
1358 if (!pDataNode) {
1359 pDataNode = icXmlFindNode(pNode, "Array");
1360 }
1361 if (!pDataNode) {
1362 return false;
1363 }
1364
1365 pNode = pDataNode->children;
1366
1367 A a;
1368
1369 if (!a.ParseArray(pNode) || !a.GetSize()) {
1370 return false;
1371 }
1372
1373 icUInt32Number i, n = a.GetSize();
1374 T *buf = a.GetBuf();
1375
1376 this->SetSize(n);
1377
1378 for (i=0; i<n; i++) {
1379 this->m_Num[i] = buf[i];
1380 }
1381
1382 return true;
1383}
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
bool SetSize(icUInt32Number nSize, bool bZeroNew=true)
Name: CIccTagNum::SetSize.

References icXmlFindNode().

+ Here is the call graph for this function:

◆ ToXml()

template<class T , class A , icTagTypeSignature Tsig>
bool CIccTagXmlNum< T, A, Tsig >::ToXml ( std::string & xml,
std::string blanks = "" )
virtual

Implements CIccTagXml.

Definition at line 1321 of file IccTagXml.cpp.

1322{
1323 char buf[512];
1324 int i;
1325
1326 xml += blanks + "<Array>\n";
1327 for (i=0; i<(int)this->m_nSize; i++) {
1328 if (!(i%16)) {
1329 if (i)
1330 xml += "\n";
1331 xml += blanks + blanks;
1332 }
1333 else {
1334 xml += " ";
1335 }
1336 if (sizeof(T)==16)
1337 sprintf(buf, "%llu", (icUInt64Number)this->m_Num[i]);
1338 else
1339 sprintf(buf, "%u", (icUInt32Number)this->m_Num[i]);
1340 xml += buf;
1341 }
1342
1343 if ((i%16)!=1) {
1344 xml += "\n";
1345 }
1346
1347 xml += blanks + "</Array>\n";
1348 return true;
1349 return true;
1350}
icUInt32Number m_nSize

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