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

#include <IccTagProfSeqId.h>

+ Collaboration diagram for CIccProfileIdDesc:

Public Member Functions

 CIccProfileIdDesc ()
 
 CIccProfileIdDesc (CIccProfile &profile)
 
 CIccProfileIdDesc (const CIccProfileIdDesc &pid)
 
 CIccProfileIdDesc (icProfileID id, CIccTagMultiLocalizedUnicode desc)
 
void Describe (std::string &sDescription, int nVerboseness)
 
CIccProfileIdDescoperator= (const CIccProfileIdDesc &pid)
 
bool Read (icUInt32Number size, CIccIO *pIO)
 
icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
bool Write (CIccIO *pIO)
 

Data Fields

CIccTagMultiLocalizedUnicode m_desc
 
icProfileID m_profileID
 

Detailed Description

Constructor & Destructor Documentation

◆ CIccProfileIdDesc() [1/4]

CIccProfileIdDesc::CIccProfileIdDesc ( )

Name: sampleICC::CIccProfileIdDesc::CIccProfileIdDesc

Purpose:

Args:

Return:

96{
97 memset(&m_profileID, 0, sizeof(m_profileID));
98}
icProfileID m_profileID
Definition IccTagProfSeqId.h:102

References m_profileID.

◆ CIccProfileIdDesc() [2/4]

CIccProfileIdDesc::CIccProfileIdDesc ( CIccProfile profile)

Name: sampleICC::CIccProfileIdDesc::CIccProfileIdDesc

Purpose:

Args: CIccProfile &profile

Return:

115{
116 m_profileID = profile.m_Header.profileID;
117 CIccTag *pTag = profile.FindTag(icSigProfileDescriptionTag);
118
119 if (pTag) {
120 switch (pTag->GetType()) {
122 {
124 }
125 break;
126
128 {
130
131 m_desc.SetText(pText->GetText());
132 }
133 break;
134
135 case icSigTextType:
136 {
137 CIccTagText *pText = (CIccTagText*)pTag;
138
139 m_desc.SetText(pText->GetText());
140 }
141 break;
142
143 default:
144 break;
145 }
146 }
147}
@ icSigMultiLocalizedUnicodeType
Definition icProfileHeader.h:549
@ icSigTextDescriptionType
Definition icProfileHeader.h:566
@ icSigTextType
Definition icProfileHeader.h:565
@ icSigProfileDescriptionTag
Definition icProfileHeader.h:452
Definition IccTagBasic.h:108
virtual icTagTypeSignature GetType() const
Definition IccTagBasic.h:131
Definition IccTagBasic.h:284
const icChar * GetText() const
Definition IccTagBasic.h:300
Definition IccTagBasic.h:481
const icChar * GetText() const
Definition IccTagBasic.h:497
Definition IccTagBasic.h:1229
void SetText(const icChar *szText, icLanguageCode nLanguageCode=icLanguageCodeEnglish, icCountryCode nRegionCode=icCountryCodeUSA)
Definition IccTagBasic.cpp:7719
CIccTagMultiLocalizedUnicode m_desc
Definition IccTagProfSeqId.h:101

References CIccTagText::GetText(), CIccTagTextDescription::GetText(), CIccTag::GetType(), icSigMultiLocalizedUnicodeType, icSigProfileDescriptionTag, icSigTextDescriptionType, icSigTextType, m_desc, m_profileID, CIccTagMultiLocalizedUnicode::operator=(), icHeader::profileID, and CIccTagMultiLocalizedUnicode::SetText().

Referenced by CIccTagProfileSequenceId::AddProfileDescription().

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

◆ CIccProfileIdDesc() [3/4]

CIccProfileIdDesc::CIccProfileIdDesc ( icProfileID  id,
CIccTagMultiLocalizedUnicode  desc 
)

Name: sampleICC::CIccProfileIdDesc::CIccProfileIdDesc

Purpose:

Args: icProfileID id CIccMultiLocalizedUnicode desc

Return:

165{
166 m_profileID = id;
167 m_desc = desc;
168}

References m_desc, m_profileID, and CIccTagMultiLocalizedUnicode::operator=().

