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

Data Class: CIccProfileDescText. More...

#include <IccTagBasic.h>

+ Collaboration diagram for CIccProfileDescText:

Public Member Functions

 CIccProfileDescText ()
 Name: CIccProfileDescText::CIccProfileDescText.
 
 CIccProfileDescText (const CIccProfileDescText &IPDC)
 Name: CIccProfileDescText::CIccProfileDescText.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccProfileDescText::Describe.
 
CIccTagGetTag () const
 
virtual icTagTypeSignature GetType () const
 Name: CIccProfileDescText::SetType.
 
CIccProfileDescTextoperator= (const CIccProfileDescText &ProfDescText)
 Name: CIccProfileDescText::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccProfileDescText::Read.
 
bool SetType (icTagTypeSignature nType)
 Name: CIccProfileDescText::SetType.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccProfileDescText::Write.
 
virtual ~CIccProfileDescText ()
 Name: CIccProfileDescText::~CIccProfileDescText.
 

Public Attributes

bool m_bNeedsPading
 

Protected Attributes

CIccTagm_pTag
 

Detailed Description

Data Class: CIccProfileDescText.

Purpose: Private text class for CIccProfileDescStruct. Text can be either a CIccTagTextDescription or a CIccTagMultiLocalizedUnicode so this class provides a single interface to both.

Definition at line 1457 of file IccTagBasic.h.

Constructor & Destructor Documentation

◆ CIccProfileDescText() [1/2]

CIccProfileDescText::CIccProfileDescText ( )

Name: CIccProfileDescText::CIccProfileDescText.

Purpose: Constructor

Definition at line 9110 of file IccTagBasic.cpp.

9111{
9112 m_pTag = NULL;
9113 m_bNeedsPading = false;
9114}

◆ CIccProfileDescText() [2/2]

CIccProfileDescText::CIccProfileDescText ( const CIccProfileDescText & IPDC)

Name: CIccProfileDescText::CIccProfileDescText.

Purpose: Copy Constructor

Args: IPDC = The CIccTagUnknown object to be copied

Definition at line 9127 of file IccTagBasic.cpp.

9128{
9129 if (IPDC.m_pTag) {
9130 m_pTag = IPDC.m_pTag->NewCopy();
9132 }
9133 else {
9134 m_pTag = NULL;
9135 m_bNeedsPading = false;
9136 }
9137}
virtual CIccTag * NewCopy() const
Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.

References m_bNeedsPading, m_pTag, and CIccTag::NewCopy().

+ Here is the call graph for this function:

◆ ~CIccProfileDescText()

CIccProfileDescText::~CIccProfileDescText ( )
virtual

Name: CIccProfileDescText::~CIccProfileDescText.

Purpose: Destructor

Definition at line 9179 of file IccTagBasic.cpp.

9180{
9181 if (m_pTag)
9182 delete m_pTag;
9183}

Member Function Documentation

◆ Describe()

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

Name: CIccProfileDescText::Describe.

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Definition at line 9247 of file IccTagBasic.cpp.

9248{
9249 if (m_pTag)
9250 m_pTag->Describe(sDescription, nVerboseness);
9251}
virtual void Describe(std::string &sDescription, int nVerboseness=0)
Function: Describe(sDescription) Each derived tag will implement it's own Describe() function.

◆ GetTag()

CIccTag * CIccProfileDescText::GetTag ( ) const
inline

Definition at line 1468 of file IccTagBasic.h.

1468{ return m_pTag; }

Referenced by icProfDescToXml(), icXmlParseProfDesc(), and CDevLinkWriter::iterate().

+ Here is the caller graph for this function:

◆ GetType()

icTagTypeSignature CIccProfileDescText::GetType ( ) const
virtual

Name: CIccProfileDescText::SetType.

Purpose: Gets the type of the profile description text. Could be either a MultiLocalizedUnicodeType or a TextDescriptionType.

Definition at line 9228 of file IccTagBasic.cpp.

9229{
9230 if (m_pTag)
9231 return m_pTag->GetType();
9232
9233 return icSigUnknownType;
9234}
virtual icTagTypeSignature GetType() const
Function: GetType()
#define icSigUnknownType
Convenience Enum Definitions - Not defined in ICC specification.

References icSigUnknownType.

◆ operator=()

CIccProfileDescText & CIccProfileDescText::operator= ( const CIccProfileDescText & ProfDescText)

Name: CIccProfileDescText::operator=.

Purpose: Copy Operator

Args: ProfDescText = The CIccProfileDescText object to be copied

Definition at line 9150 of file IccTagBasic.cpp.

9151{
9152 if (&ProfDescText == this)
9153 return *this;
9154
9155 if (m_pTag)
9156 delete m_pTag;
9157
9158 if (ProfDescText.m_pTag) {
9159 m_pTag = ProfDescText.m_pTag->NewCopy();
9160 m_bNeedsPading = ProfDescText.m_bNeedsPading;
9161 }
9162 else {
9163 m_pTag = NULL;
9164 m_bNeedsPading = false;
9165 }
9166
9167 return *this;
9168}

