IccMAX 2.1.27
Color Profile Tools
Loading...
Searching...
No Matches
CIccTagXmlUtf16Text Class Reference

#include <IccTagXml.h>

+ Inheritance diagram for CIccTagXmlUtf16Text:
+ Collaboration diagram for CIccTagXmlUtf16Text:

Public Member Functions

 CIccTagXmlUtf16Text ()
 
 CIccTagXmlUtf16Text (const CIccTagXmlUtf16Text &ITT)
 
virtual ~CIccTagXmlUtf16Text ()
 
icUInt32Number Capacity () const
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
icUChar16GetBuffer (icUInt32Number nSize)
 
virtual const char * GetClassName () const
 
virtual const char * GetExtClassName () const
 
virtual const char * GetExtDerivedClassName () const
 
virtual IIccExtensionTagGetExtension ()
 
icUInt32Number GetLength () const
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
const icUChar16GetText () const
 
const icCharGetText (std::string &bufStr) const
 
virtual icTagTypeSignature GetType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
virtual CIccTagNewCopy () const
 
virtual bool ParseXml (xmlNode *pNode, std::string &parseStr)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
void Release ()
 
void SetText (const icChar *szText)
 
void SetText (const icUChar *szText)
 
void SetText (const icUChar16 *szText)
 
virtual bool ToXml (std::string &xml, std::string blanks="")
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

icUInt32Number m_nBufSize
 
icUChar16m_szText
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccTagXmlUtf16Text() [1/2]

CIccTagXmlUtf16Text::CIccTagXmlUtf16Text ( )
inline
171: CIccTagUtf16Text() {}
CIccTagUtf16Text()
Definition IccTagBasic.cpp:1511

References CIccTagUtf16Text::CIccTagUtf16Text().

+ Here is the call graph for this function:

◆ CIccTagXmlUtf16Text() [2/2]

CIccTagXmlUtf16Text::CIccTagXmlUtf16Text ( const CIccTagXmlUtf16Text ITT)
inline
172: CIccTagUtf16Text(ITT) {}

References CIccTagUtf16Text::CIccTagUtf16Text().

Referenced by NewCopy().

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

◆ ~CIccTagXmlUtf16Text()

virtual CIccTagXmlUtf16Text::~CIccTagXmlUtf16Text ( )
inlinevirtual
173{}

Member Function Documentation

◆ Capacity()

icUInt32Number CIccTagUtf16Text::Capacity ( ) const
inlineinherited
463{ return m_nBufSize; }
icUInt32Number m_nBufSize
Definition IccTagBasic.h:469

References CIccTagUtf16Text::m_nBufSize.

◆ Create()

CIccTag * CIccTag::Create ( icTagTypeSignature  sig)
staticinherited

Name: CIccTag::Create

Purpose: This is a static tag creator based upon tag signature type

Args: sig = tag type signature

Return: Pointer to Allocated tag

144{
145 return CIccTagCreator::CreateTag(sig);
146}
static CIccTag * CreateTag(icTagTypeSignature tagTypeSig)
Definition IccTagFactory.h:279

References CIccTagCreator::CreateTag().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccTagStruct::LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().

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

◆ Describe()

void CIccTagUtf16Text::Describe ( std::string &  sDescription,
int  nVerboseness 
)
virtualinherited

Name: CIccTagUtf16Text::Describe

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

1685{
1686 sDescription += "UTF16 Length = ";
1687 if (m_szText && *m_szText) {
1688 char buf[40];
1689 sprintf(buf, "%d bytes\n", m_nBufSize);
1690 sDescription += buf;
1691 }
1692 else
1693 sDescription += "0 (NULL)";
1694
1695 if (nVerboseness > 25) {
1696 sDescription += "\"";
1697 if (m_szText && *m_szText) {
1698 std::string s;
1699 if ((nVerboseness > 50) || (m_nBufSize < BRIEF_STRING_SIZE)) {
1700 // output entire string if short or doing verbose
1701 sDescription += GetText(s);
1702 }
1703 else {
1704 // copy just first part of string to keep nVerboseness under control
1705 char buf[BRIEF_STRING_SIZE + 1];
1706 strncpy(buf, GetText(s), BRIEF_STRING_SIZE);
1707 buf[BRIEF_STRING_SIZE] = '\0'; // ensure NULL termination
1708 sDescription += buf;
1709 sDescription += "\n... <!truncated!>";
1710 }
1711 }
1712 sDescription += "\"\n";
1713 }
1714
1715}
#define BRIEF_STRING_SIZE
Definition IccTagBasic.cpp:103
const icUChar16 * GetText() const
Definition IccTagBasic.h:451
icUChar16 * m_szText
Definition IccTagBasic.h:468