+ Here is the call graph for this function:

◆ CIccProfileIdDesc() [4/4]

CIccProfileIdDesc::CIccProfileIdDesc ( const CIccProfileIdDesc pid)

Name: sampleICC::CIccProfileIdDesc::CIccProfileIdDesc

Purpose:

Args: const CIccProfileIdDesc &pid

Return:

185{
187 m_desc = pid.m_desc;
188}

References m_desc, m_profileID, and CIccTagMultiLocalizedUnicode::operator=().

+ Here is the call graph for this function:

Member Function Documentation

◆ Describe()

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

Name: sampleICC::CIccProfileIdDesc::Describe

Purpose:

Args: std::string &sDescription

Return: void

230{
231 std::string Dump;
232
233 sDescription += "ProfileID:\n";
234
235 size_t i;
236 char buf[20];
237 for (i=0; i<sizeof(icProfileID); i++) {
238 if (i && i%4==0)
239 sDescription += " ";
240 sprintf(buf, "%02x", m_profileID.ID8[i]);
241 sDescription += buf;
242 }
243 sDescription += "\n";
244
245 sDescription += "Description:\n";
246 m_desc.Describe(sDescription, nVerboseness);
247
248 sDescription += "\n";
249}
icUInt8Number ID8[16]
Definition icProfileHeader.h:2037
Definition icProfileHeader.h:2036
virtual void Describe(std::string &sDescription, int nVerboseness)
Definition IccTagBasic.cpp:7598

References CIccTagMultiLocalizedUnicode::Describe(), icProfileID::ID8, m_desc, and m_profileID.

Referenced by CIccTagProfileSequenceId::Describe().

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

◆ operator=()

CIccProfileIdDesc & CIccProfileIdDesc::operator= ( const CIccProfileIdDesc pid)

Name: sampleICC::CIccProfileIdDesc::operator=

Purpose:

Args: const CIccProfileIdDesc &pid

Return: CIccProfileIdDesc &

205{
206 if (&pid == this)
207 return *this;
208
210 m_desc = pid.m_desc;
211
212 return *this;
213}

References m_desc, m_profileID, and CIccTagMultiLocalizedUnicode::operator=().

+ Here is the call graph for this function:

◆ Read()

bool CIccProfileIdDesc::Read ( icUInt32Number  size,
CIccIO pIO 
)

Name: sampleICC::CIccProfileIdDesc::Read

Purpose:

Args: icUInt32Number size CIccIO *pIO

Return: bool

267{
268 if (sizeof (icProfileID) > size)
269 return false;
270
271 if (pIO->Read8(&m_profileID, sizeof(icProfileID))!=sizeof(icProfileID))
272 return false;
273
274 if (!m_desc.Read(size - sizeof(icProfileID), pIO))
275 return false;
276
277 return true;
278}
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagBasic.cpp:7451

References m_desc, m_profileID, CIccTagMultiLocalizedUnicode::Read(), and CIccIO::Read8().

Referenced by CIccTagProfileSequenceId::Read().

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

◆ Validate()

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

Name: CIccProfileIdDesc::Validate

Purpose:

Args: std::string &sReport

Return: icValidateStatus

317{
318 return m_desc.Validate(sigPath, sReport, pProfile);
319}
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Definition IccTagBasic.cpp:7654

References m_desc, and CIccTagMultiLocalizedUnicode::Validate().

Referenced by CIccTagProfileSequenceId::Validate().

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

◆ Write()

bool CIccProfileIdDesc::Write ( CIccIO pIO)

Name: sampleICC::CIccProfileIdDesc::Write

Purpose:

Args: CIccIO *pIO

Return: bool

295{
296 pIO->Write8(&m_profileID, sizeof(icProfileID));
297 m_desc.Write(pIO);
298
299 return true;
300}
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
virtual bool Write(CIccIO *pIO)
Definition IccTagBasic.cpp:7543

References m_desc, m_profileID, CIccTagMultiLocalizedUnicode::Write(), and CIccIO::Write8().

Referenced by CIccTagProfileSequenceId::Write().

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

Field Documentation

◆ m_desc

◆ m_profileID


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