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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlTagData:
+ Collaboration diagram for CIccTagXmlTagData:

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 ~CIccTagXmlTagData ()
 
- Public Member Functions inherited from CIccTagData
 CIccTagData (const CIccTagData &ITD)
 Name: CIccTagData::CIccTagData.
 
 CIccTagData (int nSize=1)
 Name: CIccTagData::CIccTagData.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagData::Describe.
 
icUInt8NumberGetData (icUInt32Number index=0)
 
icUInt32Number GetSize () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual bool IsArrayType ()
 
virtual bool IsTypeAscii ()
 
virtual bool IsTypeBinary ()
 
virtual bool IsTypeCompressed ()
 
virtual bool IsTypeUtf ()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagDataoperator= (const CIccTagData &DataTag)
 Name: CIccTagData::operator=.
 
icUInt8Numberoperator[] (icUInt32Number index)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagData::Read.
 
virtual void SetDataType (icDataBlockType dataType=icAsciiData)
 
bool SetSize (icUInt32Number nSize, bool bZeroNew=true)
 Name: CIccTagData::SetSize.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagData::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagData::Write.
 
virtual ~CIccTagData ()
 Name: CIccTagData::~CIccTagData.
 
- 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 CIccTagData
icDataBlockType m_nDataFlag
 
icUInt32Number m_nSize
 
icUInt8Numberm_pData
 

Detailed Description

Definition at line 370 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ ~CIccTagXmlTagData()

virtual CIccTagXmlTagData::~CIccTagXmlTagData ( )
inlinevirtual

Definition at line 373 of file IccTagXml.h.

373{}

Member Function Documentation

◆ GetClassName()

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

Reimplemented from CIccTagData.

Definition at line 375 of file IccTagXml.h.

375{return "CIccTagXmlTagData"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlTagData::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 377 of file IccTagXml.h.

377{return this; }

◆ ParseXml()

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

Implements CIccTagXml.

Definition at line 1729 of file IccTagXml.cpp.

1730{
1731 pNode = icXmlFindNode(pNode, "Data");
1732 if (pNode && pNode->children && pNode->children->content) {
1733 const icChar *szFlag = icXmlAttrValue(pNode, "Flag");
1735 if (!strcmp(szFlag,"binary"))
1737
1738 icUInt32Number nSize = icXmlGetHexDataSize((const char *)pNode->children->content);
1739 SetSize(nSize, false);
1740 if (nSize) {
1741 icXmlGetHexData(m_pData, (const char*)pNode->children->content, nSize);
1742 }
1743
1744 return true;
1745 }
1746 return false;
1747}
char icChar
Definition IccDefs.h:109
icUInt32Number icXmlGetHexDataSize(const char *szText)
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
icUInt32Number icXmlGetHexData(void *pBuf, const char *szText, icUInt32Number nBufSize)
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault)
unsigned int icUInt32Number
bool SetSize(icUInt32Number nSize, bool bZeroNew=true)
Name: CIccTagData::SetSize.
icDataBlockType m_nDataFlag
icUInt8Number * m_pData
@ icBinaryData
@ icAsciiData

References icAsciiData, icBinaryData, icXmlAttrValue(), icXmlFindNode(), icXmlGetHexData(), and icXmlGetHexDataSize().

+ Here is the call graph for this function:

◆ ToXml()

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

Implements CIccTagXml.

Definition at line 1712 of file IccTagXml.cpp.

1713{
1714 icUInt8Number *ptr = m_pData;
1715 char buf[60];
1716 std::string szFlag("ASCII");
1717
1718 if (m_nDataFlag == 1)
1719 szFlag = "binary";
1720 sprintf (buf, "<Data Flag=\"%s\">\n", szFlag.c_str());
1721 xml += blanks + buf;
1722 icXmlDumpHexData(xml, blanks+" ", m_pData, m_nSize);
1723 xml += blanks + "</Data>\n";
1724
1725 return true;
1726}
icUInt32Number icXmlDumpHexData(std::string &xml, std::string blanks, void *pBuf, icUInt32Number nBufSize)
icUInt32Number m_nSize
unsigned char icUInt8Number
Number definitions.

References icXmlDumpHexData().

+ Here is the call graph for this function:

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