References CIccTagUtf16Text::GetText(), CIccTagUtf16Text::m_nBufSize, and CIccTagUtf16Text::m_szText.

+ Here is the call graph for this function:

◆ DetachIO()

virtual void CIccTag::DetachIO ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

183{}

◆ GetBuffer()

icUChar16 * CIccTagUtf16Text::GetBuffer ( icUInt32Number  nSize)
inherited

Name: CIccTagUtf16Text::GetBuffer

Purpose: This function allocates room and returns pointer to data buffer to put string into

Args: nSize = Requested size of data buffer.

Return: The utf16 character buffer array

1841{
1842 if (m_nBufSize < nSize) {
1843 m_szText = (icUChar16*)icRealloc(m_szText, (nSize+1)*sizeof(icUChar16));
1844
1845 m_szText[nSize] = 0;
1846
1847 m_nBufSize = nSize;
1848 }
1849
1850 return m_szText;
1851}
unsigned short icUChar16
Definition IccDefs.h:112
ICCPROFLIB_API void * icRealloc(void *ptr, size_t size)
Definition IccUtil.cpp:111

References icRealloc(), CIccTagUtf16Text::m_nBufSize, and CIccTagUtf16Text::m_szText.

Referenced by CIccTagUtf16Text::Read(), CIccTagUtf16Text::SetText(), and CIccTagUtf16Text::SetText().

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

◆ GetClassName()

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

Reimplemented from CIccTagUtf16Text.

177{return "CIccTagXmlUtf16Text"; }

◆ GetExtClassName()

virtual const char * CIccTagXml::GetExtClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

79{ return "CIccTagXml"; }

Referenced by icProfDescToXml(), and icXmlParseProfDesc().

+ Here is the caller graph for this function:

◆ GetExtDerivedClassName()

virtual const char * CIccTagXml::GetExtDerivedClassName ( ) const
inlinevirtualinherited

Implements IIccExtensionTag.

Reimplemented in CIccCurveXml.

80{ return ""; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTagXmlUtf16Text::GetExtension ( )
inlinevirtual

Reimplemented from CIccTag.

179{return this; }

◆ GetLength()

icUInt32Number CIccTagUtf16Text::GetLength ( ) const
inherited

Name: CIccTagUtf16Text::GetLength

Purpose: Get length of utf16 string

1581{
1583 if (!m_szText || !m_nBufSize)
1584 return 0;
1585
1586 for (n=0; n<m_nBufSize && m_szText[n]; n++);
1587
1588 return n;
1589}
unsigned long icUInt32Number
Definition icProfileHeader.h:262

References CIccTagUtf16Text::m_nBufSize, and CIccTagUtf16Text::m_szText.

Referenced by CIccTagUtf16Text::GetText(), CIccTagUtf16Text::Release(), and CIccTagUtf16Text::Write().

+ Here is the caller graph for this function:

◆ GetTagArrayType()

virtual icArraySignature CIccTag::GetTagArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagArray.

133{ return icSigUndefinedArray; }
@ icSigUndefinedArray
Definition icProfileHeader.h:617

References icSigUndefinedArray.

Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ GetTagStructType()

virtual icStructSignature CIccTag::GetTagStructType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagStruct.

132{ return icSigUndefinedStruct; }
@ icSigUndefinedStruct
Definition icProfileHeader.h:606

References icSigUndefinedStruct.

Referenced by icGetTagStructHandlerOfType(), CIccArrayColorantInfo::Validate(), and CIccArrayNamedColor::Validate().

+ Here is the caller graph for this function:

◆ GetText() [1/2]

const icUChar16 * CIccTagUtf16Text::GetText ( ) const
inlineinherited
451{ return m_szText; }

References CIccTagUtf16Text::m_szText.

◆ GetText() [2/2]

const icChar * CIccTagUtf16Text::GetText ( std::string &  buf) const
inherited

Name: CIccTagUtf16Text::GetText

Purpose: Allows text data associated with the tag to be fetched.

Args: buf - buffer to put tag data into. Returns: buf.c_str()

1729{
1730 icUtf8Vector str;
1731
1733
1734 buf.clear();
1735 icUtf8Vector::iterator c;
1736 c=str.begin();
1737 if (str.size()>2 && (str[0]==0xff && str[1]==0xfe)) {
1738 c++; c++;
1739 }
1740 for (; c!=str.end(); c++)
1741 buf.push_back(*c);
1742
1743 return buf.c_str();
1744}
@ lenientConversion
Definition IccConvertUTF.h:127
icUtfConversionResult icConvertUTF16toUTF8(const UTF16 **sourceStart, const UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, icUtfConversionFlags flags)
Definition IccConvertUTF.cpp:299
icUInt32Number GetLength() const
Definition IccTagBasic.cpp:1580

References CIccTagUtf16Text::GetLength(), icConvertUTF16toUTF8(), lenientConversion, and CIccTagUtf16Text::m_szText.

Referenced by CIccTagUtf16Text::Describe(), icGetTagText(), and ToXml().

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

◆ GetType()

virtual icTagTypeSignature CIccTagUtf16Text::GetType ( ) const
inlinevirtualinherited

Function: GetType()

Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.

Reimplemented from CIccTag.

442{ return icSigUtf16TextType; }
@ icSigUtf16TextType
Definition icProfileHeader.h:575

References icSigUtf16TextType.

Referenced by CIccTagUtf16Text::Write().

+ Here is the caller graph for this function:

◆ IsArrayType()

virtual bool CIccTag::IsArrayType ( )
inlinevirtualinherited

Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.

135{ return false; }

Referenced by MyTagDialog::MyTagDialog(), and DumpTag().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccTag::IsMBBType ( )
inlinevirtualinherited

Reimplemented in CIccMBB.

136{ return false; } //If true then CIccTag can be cast as an CIccMBB

Referenced by CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ IsNumArrayType()

virtual bool CIccTag::IsNumArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.

137{ return false;} //If true then CIccTag can be cast as a CIccTagNumArray

Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), CIccTagStruct::GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccTag::IsSupported ( )
inlinevirtualinherited

Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes. By Default inherited classes are supported. Unknown tag types are not supported.

