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

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagUtf16Text:
+ Collaboration diagram for CIccTagUtf16Text:

Public Member Functions

 CIccTagUtf16Text ()
 
 CIccTagUtf16Text (const CIccTagUtf16Text &ITT)
 
virtual ~CIccTagUtf16Text ()
 
icUInt32Number Capacity () const
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
icUChar16GetBuffer (icUInt32Number nSize)
 
virtual const icCharGetClassName () 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
 
CIccTagUtf16Textoperator= (const CIccTagUtf16Text &TextTag)
 
const icUChar16operator= (const icUChar16 *szText)
 
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 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

Class: CIccTagUtf16Text()

Purpose: The utf8TextType ICC tag

Constructor & Destructor Documentation

◆ CIccTagUtf16Text() [1/2]

CIccTagUtf16Text::CIccTagUtf16Text ( )

Name: CIccTagUtf16Text::CIccTagUtf16Text

Purpose: Constructor

1512{
1513 m_szText = (icUChar16*)malloc(1*sizeof(icUChar16));
1514 m_szText[0] = 0;
1515 m_nBufSize = 1;
1516}
unsigned short icUChar16
Definition IccDefs.h:112
icUInt32Number m_nBufSize
Definition IccTagBasic.h:469
icUChar16 * m_szText
Definition IccTagBasic.h:468

References m_nBufSize, and m_szText.

Referenced by CIccTagXmlUtf16Text::CIccTagXmlUtf16Text().

+ Here is the caller graph for this function:

◆ CIccTagUtf16Text() [2/2]

CIccTagUtf16Text::CIccTagUtf16Text ( const CIccTagUtf16Text ITT)

Name: CIccTagUtf16Text::CIccTagUtf16Text

Purpose: Copy Constructor

Args: ITT = The CIccTagText object to be copied

1529{
1530 m_szText = (icUChar16*)malloc(1*sizeof(icUChar16));
1531 m_szText[0] = 0;
1532 m_nBufSize = 1;
1533 SetText(ITT.m_szText);
1534}
void SetText(const icUChar16 *szText)
Definition IccTagBasic.cpp:1757

References m_nBufSize, m_szText, and SetText().

Referenced by CIccTagXmlUtf16Text::CIccTagXmlUtf16Text(), and NewCopy().

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

◆ ~CIccTagUtf16Text()

CIccTagUtf16Text::~CIccTagUtf16Text ( )
virtual

Name: CIccTagUtf16Text::~CIccTagUtf16Text

Purpose: Destructor

1568{
1569 free(m_szText);
1570}

References m_szText.

Member Function Documentation

◆ Capacity()

icUInt32Number CIccTagUtf16Text::Capacity ( ) const
inline
463{ return m_nBufSize; }

References 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 
)
virtual

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

References GetText(), m_nBufSize, and 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)

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}
ICCPROFLIB_API void * icRealloc(void *ptr, size_t size)
Definition IccUtil.cpp:111

References icRealloc(), m_nBufSize, and m_szText.

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

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

◆ GetClassName()

virtual const icChar * CIccTagUtf16Text::GetClassName ( ) const
inlinevirtual

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlUtf16Text.

443{ return "CIccUtf16TagText"; }

◆ GetExtension()

virtual IIccExtensionTag * CIccTag::GetExtension ( )
inlinevirtualinherited

