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

Data Class: CIccDictEntry. More...

#include <IccTagDict.h>

+ Collaboration diagram for CIccDictEntry:

Public Member Functions

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

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

Definition at line 96 of file IccTagDict.h.

Constructor & Destructor Documentation

◆ CIccDictEntry() [1/2]

CIccDictEntry::CIccDictEntry ( )

Name: CIccDictEntry::CIccDictEntry.

Purpose:

Args:

Return:

Definition at line 106 of file IccTagDict.cpp.

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.

◆ CIccDictEntry() [2/2]

CIccDictEntry::CIccDictEntry ( const CIccDictEntry & IDE)

Name: CIccDictEntry::CIccDictEntry.

Purpose:

Args:

Return:

Definition at line 125 of file IccTagDict.cpp.

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}
Class: CIccTagMultiLocalizedUnicode.
virtual CIccTag * NewCopy() const
Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

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

+ Here is the call graph for this function:

◆ ~CIccDictEntry()

CIccDictEntry::~CIccDictEntry ( )
virtual

Name: CIccDictEntry::~CIccDictEntry.

Purpose:

Args:

Return:

Definition at line 194 of file IccTagDict.cpp.

195{
196 delete m_sName;
197 delete m_sValue;
198 delete m_pNameLocalized;
199 delete m_pValueLocalized;
200}

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:

Definition at line 212 of file IccTagDict.cpp.

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

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

+ Here is the call graph for this function:

◆ GetName()

std::wstring & CIccDictEntry::GetName ( )
inline

Definition at line 109 of file IccTagDict.h.

109{ return *m_sName; }

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

+ Here is the caller graph for this function:

◆ GetNameLocalized()

CIccTagMultiLocalizedUnicode * CIccDictEntry::GetNameLocalized ( )
inline

Definition at line 118 of file IccTagDict.h.

118{ return m_pNameLocalized; }

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

+ Here is the caller graph for this function:

◆ GetValue()

std::wstring CIccDictEntry::GetValue ( )
inline

Definition at line 114 of file IccTagDict.h.

114{ return *m_sValue; }

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

+ Here is the caller graph for this function:

◆ GetValueLocalized()

CIccTagMultiLocalizedUnicode * CIccDictEntry::GetValueLocalized ( )
inline

Definition at line 119 of file IccTagDict.h.

119{ return m_pValueLocalized; }

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

+ Here is the caller graph for this function:

◆ IsValueSet()

bool CIccDictEntry::IsValueSet ( )
inline

Definition at line 115 of file IccTagDict.h.

115{ return m_bValueSet; }

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

+ Here is the caller graph for this function:

◆ operator=()

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

Name: CIccDictEntry::operator=.

Purpose:

Args:

Return:

Definition at line 157 of file IccTagDict.cpp.

158{
160 delete m_pNameLocalized;
161
163 delete m_pValueLocalized;
164
165 *m_sName = *IDE.m_sName;
167 *m_sValue = *IDE.m_sValue;
168
169 if (IDE.m_pNameLocalized) {
171 }
172 else
173 m_pNameLocalized = NULL;
174
175 if (IDE.m_pValueLocalized) {
177 }
178 else
179 m_pValueLocalized = NULL;
180
181 return *this;
182}

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:

Definition at line 251 of file IccTagDict.cpp.

252{
254 return 32;
256 return 24;
257 return 16;
258}

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:

Definition at line 280 of file IccTagDict.cpp.

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

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)

Definition at line 261 of file IccTagDict.cpp.

262{
263 bool rv = m_bValueSet && !m_sValue->empty();
264
265 *m_sValue = sValue;
266 m_bValueSet = true;
267 return rv;
268}

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:

Definition at line 307 of file IccTagDict.cpp.

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

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

Definition at line 121 of file IccTagDict.h.

121{ m_sValue->clear(); m_bValueSet = false; }

Referenced by CIccTagDict::Set().

+ Here is the caller graph for this function:

◆ ValueBegin()

std::wstring::const_iterator CIccDictEntry::ValueBegin ( )
inline

Definition at line 111 of file IccTagDict.h.

111{return m_sValue->begin();}

◆ ValueEnd()

std::wstring::const_iterator CIccDictEntry::ValueEnd ( )
inline

Definition at line 112 of file IccTagDict.h.

112{return m_sValue->end();}

Member Data Documentation

◆ m_bValueSet

bool CIccDictEntry::m_bValueSet
protected

Definition at line 132 of file IccTagDict.h.

Referenced by CIccDictEntry(), CIccDictEntry(), operator=(), and SetValue().

◆ m_pNameLocalized

CIccTagMultiLocalizedUnicode* CIccDictEntry::m_pNameLocalized
protected

◆ m_pValueLocalized

CIccTagMultiLocalizedUnicode* CIccDictEntry::m_pValueLocalized
protected

◆ m_sName

std::wstring* CIccDictEntry::m_sName
protected

Definition at line 130 of file IccTagDict.h.

Referenced by CIccDictEntry(), CIccDictEntry(), Describe(), operator=(), and ~CIccDictEntry().

◆ m_sValue

std::wstring* CIccDictEntry::m_sValue
protected

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