Returns true if tag type is supported.

Reimplemented in CIccTagUnknown, CIccTagEmbeddedProfile, and CIccTagMultiProcessElement.

153{ return true; }

◆ NewCopy()

virtual CIccTag * CIccTagXmlUtf16Text::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 CIccTagUtf16Text.

175{return new CIccTagXmlUtf16Text(*this);}
CIccTagXmlUtf16Text()
Definition IccTagXml.h:171

References CIccTagXmlUtf16Text().

+ Here is the call graph for this function:

◆ ParseXml()

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

Implements CIccTagXml.

326{
327 std::string str = icXmlParseTextString(pNode, parseStr, false);
328
329 if (!str.empty()){
330 SetText(str.c_str());
331 return true;
332 }
333 return false;
334}
static std::string icXmlParseTextString(xmlNode *pNode, std::string &parseStr, bool bConvert=true)
Definition IccTagXml.cpp:180
void SetText(const icUChar16 *szText)
Definition IccTagBasic.cpp:1757

References icXmlParseTextString(), and CIccTagUtf16Text::SetText().

+ Here is the call graph for this function:

◆ Read() [1/2]

bool CIccTagUtf16Text::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtualinherited

Name: CIccTagUtf16Text::Read

Purpose: Read in a text type tag into a data block

Args: size - # of bytes in tag, pIO - IO object to read tag from

Return: true = successful, false = failure

Reimplemented from CIccTag.

1606{
1608
1609 if (size<sizeof(icTagTypeSignature) || !pIO) {
1610 m_szText[0] = '\0';
1611 return false;
1612 }
1613
1614 if (!pIO->Read32(&sig))
1615 return false;
1616
1617 if (!pIO->Read32(&m_nReserved))
1618 return false;
1619
1620 icUInt32Number nSize = (size - sizeof(icTagTypeSignature) - sizeof(icUInt32Number))/sizeof(icUChar16);
1621
1622 icUChar16 *pBuf = GetBuffer(nSize);
1623
1624 if (nSize) {
1625 if (pIO->Read16(pBuf, nSize) != (icInt32Number)nSize) {
1626 return false;
1627 }
1628 }
1629
1630 Release();
1631
1632 return true;
1633}
long icInt32Number
Definition icProfileHeader.h:291
icTagTypeSignature
Definition icProfileHeader.h:526
icInt32Number Read16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:114
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
icUInt32Number m_nReserved
Definition IccTagBasic.h:235
icUChar16 * GetBuffer(icUInt32Number nSize)
Definition IccTagBasic.cpp:1840
void Release()
Definition IccTagBasic.cpp:1861