Reimplemented in CIccTagXmlUnknown, CIccTagXmlText, CIccTagXmlUtf8Text, CIccTagXmlZipUtf8Text, CIccTagXmlZipXml, CIccTagXmlUtf16Text, CIccTagXmlTextDescription, CIccTagXmlSignature, CIccTagXmlNamedColor2, CIccTagXmlXYZ, CIccTagXmlChromaticity, CIccTagXmlCicp, CIccTagXmlSparseMatrixArray, CIccTagXmlFixedNum< T, Tsig >, CIccTagXmlNum< T, A, Tsig >, CIccTagXmlFloatNum< T, A, Tsig >, CIccTagXmlMeasurement, CIccTagXmlMultiLocalizedUnicode, CIccTagXmlTagData, CIccTagXmlDateTime, CIccTagXmlColorantOrder, CIccTagXmlColorantTable, CIccTagXmlViewingConditions, CIccTagXmlSpectralDataInfo, CIccTagXmlSpectralViewingConditions, CIccTagXmlProfileSeqDesc, CIccTagXmlResponseCurveSet16, CIccTagXmlCurve, CIccTagXmlParametricCurve, CIccTagXmlSegmentedCurve, CIccTagXmlLutAtoB, CIccTagXmlLutBtoA, CIccTagXmlLut8, CIccTagXmlLut16, CIccTagXmlMultiProcessElement, CIccTagXmlProfileSequenceId, CIccTagXmlDict, CIccTagXmlStruct, CIccTagXmlArray, CIccTagXmlGamutBoundaryDesc, CIccTagXmlEmbeddedHeightImage, CIccTagXmlEmbeddedNormalImage, and CIccTagXmlEmbeddedProfile.

143{return NULL;}

Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ GetLength()

icUInt32Number CIccTagUtf16Text::GetLength ( ) const

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 m_nBufSize, and m_szText.

Referenced by GetText(), Release(), and 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
inline
451{ return m_szText; }

References m_szText.

◆ GetText() [2/2]

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

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 GetLength(), icConvertUTF16toUTF8(), lenientConversion, and m_szText.

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

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

◆ GetType()

virtual icTagTypeSignature CIccTagUtf16Text::GetType ( ) const
inlinevirtual

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

Reimplemented in CIccTagXmlUtf16Text.

439{return new CIccTagUtf16Text(*this);}
CIccTagUtf16Text()
Definition IccTagBasic.cpp:1511

References CIccTagUtf16Text().

+ Here is the call graph for this function:

◆ operator=() [1/2]

CIccTagUtf16Text & CIccTagUtf16Text::operator= ( const CIccTagUtf16Text TextTag)

Name: CIccTagUtf16Text::operator=

Purpose: Copy Operator

Args: TextTag = The CIccTagText object to be copied

1547{
1548 if (&TextTag == this)
1549 return *this;
1550
1551 m_szText = (icUChar16*)malloc(1*sizeof(icUChar16));
1552 m_szText[0] = '\0';
1553 m_nBufSize = 1;
1554 SetText(TextTag.m_szText);
1555
1556 return *this;
1557}

References m_nBufSize, m_szText, and SetText().

+ Here is the call graph for this function:

◆ operator=() [2/2]

const icUChar16 * CIccTagUtf16Text::operator= ( const icUChar16 szText)

Name: *CIccTagUtf16Textoperator=

Purpose: Define assignment operator to associate text with tag.

Args: szText - zero terminated string to put in the tag

Return: A pointer to the string assigned to the tag.

1822{
1823 SetText(szText);
1824 return (icUChar16*)m_szText;
1825}

References m_szText, and SetText().

+ Here is the call graph for this function:

◆ Read() [1/2]

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

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 GetBuffer(), CIccTag::m_nReserved, m_szText, CIccIO::Read16(), CIccIO::Read32(), and 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 ( )

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 GetLength(), icRealloc(), m_nBufSize, and m_szText.

Referenced by Read(), SetText(), and 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)
inline
455{ SetText((icUChar*)szText); }
unsigned char icUChar
Definition IccDefs.h:111

References SetText().

Referenced by CIccTagXmlUtf16Text::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)

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 GetBuffer(), icConvertUTF8toUTF16(), lenientConversion, m_szText, Release(), and SetText().

Referenced by 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)

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 GetBuffer(), Release(), and SetText().

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

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

◆ Validate()

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

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, m_nBufSize, and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagUtf16Text::Write ( CIccIO pIO)
virtual

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 GetLength(), GetType(), CIccTag::m_nReserved, 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(), 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(), 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: