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

#include <IccTagDict.h>

+ Collaboration diagram for CIccDictEntry:

Public Member Functions

 CIccDictEntry ()
 
 CIccDictEntry (const CIccDictEntry &IDE)
 
virtual ~CIccDictEntry ()
 
void Describe (std::string &sDescription, int nVerboseness)
 
std::wstring & GetName ()
 
CIccTagMultiLocalizedUnicodeGetNameLocalized ()
 
std::wstring GetValue ()
 
CIccTagMultiLocalizedUnicodeGetValueLocalized ()
 
bool IsValueSet ()
 
CIccDictEntryoperator= (const CIccDictEntry &IDE)
 
icUInt32Number PosRecSize ()
 
bool SetNameLocalized (CIccTagMultiLocalizedUnicode *pNameLocalized)
 
bool SetValue (std::wstring sValue)
 
bool SetValueLocalized (CIccTagMultiLocalizedUnicode *pValueLocalized)
 
void UnsetValue ()
 
std::wstring::const_iterator ValueBegin ()
 
std::wstring::const_iterator ValueEnd ()
 

Protected Attributes

bool m_bValueSet
 
CIccTagMultiLocalizedUnicodem_pNameLocalized
 
CIccTagMultiLocalizedUnicodem_pValueLocalized
 
std::wstring * m_sName
 
std::wstring * m_sValue
 

Detailed Description

Data Class: CIccDictEntry

Purpose: Implementation of a dictionary entry with optional localization of name and value

Constructor & Destructor Documentation

◆ CIccDictEntry() [1/2]

CIccDictEntry::CIccDictEntry ( )

Name: CIccDictEntry::CIccDictEntry

Purpose:

Args:

Return:

107{
108 m_sName = new std::wstring();
109 m_sValue = new std::wstring();
110 m_pNameLocalized = NULL;
111 m_pValueLocalized = NULL;
112 m_bValueSet = false;
113}
std::wstring * m_sValue
Definition IccTagDict.h:131
std::wstring * m_sName
Definition IccTagDict.h:130
bool m_bValueSet
Definition IccTagDict.h:132
CIccTagMultiLocalizedUnicode * m_pValueLocalized
Definition IccTagDict.h:135
CIccTagMultiLocalizedUnicode * m_pNameLocalized
Definition IccTagDict.h:134

References m_bValueSet, m_pNameLocalized, m_pValueLocalized, m_sName, and m_sValue.

Referenced by CIccTagXmlDict::ParseXml(), and CIccTagDict::Read().

+ Here is the caller graph for this function:

◆ CIccDictEntry() [2/2]

CIccDictEntry::CIccDictEntry ( const CIccDictEntry IDE)

Name: CIccDictEntry::CIccDictEntry

Purpose:

Args:

Return:

126{
127 m_sName = new std::wstring();
128 m_sValue = new std::wstring();
129
130 *m_sName = *IDE.m_sName;
132 *m_sValue = *IDE.m_sValue;
133
134 if (IDE.m_pNameLocalized) {
136 }
137 else
138 m_pNameLocalized = NULL;
139
140 if (IDE.m_pValueLocalized) {
142 }
143 else
144 m_pValueLocalized = NULL;
145}
Definition IccTagBasic.h:1229
virtual CIccTag * NewCopy() const
Definition IccTagBasic.h:1234

References m_bValueSet, m_pNameLocalized, m_pValueLocalized, m_sName, m_sValue, and CIccTagMultiLocalizedUnicode::NewCopy().

Referenced by CIccTagDict::CIccTagDict(), and CIccTagDict::operator=().

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

◆ ~CIccDictEntry()

CIccDictEntry::~CIccDictEntry ( )
virtual

Name: CIccDictEntry::~CIccDictEntry

Purpose:

Args:

Return:

198{
199 delete m_sName;
200 delete m_sValue;
201 delete m_pNameLocalized;
202 delete m_pValueLocalized;
203}

References m_pNameLocalized, m_pValueLocalized, m_sName, and m_sValue.

Member Function Documentation

◆ Describe()

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

Name: CIccDictEntry::Describe

Purpose:

Args:

Return:

216{
217 std::wstring ws;
218
219 //setup converter
220 std::wstring_convert<convert_type, wchar_t> converter;
221
222 sDescription += "BEGIN DICT_ENTRY\nName=";
223 ws.assign(m_sName->begin(), m_sName->end());
224 sDescription += converter.to_bytes(ws);
225 sDescription += "\nValue=";
226 ws.assign(m_sValue->begin(), m_sValue->end());
227 sDescription += converter.to_bytes(ws);
228 sDescription += "\n";
229
230 if (m_pNameLocalized) {
231 sDescription += "BEGIN NAME_LOCALIZATION\n";
232 m_pNameLocalized->Describe(sDescription, nVerboseness);
233 sDescription += "END NAME_LOCALIZATION\n";
234 }
235 if (m_pValueLocalized) {
236 sDescription += "BEGIN VALUE_LOCALIZATION\n";
237 m_pValueLocalized->Describe(sDescription, nVerboseness);
238 sDescription += "END VALUE_LOCALIZATION\n";
239 }
240 sDescription += "END DICT_ENTRY\n";
241}
virtual void Describe(std::string &sDescription, int nVerboseness)
Definition IccTagBasic.cpp:7598

References CIccTagMultiLocalizedUnicode::Describe(), m_pNameLocalized, m_pValueLocalized, m_sName, and m_sValue.

Referenced by CIccTagDict::Describe().

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

◆ GetName()

std::wstring & CIccDictEntry::GetName ( )
inline
109{ return *m_sName; }

References m_sName.

Referenced by CIccTagDict::AreNamesNonzero(), CIccTagDict::AreNamesUnique(), CIccTagDict::Get(), CIccTagXmlDict::ParseXml(), CIccTagDict::Read(), CIccTagDict::Remove(), CIccTagDict::Set(), CIccTagDict::SetNameLocalized(), CIccTagDict::SetValueLocalized(), CIccTagXmlDict::ToXml(), and CIccTagDict::Write().

+ Here is the caller graph for this function:

◆ GetNameLocalized()

CIccTagMultiLocalizedUnicode * CIccDictEntry::GetNameLocalized ( )
inline
118{ return m_pNameLocalized; }

References m_pNameLocalized.

Referenced by CIccTagDict::GetNameLocalized(), CIccTagXmlDict::ParseXml(), CIccTagXmlDict::ToXml(), and CIccTagDict::Write().

+ Here is the caller graph for this function:

◆ GetValue()

std::wstring CIccDictEntry::GetValue ( )
inline
114{ return *m_sValue; }

References m_sValue.

Referenced by CIccTagDict::GetValue(), CIccTagDict::Set(), and CIccTagXmlDict::ToXml().

+ Here is the caller graph for this function:

◆ GetValueLocalized()

CIccTagMultiLocalizedUnicode * CIccDictEntry::GetValueLocalized ( )
inline
119{ return m_pValueLocalized; }

References m_pValueLocalized.

Referenced by CIccTagDict::GetValueLocalized(), CIccTagXmlDict::ParseXml(), CIccTagXmlDict::ToXml(), and CIccTagDict::Write().

+ Here is the caller graph for this function:

◆ IsValueSet()

bool CIccDictEntry::IsValueSet ( )
inline
115{ return m_bValueSet; }

References m_bValueSet.

Referenced by CIccTagDict::GetValue(), CIccTagDict::Set(), CIccTagXmlDict::ToXml(), and CIccTagDict::Write().

+ Here is the caller graph for this function:

◆ operator=()

CIccDictEntry & CIccDictEntry::operator= ( const CIccDictEntry IDE)

Name: CIccDictEntry::operator=

Purpose:

Args:

Return:

158{
159 if (&IDE == this)
160 return *this;
161
163 delete m_pNameLocalized;
164
166 delete m_pValueLocalized;
167
168 *m_sName = *IDE.m_sName;
170 *m_sValue = *IDE.m_sValue;
171
172 if (IDE.m_pNameLocalized) {
174 }
175 else
176 m_pNameLocalized = NULL;
177
178 if (IDE.m_pValueLocalized) {
180 }
181 else
182 m_pValueLocalized = NULL;
183
184 return *this;
185}

References m_bValueSet, m_pNameLocalized, m_pValueLocalized, m_sName, m_sValue, and CIccTagMultiLocalizedUnicode::NewCopy().

+ Here is the call graph for this function:

◆ PosRecSize()

icUInt32Number CIccDictEntry::PosRecSize ( )

Name: CIccDictEntry::PosRecSize

Purpose:

Args:

Return:

255{
257 return 32;
259 return 24;
260 return 16;
261}

References m_pNameLocalized, and m_pValueLocalized.

Referenced by CIccTagDict::MaxPosRecSize().

+ Here is the caller graph for this function:

◆ SetNameLocalized()

bool CIccDictEntry::SetNameLocalized ( CIccTagMultiLocalizedUnicode pNameLocalized)

Name: CIccDictEntry::SetNameLocalized

Purpose:

Args:

Return:

284{
285 bool rv;
286
287 if (m_pNameLocalized) {
288 delete m_pNameLocalized;
289 rv = true;
290 }
291 else
292 rv = false;
293
294 m_pNameLocalized = pNameLocalized;
295
296 return rv;
297}

References m_pNameLocalized.

Referenced by CIccTagXmlDict::ParseXml(), CIccTagDict::Read(), and CIccTagDict::SetNameLocalized().

+ Here is the caller graph for this function:

◆ SetValue()

bool CIccDictEntry::SetValue ( std::wstring  sValue)
265{
266 bool rv = m_bValueSet && !m_sValue->empty();
267
268 *m_sValue = sValue;
269 m_bValueSet = true;
270 return rv;
271}

References m_bValueSet, and m_sValue.

Referenced by CIccTagXmlDict::ParseXml(), CIccTagDict::Read(), and CIccTagDict::Set().

+ Here is the caller graph for this function:

◆ SetValueLocalized()

bool CIccDictEntry::SetValueLocalized ( CIccTagMultiLocalizedUnicode pValueLocalized)

Name: CIccDictEntry::SetValueLocalized

Purpose:

Args:

Return:

311{
312 bool rv;
313
314 if (m_pValueLocalized) {
315 delete m_pValueLocalized;
316 rv = true;
317 }
318 else
319 rv = false;
320
321 m_pValueLocalized = pValueLocalized;
322
323 return rv;
324}

References m_pValueLocalized.

Referenced by CIccTagXmlDict::ParseXml(), CIccTagDict::Read(), and CIccTagDict::SetValueLocalized().

+ Here is the caller graph for this function:

◆ UnsetValue()

void CIccDictEntry::UnsetValue ( )
inline
121{ m_sValue->clear(); m_bValueSet = false; }

References m_bValueSet, and m_sValue.

Referenced by CIccTagDict::Set().

+ Here is the caller graph for this function:

◆ ValueBegin()

std::wstring::const_iterator CIccDictEntry::ValueBegin ( )
inline
111{return m_sValue->begin();}

References m_sValue.

Referenced by CIccTagDict::Write().

+ Here is the caller graph for this function:

◆ ValueEnd()

std::wstring::const_iterator CIccDictEntry::ValueEnd ( )
inline
112{return m_sValue->end();}

References m_sValue.

Referenced by CIccTagDict::Write().

+ Here is the caller graph for this function:

Field Documentation

◆ m_bValueSet

bool CIccDictEntry::m_bValueSet
protected

◆ m_pNameLocalized

◆ m_pValueLocalized

◆ m_sName

std::wstring* CIccDictEntry::m_sName
protected

◆ m_sValue

std::wstring* CIccDictEntry::m_sValue
protected

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