References CIccTagUtf16Text::GetBuffer(), CIccTag::m_nReserved, CIccTagUtf16Text::m_szText, CIccIO::Read16(), CIccIO::Read32(), and CIccTagUtf16Text::Release().

+ Here is the call graph for this function:

◆ Read() [2/2]

virtual bool CIccTag::Read ( icUInt32Number  size,
CIccIO pIO,
CIccProfile pProfile 
)
inlinevirtualinherited

Function: Read(size, pIO) - Read tag from file. Each derived tag will implement it's own Read() function.

Parameter(s): size - number of bytes in tag including the type signature. pIO - IO object used to read in tag. The IO object should already be initialized to point to the begining of the tag.

Returns true if Read is successful.

Reimplemented in CIccTagEmbeddedProfile.

197{ return Read(size, pIO); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagBasic.h:167

References CIccTag::Read().

+ Here is the call graph for this function:

◆ ReadAll()

virtual bool CIccTag::ReadAll ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

Reimplemented in CIccTagEmbeddedProfile.

175{ return true; }

◆ Release()

void CIccTagUtf16Text::Release ( )
inherited

Name: CIccTagUtf16Text::Release

Purpose: This will resize the buffer to fit the zero terminated string in the buffer.

1862{
1863 icUInt32Number nSize = GetLength()+1;
1864
1865 if (nSize < m_nBufSize-1) {
1866 m_szText=(icUChar16*)icRealloc(m_szText, (nSize+1)*sizeof(icUChar16));
1867 m_nBufSize = nSize+1;
1868 }
1869}

References CIccTagUtf16Text::GetLength(), icRealloc(), CIccTagUtf16Text::m_nBufSize, and CIccTagUtf16Text::m_szText.

Referenced by CIccTagUtf16Text::Read(), CIccTagUtf16Text::SetText(), and CIccTagUtf16Text::SetText().

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

◆ SetText() [1/3]

void CIccTagUtf16Text::SetText ( const icChar szText)
inlineinherited
455{ SetText((icUChar*)szText); }
unsigned char icUChar
Definition IccDefs.h:111

References CIccTagUtf16Text::SetText().

Referenced by ParseXml().

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

◆ SetText() [2/3]

void CIccTagUtf16Text::SetText ( const icUChar szText)
inherited

Name: CIccTagUtf16Text::SetText

Purpose: Allows text data associated with the tag to be set.

Args: szText - zero terminated string to put in tag

1786{
1787 if (!szText) {
1788 icUChar16 c=0;
1789 SetText(&c);
1790 return;
1791 }
1792
1793 icUtf16Vector str;
1794 icConvertUTF8toUTF16(szText, szText+strlen((icChar*)szText)+1, str, lenientConversion);
1795
1796 int pos = 0;
1797 if (str[0]==0xfeff) {
1798 pos = 1;
1799 }
1800
1801 icUInt32Number nSize = (icUInt32Number)(str.size()-pos);
1802 icUChar16 *szBuf = GetBuffer(nSize);
1803
1804 if (nSize)
1805 memcpy(m_szText, &str[pos], nSize*sizeof(icUChar));
1806 Release();
1807}
char icChar
Definition IccDefs.h:110
icUtfConversionResult icConvertUTF8toUTF16(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, icUtfConversionFlags flags)
Definition IccConvertUTF.cpp:489

References CIccTagUtf16Text::GetBuffer(), icConvertUTF8toUTF16(), lenientConversion, CIccTagUtf16Text::m_szText, CIccTagUtf16Text::Release(), and CIccTagUtf16Text::SetText().

Referenced by CIccTagUtf16Text::SetText().

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

◆ SetText() [3/3]

void CIccTagUtf16Text::SetText ( const icUChar16 szText)
inherited

Name: CIccTagUtf16Text::SetText

Purpose: Allows text data associated with the tag to be set.

Args: szText - zero terminated string to put in tag

1758{
1759 if (!szText) {
1760 icUChar16 c=0;
1761 SetText(&c);
1762 return;
1763 }
1764
1766 for (n=0; szText[n]; n++);
1767
1768 icUInt32Number len=n + 1;
1769 icUChar16 *szBuf = GetBuffer(len);
1770
1771 memcpy(szBuf, szText, len*sizeof(icUChar16));
1772 Release();
1773}

References CIccTagUtf16Text::GetBuffer(), CIccTagUtf16Text::Release(), and CIccTagUtf16Text::SetText().

Referenced by CIccTagUtf16Text::CIccTagUtf16Text(), CIccTagUtf16Text::operator=(), CIccTagUtf16Text::operator=(), CIccTagUtf16Text::SetText(), and CIccTagUtf16Text::SetText().

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

◆ ToXml()

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

Implements CIccTagXml.

175{
176 std::string buf;
177 return icXmlDumpTextData(xml, blanks, GetText(buf), false);
178}
static bool icXmlDumpTextData(std::string &xml, std::string blanks, const char *szText, bool bConvert=true)
Definition IccTagXml.cpp:124

References CIccTagUtf16Text::GetText(), and icXmlDumpTextData().

+ Here is the call graph for this function:

◆ Validate()

icValidateStatus CIccTagUtf16Text::Validate ( std::string  sigPath,
std::string &  sReport,
const CIccProfile pProfile = NULL 
) const
virtualinherited

Name: CIccTagUtf16Text::Validate

Purpose: Check tag data validity.

Args: sig = signature of tag being validated, sReport = String to add report information to

Return: icValidateStatusOK if valid, or other error status.

Reimplemented from CIccTag.

1887{
1888 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
1889
1890 CIccInfo Info;
1891 std::string sSigPathName = Info.GetSigPathName(sigPath);
1892
1893 if (!m_nBufSize) {
1894 sReport += icMsgValidateWarning;
1895 sReport += sSigPathName;
1896 sReport += " - Empty Tag.\n";
1898 }
1899
1900 return rv;
1901}
icValidateStatus
Definition IccDefs.h:119
@ icValidateWarning
Definition IccDefs.h:121
ICCPROFLIB_API const char * icMsgValidateWarning
Definition IccUtil.cpp:90
ICCPROFLIB_API icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Definition IccUtil.cpp:244
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Definition IccTagBasic.cpp:164

References CIccInfo::GetSigPathName(), icMaxStatus(), icMsgValidateWarning, icValidateWarning, CIccTagUtf16Text::m_nBufSize, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagUtf16Text::Write ( CIccIO pIO)
virtualinherited

Name: CIccTagUtf16Text::Write

Purpose: Write a text type tag to a file

Args: pIO - The IO object to write tag to.

Return: true = succesful, false = failure

Reimplemented from CIccTag.

1649{
1651
1652 if (!pIO)
1653 return false;
1654
1655 if (!pIO->Write32(&sig))
1656 return false;
1657
1658 if (!pIO->Write32(&m_nReserved))
1659 return false;
1660
1661 if (!m_szText)
1662 return false;
1663
1664 icUInt32Number nSize = GetLength();
1665
1666 if (nSize) {
1667 if (pIO->Write16(m_szText, nSize) != (icInt32Number)nSize)
1668 return false;
1669 }
1670
1671 return true;
1672}
icInt32Number Write16(void *pBuf16, icInt32Number nNum=1)
Definition IccIO.cpp:122
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152
virtual icTagTypeSignature GetType() const
Definition IccTagBasic.h:442

References CIccTagUtf16Text::GetLength(), CIccTagUtf16Text::GetType(), CIccTag::m_nReserved, CIccTagUtf16Text::m_szText, CIccIO::Write16(), and CIccIO::Write32().

+ Here is the call graph for this function:

Field Documentation

◆ m_nBufSize

◆ m_nReserved

icUInt32Number CIccTag::m_nReserved
inherited

Referenced by CIccTag::CIccTag(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::operator=(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccTagText::Read(), CIccTagUtf8Text::Read(), CIccTagZipUtf8Text::Read(), CIccTagUtf16Text::Read(), CIccTagTextDescription::Read(), CIccTagSignature::Read(), CIccTagNamedColor2::Read(), CIccTagXYZ::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagSparseMatrixArray::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), CIccTagViewingConditions::Read(), CIccTagProfileSeqDesc::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagStruct::Read(), CIccTagArray::Read(), CIccTagDict::Read(), CIccTagCurve::Read(), CIccTagParametricCurve::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagMultiProcessElement::Read(), CIccTagProfileSequenceId::Read(), CIccTagEmbeddedProfile::Read(), CIccTag::Validate(), CIccTagText::Write(), CIccTagUtf8Text::Write(), CIccTagZipUtf8Text::Write(), CIccTagUtf16Text::Write(), CIccTagTextDescription::Write(), CIccTagSignature::Write(), CIccTagNamedColor2::Write(), CIccTagXYZ::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagSparseMatrixArray::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), CIccTagViewingConditions::Write(), CIccTagProfileSeqDesc::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagStruct::Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().

◆ m_szText


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