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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlFixedNum< T, Tsig >:
+ Collaboration diagram for CIccTagXmlFixedNum< T, Tsig >:

Public Member Functions

virtual const char * GetClassName () const
 Name: CIccTagFixedNum::GetClassName.
 
virtual IIccExtensionTagGetExtension ()
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual ~CIccTagXmlFixedNum ()
 
- Public Member Functions inherited from CIccTagFixedNum< T, Tsig >
 CIccTagFixedNum (const CIccTagFixedNum< T, Tsig > &ITFN)
 Name: CIccTagFixedNum::CIccTagFixedNum.
 
 CIccTagFixedNum (int nSize=1)
 Name: CIccTagFixedNum::CIccTagFixedNum.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagFixedNum::Describe.
 
virtual icUInt32Number GetNumValues () const
 
icUInt32Number GetSize () const
 Returns the size of the data array.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool GetValues (icFloatNumber *DstVector, icUInt32Number nStart=0, icUInt32Number nVectorSize=1) const
 Name: CIccTagFixedNum::GetValues.
 
virtual bool Interpolate (icFloatNumber *DstVector, icFloatNumber val, icUInt32Number nVectorSize=1, icFloatNumber *zeroVals=NULL) const
 Name: CIccTagFixedNum::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.
 
CIccTagFixedNumoperator= (const CIccTagFixedNum< T, Tsig > &FixedNumTag)
 Name: CIccTagFixedNum::operator=.
 
T & operator[] (icUInt32Number index)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagFixedNum::Read.
 
bool SetSize (icUInt32Number nSize, bool bZeroNew=true)
 Name: CIccTagFixedNum::SetSize.
 
virtual bool ValuePos (icFloatNumber &DstPos, icFloatNumber val, bool &bNoZero) const
 Name: CIccTagFixedNum::ValuePos.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagFixedNum::Write.
 
virtual ~CIccTagFixedNum ()
 Name: CIccTagFixedNum::~CIccTagFixedNum.
 
- 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 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.
 
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 CIccTagFixedNum< T, Tsig >
icUInt32Number m_nSize
 
T * m_Num
 

Detailed Description

template<class T, icTagTypeSignature Tsig>
class CIccTagXmlFixedNum< T, Tsig >

Definition at line 283 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ ~CIccTagXmlFixedNum()

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

Definition at line 286 of file IccTagXml.h.

286{}

Member Function Documentation

◆ GetClassName()

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

Name: CIccTagFixedNum::GetClassName.

Purpose: Returns the tag type class name

Reimplemented from CIccTagFixedNum< T, Tsig >.

Definition at line 1208 of file IccTagXml.cpp.

1209{
1210 if (Tsig==icSigS15Fixed16ArrayType)
1211 return "CIccTagXmlS15Fixed16";
1212 else
1213 return "CIccTagXmlU16Fixed16";
1214}
@ icSigS15Fixed16ArrayType

References icSigS15Fixed16ArrayType.

◆ GetExtension()

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

Reimplemented from CIccTag.

Definition at line 290 of file IccTagXml.h.

290{return this; }

◆ ParseXml()

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

Implements CIccTagXml.

Definition at line 1270 of file IccTagXml.cpp.

1271{
1272 pNode = icXmlFindNode(pNode, "Array");
1273 pNode = pNode->children;
1274
1276
1277 if (!a.ParseArray(pNode) || !a.GetSize()) {
1278 return false;
1279 }
1280
1281 icUInt32Number i, n = a.GetSize();
1282 icFloatNumber *buf = a.GetBuf();
1283
1284 this->SetSize(n);
1285
1286 for (i=0; i<n; i++) {
1287 if (Tsig==icSigS15Fixed16ArrayType) {
1288 this->m_Num[i] = icDtoF(buf[i]);
1289 }
1290 else {
1291 this->m_Num[i] = icDtoUF(buf[i]);
1292 }
1293 }
1294 return true;
1295}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
icU16Fixed16Number icDtoUF(icFloatNumber num)
Definition IccUtil.cpp:566
icS15Fixed16Number icDtoF(icFloatNumber num)
Definition IccUtil.cpp:545
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
unsigned int icUInt32Number
bool SetSize(icUInt32Number nSize, bool bZeroNew=true)
Name: CIccTagFixedNum::SetSize.
static bool ParseArray(T *buf, icUInt32Number nBufSize, xmlNode *pNode)
icUInt32Number GetSize()
Definition IccUtilXml.h:166

References CIccXmlArrayType< T, Tsig >::GetBuf(), CIccXmlArrayType< T, Tsig >::GetSize(), icDtoF(), icDtoUF(), icSigS15Fixed16ArrayType, icXmlFindNode(), and CIccXmlArrayType< T, Tsig >::ParseArray().

+ Here is the call graph for this function:

◆ ToXml()

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

Implements CIccTagXml.

Definition at line 1219 of file IccTagXml.cpp.

1220{
1221 char buf[256];
1222 int i;
1223
1224 if (Tsig==icSigS15Fixed16ArrayType) {
1225 int n = 8;
1226 xml += blanks + "<Array>\n";
1227 for (i=0; i<(int)this->m_nSize; i++) {
1228 if (!(i%n)) {
1229 if (i)
1230 xml += "\n";
1231 xml += blanks + blanks;
1232 }
1233 else {
1234 xml += " ";
1235 }
1236 sprintf(buf, icXmlFloatFmt, (float)icFtoD(this->m_Num[i]));
1237 xml += buf;
1238 }
1239
1240 if ((i%n)!=1) {
1241 xml += "\n";
1242 }
1243 }
1244 else {
1245 for (i=0; i<(int)this->m_nSize; i++) {
1246
1247 if (!(i%8)) {
1248 if (i)
1249 xml += "\n";
1250 xml += blanks + blanks;
1251 }
1252 else {
1253 xml += " ";
1254 }
1255 sprintf(buf, icXmlFloatFmt, (float)icUFtoD(this->m_Num[i]));
1256 xml += buf;
1257 }
1258
1259 if ((i%8)!=1) {
1260 xml += "\n";
1261 }
1262 }
1263 xml += blanks + "</Array>\n";
1264 return true;
1265}
icFloatNumber icUFtoD(icU16Fixed16Number num)
Definition IccUtil.cpp:580
icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
#define icXmlFloatFmt
icUInt32Number m_nSize

References icFtoD(), icSigS15Fixed16ArrayType, icUFtoD(), and icXmlFloatFmt.

+ Here is the call graph for this function:

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