References m_bNeedsPading, m_pTag, and CIccTag::NewCopy().

+ Here is the call graph for this function:

◆ Read()

bool CIccProfileDescText::Read ( icUInt32Number size,
CIccIO * pIO )
virtual

Name: CIccProfileDescText::Read.

Purpose: Read in the tag contents into a data block

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

Return: true = successful, false = failure

Definition at line 9268 of file IccTagBasic.cpp.

9269{
9271 icUInt32Number nPos;
9272
9273 //Check for description tag type signature
9274 nPos = pIO->Tell();
9275
9276 if ((nPos&0x03) != 0)
9277 m_bNeedsPading = true;
9278
9279 if (!pIO->Read32(&sig))
9280 return false;
9281 pIO->Seek(nPos, icSeekSet);
9282
9284 m_bNeedsPading = false;
9285
9286 if (!SetType(sig)) {
9287 //We couldn't find it, but we may be looking in the wrong place
9288 //Re-Sync to a 4 byte boundary
9289 pIO->Sync32();
9290
9291 nPos = pIO->Tell();
9292 if (!pIO->Read32(&sig))
9293 return false;
9294 pIO->Seek(nPos, icSeekSet);
9295
9296 if (!SetType(sig)) {
9297 return false;
9298 }
9299 }
9300
9301 if (m_pTag) {
9302 return m_pTag->Read(size, pIO);
9303 }
9304
9305 return false;
9306}
icArraySignature sig
@ icSeekSet
Definition IccIO.h:83
icTagTypeSignature
unsigned int icUInt32Number
virtual icInt32Number Tell()
Definition IccIO.h:133
virtual icInt32Number Seek(icInt32Number nOffset, icSeekVal pos)
Definition IccIO.h:132
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143
bool Sync32(icUInt32Number nOffset=0)
Operation to make sure read position is evenly divisible by 4.
Definition IccIO.cpp:357
bool SetType(icTagTypeSignature nType)
Name: CIccProfileDescText::SetType.
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Function: Read(size, pIO) - Read tag from file.
@ icSigTextDescriptionType

References icSeekSet, icSigTextDescriptionType, CIccIO::Read32(), CIccIO::Seek(), sig, CIccIO::Sync32(), and CIccIO::Tell().

Referenced by CIccTagProfileSeqDesc::Read().

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

◆ SetType()

bool CIccProfileDescText::SetType ( icTagTypeSignature nType)

Name: CIccProfileDescText::SetType.

Purpose: Sets the type of the profile description text. Could be either a MultiLocalizedUnicodeType or a TextDescriptionType.

Args: nType = the tag type signature

Return: true = successful, false = failure

Definition at line 9200 of file IccTagBasic.cpp.

9201{
9202 if (m_pTag) {
9203 if (m_pTag->GetType() == nType)
9204 return true;
9205
9206 delete m_pTag;
9207 }
9208
9209 if (nType == icSigMultiLocalizedUnicodeType ||
9210 nType == icSigTextDescriptionType)
9211 m_pTag = CIccTag::Create(nType);
9212 else
9213 m_pTag = NULL;
9214
9215 return(m_pTag != NULL);
9216}
static CIccTag * Create(icTagTypeSignature sig)
Name: CIccTag::Create.
@ icSigMultiLocalizedUnicodeType

References CIccTag::Create(), icSigMultiLocalizedUnicodeType, and icSigTextDescriptionType.

Referenced by icXmlParseProfDesc(), and CDevLinkWriter::iterate().

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

◆ Write()

bool CIccProfileDescText::Write ( CIccIO * pIO)
virtual

Name: CIccProfileDescText::Write.

Purpose: Write the tag to a file

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

Return: true = succesful, false = failure

Definition at line 9322 of file IccTagBasic.cpp.

9323{
9324 if (!m_pTag)
9325 return false;
9326
9327 if (m_pTag->Write(pIO)) {
9329 return pIO->Align32();
9330 else
9331 return true;
9332 }
9333
9334 return false;
9335}
bool Align32()
Write operation to make sure that filelength is evenly divisible by 4.
Definition IccIO.cpp:341
virtual bool Write(CIccIO *pIO)
Function: Write(pIO) Each derived tag will implement it's own Write() function.

References CIccIO::Align32(), and icSigTextDescriptionType.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_bNeedsPading

bool CIccProfileDescText::m_bNeedsPading

Definition at line 1475 of file IccTagBasic.h.

Referenced by CIccProfileDescText(), and operator=().

◆ m_pTag

CIccTag* CIccProfileDescText::m_pTag
protected

Definition at line 1478 of file IccTagBasic.h.

Referenced by CIccProfileDescText(), and operator=().


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