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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlXYZ:
+ Collaboration diagram for CIccTagXmlXYZ:

Public Member Functions

virtual const char * GetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual ~CIccTagXmlXYZ ()
 
- Public Member Functions inherited from CIccTagXYZ
 CIccTagXYZ (const CIccTagXYZ &ITXYZ)
 Name: CIccTagXYZ::CIccTagXYZ.
 
 CIccTagXYZ (int nSize=1)
 Name: CIccTagXYZ::CIccTagXYZ.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagXYZ::Describe.
 
icUInt32Number GetSize () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
icXYZNumberGetXYZ (icUInt32Number index)
 
virtual bool IsArrayType ()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagXYZoperator= (const CIccTagXYZ &XYZTag)
 Name: CIccTagXYZ::operator=.
 
icXYZNumberoperator[] (icUInt32Number index) const
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagXYZ::Read.
 
bool SetSize (icUInt32Number nSize, bool bZeroNew=true)
 Name: CIccTagXYZ::SetSize.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagXYZ::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagXYZ::Write.
 
virtual ~CIccTagXYZ ()
 Name: CIccTagXYZ::~CIccTagXYZ.
 
- 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 IsNumArrayType () const
 
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 CIccTagXYZ
icUInt32Number m_nSize
 
icXYZNumberm_XYZ
 

Detailed Description

Definition at line 229 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ ~CIccTagXmlXYZ()

virtual CIccTagXmlXYZ::~CIccTagXmlXYZ ( )
inlinevirtual

Definition at line 232 of file IccTagXml.h.

232{}

Member Function Documentation

◆ GetClassName()

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

Reimplemented from CIccTagXYZ.

Definition at line 234 of file IccTagXml.h.

234{return "CIccTagXmlXYZ"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlXYZ::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 236 of file IccTagXml.h.

236{return this; }

◆ ParseXml()

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

Implements CIccTagXml.

Definition at line 895 of file IccTagXml.cpp.

896{
897 icUInt32Number n = icXmlNodeCount(pNode, "XYZNumber");
898
899 if (n) {
901 SetSize(n);
902
903 for (i=0; pNode; pNode=pNode->next) {
904 if (pNode->type == XML_ELEMENT_NODE &&
905 !icXmlStrCmp(pNode->name, "XYZNumber") &&
906 i<n) {
907 xmlAttr *x = icXmlFindAttr(pNode, "X");
908 xmlAttr *y = icXmlFindAttr(pNode, "Y");
909 xmlAttr *z = icXmlFindAttr(pNode, "Z");
910
911 if (x && y && z) {
912 m_XYZ[i].X = icDtoF((icFloatNumber)atof(icXmlAttrValue(x)));
913 m_XYZ[i].Y = icDtoF((icFloatNumber)atof(icXmlAttrValue(y)));
914 m_XYZ[i].Z = icDtoF((icFloatNumber)atof(icXmlAttrValue(z)));
915 i++;
916 }
917 else
918 return false;
919 }
920 }
921 return i==n;
922 }
923 return false;
924}
float icFloatNumber
All floating point operations/variables in IccProfLib use the icFloatNumber data type.
Definition IccDefs.h:100
icS15Fixed16Number icDtoF(icFloatNumber num)
Definition IccUtil.cpp:545
icUInt32Number icXmlNodeCount(xmlNode *pNode, const char *szNodeName)
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault)
#define icXmlStrCmp(x, y)
Definition IccUtilXml.h:134
unsigned int icUInt32Number
bool SetSize(icUInt32Number nSize, bool bZeroNew=true)
Name: CIccTagXYZ::SetSize.
icXYZNumber * m_XYZ
icS15Fixed16Number Y
icS15Fixed16Number Z
icS15Fixed16Number X

References icDtoF(), icXmlAttrValue(), icXmlFindAttr(), icXmlNodeCount(), and icXmlStrCmp.

+ Here is the call graph for this function:

◆ ToXml()

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

Implements CIccTagXml.

Definition at line 880 of file IccTagXml.cpp.

881{
882 char buf[256];
883 int i;
884
885 for (i=0; i<(int)m_nSize; i++) {
886 sprintf(buf, "<XYZNumber X=\"" icXmlFloatFmt "\" Y=\"" icXmlFloatFmt "\" Z=\"" icXmlFloatFmt "\"/>\n", (float)icFtoD(m_XYZ[i].X),
887 (float)icFtoD(m_XYZ[i].Y),
888 (float)icFtoD(m_XYZ[i].Z));
889 xml += blanks + buf;
890 }
891 return true;
892}
icFloatNumber icFtoD(icS15Fixed16Number num)
Definition IccUtil.cpp:559
#define icXmlFloatFmt
icUInt32Number m_nSize

References icFtoD(), and icXmlFloatFmt.

+ Here is the call graph for this function:

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