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

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlMultiLocalizedUnicode:
+ Collaboration diagram for CIccTagXmlMultiLocalizedUnicode:

Public Member Functions

 CIccTagXmlMultiLocalizedUnicode ()
 
 CIccTagXmlMultiLocalizedUnicode (const CIccTagXmlMultiLocalizedUnicode &ITMLU)
 
virtual const char * GetClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual ~CIccTagXmlMultiLocalizedUnicode ()
 
- Public Member Functions inherited from CIccTagMultiLocalizedUnicode
 CIccTagMultiLocalizedUnicode ()
 Name: CIccTagMultiLocalizedUnicode::CIccTagMultiLocalizedUnicode.
 
 CIccTagMultiLocalizedUnicode (const CIccTagMultiLocalizedUnicode &ITMLU)
 Name: CIccTagMultiLocalizedUnicode::CIccTagMultiLocalizedUnicode.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagMultiLocalizedUnicode::Describe.
 
CIccLocalizedUnicodeFind (icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
 Name: refIccMAX::CIccTagMultiLocalizedUnicode::Find.
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
CIccTagMultiLocalizedUnicodeoperator= (const CIccTagMultiLocalizedUnicode &MultiLocalizedTag)
 Name: CIccTagMultiLocalizedUnicode::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagMultiLocalizedUnicode::Read.
 
void SetText (const icChar *szText, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
 Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
 
void SetText (const icUInt16Number *sszUnicode16Text, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
 Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
 
void SetText (const icUInt32Number *sszUnicode32Text, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
 Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagMultiLocalizedUnicode::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagMultiLocalizedUnicode::Write.
 
virtual ~CIccTagMultiLocalizedUnicode ()
 Name: CIccTagMultiLocalizedUnicode::~CIccTagMultiLocalizedUnicode.
 
- 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 CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTagMultiLocalizedUnicode
CIccMultiLocalizedUnicodem_Strings
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Detailed Description

Definition at line 353 of file IccTagXml.h.

Constructor & Destructor Documentation

◆ CIccTagXmlMultiLocalizedUnicode() [1/2]

CIccTagXmlMultiLocalizedUnicode::CIccTagXmlMultiLocalizedUnicode ( )
inline

Definition at line 356 of file IccTagXml.h.

CIccTagMultiLocalizedUnicode()
Name: CIccTagMultiLocalizedUnicode::CIccTagMultiLocalizedUnicode.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ CIccTagXmlMultiLocalizedUnicode() [2/2]

CIccTagXmlMultiLocalizedUnicode::CIccTagXmlMultiLocalizedUnicode ( const CIccTagXmlMultiLocalizedUnicode & ITMLU)
inline

Definition at line 357 of file IccTagXml.h.

◆ ~CIccTagXmlMultiLocalizedUnicode()

virtual CIccTagXmlMultiLocalizedUnicode::~CIccTagXmlMultiLocalizedUnicode ( )
inlinevirtual

Definition at line 358 of file IccTagXml.h.

358{}

Member Function Documentation

◆ GetClassName()

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

Reimplemented from CIccTagMultiLocalizedUnicode.

Definition at line 362 of file IccTagXml.h.

362{return "CIccTagXmlMultiLocalizedUnicode"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlMultiLocalizedUnicode::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

Definition at line 364 of file IccTagXml.h.

364{return this; }

◆ NewCopy()

virtual CIccTag * CIccTagXmlMultiLocalizedUnicode::NewCopy ( ) const
inlinevirtual

Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

Parameter(s): none

Returns a new CIccTag object that is a copy of this object.

Reimplemented from CIccTagMultiLocalizedUnicode.

Definition at line 360 of file IccTagXml.h.

References CIccTagXmlMultiLocalizedUnicode().

+ Here is the call graph for this function:

◆ ParseXml()

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

Implements CIccTagXml.

Definition at line 1681 of file IccTagXml.cpp.

1682{
1683 xmlAttr *langCode;
1684 int n = 0;
1685
1686 for (pNode = icXmlFindNode(pNode, "LocalizedText"); pNode; pNode = icXmlFindNode(pNode->next, "LocalizedText")) {
1687 if ((langCode = icXmlFindAttr(pNode, "LanguageCountry"))) {
1688 xmlNode *pText;
1689
1690 for (pText = pNode->children; pText; pText = pText->next) {
1691 if (pText->type == XML_TEXT_NODE || pText->type == XML_CDATA_SECTION_NODE)
1692 break;
1693 }
1694
1695 if (pText) {
1697 CIccUTF16String str((const char*)pText->content);
1698
1699 SetText(str.c_str(), (icLanguageCode)(lc>>16), (icCountryCode)(lc & 0xffff));
1700 n++;
1701 }
1702 else {
1703 SetText("");
1704 n++;
1705 }
1706 }
1707 }
1708 return n>0; //We succeed if we parsed at least one string
1709}
icUInt32Number icGetSigVal(const icChar *pBuf)
Definition IccUtil.cpp:1258
xmlAttr * icXmlFindAttr(xmlNode *pNode, const char *szAttrName)
xmlNode * icXmlFindNode(xmlNode *pNode, const char *szNodeName)
const char * icXmlAttrValue(xmlAttr *attr, const char *szDefault)
unsigned int icUInt32Number
void SetText(const icChar *szText, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
Name: refIccMAX::CIccTagMultiLocalizedUnicode::SetText.
icUInt16Number icCountryCode
icUInt16Number icLanguageCode

References CIccUTF16String::c_str(), icGetSigVal(), icXmlAttrValue(), icXmlFindAttr(), and icXmlFindNode().

+ Here is the call graph for this function:

◆ ToXml()

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

Implements CIccTagXml.

Definition at line 1660 of file IccTagXml.cpp.

1661{
1662 std::string xmlbuf;
1663 char data[256];
1664 std::string bufstr;
1665 CIccMultiLocalizedUnicode::iterator i;
1666
1667 if (!m_Strings)
1668 return false;
1669
1670 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
1671 xml += blanks + "<LocalizedText LanguageCountry=\"";
1672 xml += icFixXml(xmlbuf, icGetSigStr(data, (i->m_nLanguageCode<<16) + i->m_nCountryCode));
1673 xml += "\"><![CDATA[";
1674 xml += icFixXml(xmlbuf, icUtf16ToUtf8(bufstr, i->GetBuf(), i->GetLength()));
1675 xml += "]]></LocalizedText>\n";
1676 }
1677 return true;
1678}
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)
CIccMultiLocalizedUnicode * m_Strings

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

+ Here is the call graph for this function:

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