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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlProfileSequenceId:
+ Collaboration diagram for CIccTagXmlProfileSequenceId:

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 ~CIccTagXmlProfileSequenceId ()
 
- Public Member Functions inherited from CIccTagProfileSequenceId
bool AddProfileDescription (CIccProfile &profile)
 
bool AddProfileDescription (const CIccProfileIdDesc &profileDesc)
 Name: sampleICC::CIccTagProfileSequenceId::AddProfileDescription.
 
CIccProfileIdDescList::iterator begin ()
 
 CIccTagProfileSequenceId ()
 Name: CIccTagProfileSequenceId::CIccTagProfileSequenceId.
 
 CIccTagProfileSequenceId (const CIccTagProfileSequenceId &lut)
 Name: CIccTagProfileSequenceId::CIccTagProfileSequenceId.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagProfileSequenceId::Describe.
 
CIccProfileIdDescList::iterator end ()
 
CIccProfileIdDescGetFirst ()
 Name: sampleICC::CIccTagProfileSequenceId::GetFirst.
 
CIccProfileIdDescGetLast ()
 Name: sampleICC::CIccTagProfileSequenceId::GetLast.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagProfileSequenceIdoperator= (const CIccTagProfileSequenceId &lut)
 Name: &operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagProfileSequenceId::Read.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagProfileSequenceId::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagProfileSequenceId::Write.
 
virtual ~CIccTagProfileSequenceId ()
 Name: CIccTagProfileSequenceId::~CIccTagProfileSequenceId.
 
- 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 IsArrayType ()
 
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 CIccTagProfileSequenceId
static CIccTagProfileSequenceIdParseMem (icUInt8Number *pMem, icUInt32Number size)
 Name: CIccTagProfileSequenceId::ParseMem.
 
- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 
- Protected Member Functions inherited from CIccTagProfileSequenceId
void Cleanup ()
 
- Protected Attributes inherited from CIccTagProfileSequenceId
CIccProfileIdDescListm_list
 

Detailed Description

Definition at line 614 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ ~CIccTagXmlProfileSequenceId()

virtual CIccTagXmlProfileSequenceId::~CIccTagXmlProfileSequenceId ( )
inlinevirtual

Definition at line 617 of file IccTagXml.h.

617{}

Member Function Documentation

◆ GetClassName()

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

Reimplemented from CIccTagProfileSequenceId.

Definition at line 619 of file IccTagXml.h.

619{return "CIccTagXmlProfileSequenceId"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlProfileSequenceId::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 621 of file IccTagXml.h.

621{return this; }

◆ ParseXml()

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

Implements CIccTagXml.

Definition at line 4164 of file IccTagXml.cpp.

4165{
4166 pNode = icXmlFindNode(pNode, "ProfileSequenceId");
4167
4168 if (!pNode)
4169 return false;
4170
4171 m_list->clear();
4172
4173 for (pNode = icXmlFindNode(pNode->children, "ProfileIdDesc"); pNode; pNode = icXmlFindNode(pNode->next, "ProfileIdDesc")) {
4174 CIccProfileIdDesc desc;
4175 const icChar *szDesc = icXmlAttrValue(pNode, "id");
4176
4177 if (szDesc && *szDesc)
4178 icXmlGetHexData(&desc.m_profileID, szDesc, sizeof(desc.m_profileID));
4179
4180 xmlAttr *langCode;
4181
4182 for (pNode = icXmlFindNode(pNode, "LocalizedText"); pNode; pNode = icXmlFindNode(pNode->next, "LocalizedText")) {
4183 if ((langCode = icXmlFindAttr(pNode, "languageCountry")) &&
4184 pNode->children) {
4185 xmlNode *pText;
4186
4187 for (pText = pNode->children; pText && pText->type != XML_TEXT_NODE; pText = pText->next);
4188
4189 if (pText) {
4191 CIccUTF16String str((const char*)pText->content);
4192 desc.m_desc.SetText(str.c_str(), (icLanguageCode)(lc>>16), (icCountryCode)(lc & 0xffff));
4193 }
4194 else {
4195 desc.m_desc.SetText("");
4196 }
4197 }
4198 }
4199 m_list->push_back(desc);
4200 }
4201
4202 return true;
4203}
char icChar
Definition IccDefs.h:109
icUInt32Number icGetSigVal(const icChar *pBuf)
Definition IccUtil.cpp:1258
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
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
CIccTagMultiLocalizedUnicode m_desc
icProfileID m_profileID
void SetText(const icChar *szText, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
CIccProfileIdDescList * m_list
icUInt16Number icCountryCode
icUInt16Number icLanguageCode

References CIccUTF16String::c_str(), icGetSigVal(), icXmlAttrValue(), icXmlFindAttr(), icXmlFindNode(), icXmlGetHexData(), CIccProfileIdDesc::m_desc, CIccProfileIdDesc::m_profileID, and CIccTagMultiLocalizedUnicode::SetText().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToXml()

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

Implements CIccTagXml.

Definition at line 4122 of file IccTagXml.cpp.

4123{
4124 std::string info;
4125
4126 xml += blanks + "<ProfileSequenceId>\n";
4127
4128 CIccProfileIdDescList::iterator pid;
4129
4130 for (pid=m_list->begin(); pid!=m_list->end(); pid++) {
4131 char buf[256];
4132 char data[256];
4133 char fix[256];
4134 std::string bufstr;
4135 int n;
4136
4137 for (n=0; n<16; n++) {
4138 sprintf(buf + n*2, "%02X", pid->m_profileID.ID8[n]);
4139 }
4140 buf[n*2]='\0';
4141 xml += blanks + " <ProfileIdDesc id=\"";
4142 xml += buf;
4143 xml += "\">\n";
4144
4145 if (pid->m_desc.m_Strings) {
4146 CIccMultiLocalizedUnicode::iterator i;
4147
4148 for (i=pid->m_desc.m_Strings->begin(); i!=pid->m_desc.m_Strings->end(); i++) {
4149 sprintf(buf, "<LocalizedText LanguangeCountry=\"%s\"", icFixXml(fix, icGetSigStr(data, (i->m_nLanguageCode<<16) + i->m_nCountryCode)));
4150 xml += blanks + buf;
4151
4152 sprintf(buf, ">%s</LocalizedText>\n", icFixXml(fix, icUtf16ToUtf8(bufstr, i->GetBuf(), i->GetLength())));
4153 xml += buf;
4154 }
4155 }
4156 xml += blanks + " </ProfileIdDesc>\n";
4157 }
4158
4159 xml += blanks + "</ProfileSequenceId>\n";
4160 return true;
4161}
const icChar * icGetSigStr(icChar *pBuf, icUInt32Number nSig)
Definition IccUtil.cpp:1056
const char * icUtf16ToUtf8(std::string &buf, const icUInt16Number *szSrc, int sizeSrc)
const char * icFixXml(std::string &buf, const char *szStr)

References icFixXml(), icGetSigStr(), and icUtf16ToUtf8().

+ Here is the call graph for this function:

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