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

Class: CIccTagDateTime. More...

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagDateTime:
+ Collaboration diagram for CIccTagDateTime:

Public Member Functions

 CIccTagDateTime ()
 Name: CIccTagDateTime::CIccTagDateTime.
 
 CIccTagDateTime (const CIccTagDateTime &ITDT)
 Name: CIccTagDateTime::CIccTagDateTime.
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 Name: CIccTagDateTime::Describe.
 
virtual const icCharGetClassName () const
 
virtual icTagTypeSignature GetType () const
 Function: GetType()
 
virtual CIccTagNewCopy () const
 Function: NewCopy(sDescription) Each derived tag will implement it's own NewCopy() function.
 
CIccTagDateTimeoperator= (const CIccTagDateTime &DateTimeTag)
 Name: CIccTagDateTime::operator=.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 Name: CIccTagDateTime::Read.
 
void SetDateTime (icDateTimeNumber nDateTime)
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 Name: CIccTagDateTime::Validate.
 
virtual bool Write (CIccIO *pIO)
 Name: CIccTagDateTime::Write.
 
virtual ~CIccTagDateTime ()
 Name: CIccTagDateTime::~CIccTagDateTime.
 
- Public Member Functions inherited from CIccTag
 CIccTag ()
 Name: CIccTag::CIccTag.
 
virtual void DetachIO ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual IIccExtensionTagGetExtension ()
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes.
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 Function: Read(size, pIO) - Read tag from file.
 
virtual bool ReadAll ()
 Function: ReadAll() - Read All sub data for tag from file.
 
virtual ~CIccTag ()
 Name: CIccTag::CIccTag.
 

Protected Attributes

icDateTimeNumber m_DateTime
 

Additional Inherited Members

- Static Public Member Functions inherited from CIccTag
static CIccTagCreate (icTagTypeSignature sig)
 Name: CIccTag::Create.
 
- Public Attributes inherited from CIccTag
icUInt32Number m_nReserved
 

Detailed Description

Class: CIccTagDateTime.

Purpose: The date time tag type

Definition at line 1321 of file IccTagBasic.h.

Constructor & Destructor Documentation

◆ CIccTagDateTime() [1/2]

CIccTagDateTime::CIccTagDateTime ( )

Name: CIccTagDateTime::CIccTagDateTime.

Purpose: Constructor

Definition at line 8066 of file IccTagBasic.cpp.

8067{
8068 memset(&m_DateTime, 0, sizeof(m_DateTime));
8069}
icDateTimeNumber m_DateTime

◆ CIccTagDateTime() [2/2]

CIccTagDateTime::CIccTagDateTime ( const CIccTagDateTime & ITDT)

Name: CIccTagDateTime::CIccTagDateTime.

Purpose: Copy Constructor

Args: ITDT = The CIccTagDateTime object to be copied

Definition at line 8082 of file IccTagBasic.cpp.

8083{
8084 memcpy(&m_DateTime, &ITDT.m_DateTime, sizeof(m_DateTime));
8085}

References m_DateTime.

◆ ~CIccTagDateTime()

CIccTagDateTime::~CIccTagDateTime ( )
virtual

Name: CIccTagDateTime::~CIccTagDateTime.

Purpose: Destructor

Definition at line 8117 of file IccTagBasic.cpp.

8118{
8119}

Member Function Documentation

◆ Describe()

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

Name: CIccTagDateTime::Describe.

Purpose: Dump data associated with the tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

Definition at line 8214 of file IccTagBasic.cpp.

8215{
8216 icChar buf[128];
8217
8218 sDescription = "Date = ";
8219 sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
8220 sDescription += buf;
8221
8222 sDescription += "Time = ";
8223 sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
8224 sDescription += buf;
8225}
char icChar
Definition IccDefs.h:109
icUInt16Number year
icUInt16Number month
icUInt16Number minutes
icUInt16Number seconds
icUInt16Number hours
icUInt16Number day

◆ GetClassName()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlDateTime.

Definition at line 1331 of file IccTagBasic.h.

1331{ return "CIccTagDateTime"; }

◆ GetType()

virtual icTagTypeSignature CIccTagDateTime::GetType ( ) const
inlinevirtual

Function: GetType()

Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.

Reimplemented from CIccTag.

Definition at line 1330 of file IccTagBasic.h.

1330{ return icSigDateTimeType; }
@ icSigDateTimeType

References icSigDateTimeType.

◆ NewCopy()

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

Definition at line 1327 of file IccTagBasic.h.

1327{return new CIccTagDateTime(*this);}
CIccTagDateTime()
Name: CIccTagDateTime::CIccTagDateTime.

◆ operator=()

CIccTagDateTime & CIccTagDateTime::operator= ( const CIccTagDateTime & DateTimeTag)

Name: CIccTagDateTime::operator=.

Purpose: Copy Operator

Args: DateTimeTag = The CIccTagDateTime object to be copied

Definition at line 8098 of file IccTagBasic.cpp.

8099{
8100 if (&DateTimeTag == this)
8101 return *this;
8102
8103 memcpy(&m_DateTime, &DateTimeTag.m_DateTime, sizeof(m_DateTime));
8104
8105 return *this;
8106}

References m_DateTime.

◆ Read()

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

Name: CIccTagDateTime::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

Reimplemented from CIccTag.

Definition at line 8137 of file IccTagBasic.cpp.

8138{
8140
8141 if (sizeof(icTagTypeSignature) +
8142 sizeof(icUInt32Number) +
8143 sizeof(icDateTimeNumber) > size)
8144 return false;
8145
8146 if (!pIO) {
8147 return false;
8148 }
8149
8150 if (!pIO->Read32(&sig))
8151 return false;
8152
8153 if (!pIO->Read32(&m_nReserved))
8154 return false;
8155
8156
8157 icUInt32Number nsize = (size-2*sizeof(icUInt32Number))/sizeof(icUInt16Number);
8158
8159 if (nsize > sizeof(m_DateTime) / sizeof(icUInt16Number))
8160 return false;
8161
8162 if (pIO->Read16(&m_DateTime,nsize) != (icInt32Number)nsize)
8163 return false;
8164
8165 return true;
8166}
icArraySignature sig
icTagTypeSignature
unsigned int icUInt32Number
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
unsigned short icUInt16Number
long icInt32Number
The base date time number.

References CIccIO::Read16(), CIccIO::Read32(), and sig.

+ Here is the call graph for this function:

◆ SetDateTime()

void CIccTagDateTime::SetDateTime ( icDateTimeNumber nDateTime)
inline

Definition at line 1338 of file IccTagBasic.h.

1338{ m_DateTime = nDateTime;}

◆ Validate()

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

Name: CIccTagDateTime::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.

Definition at line 8242 of file IccTagBasic.cpp.

8243{
8244 icValidateStatus rv = CIccTag::Validate(sigPath, sReport, pProfile);
8245 CIccInfo Info;
8246
8247 rv = icMaxStatus(rv, Info.CheckData(sReport, m_DateTime));
8248
8249 return rv;
8250}
icValidateStatus
Definition IccDefs.h:118
icValidateStatus icMaxStatus(icValidateStatus s1, icValidateStatus s2)
Name: icMaxStatus.
Definition IccUtil.cpp:244
Type: Class.
Definition IccUtil.h:303
icValidateStatus CheckData(std::string &sReport, const icDateTimeNumber &dateTime, std::string sDesc="")
Definition IccUtil.cpp:2414
virtual icValidateStatus Validate(std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
Function: Validate Each derived tag will implement it's own IsValid() function.

References CIccInfo::CheckData(), icMaxStatus(), and CIccTag::Validate().

+ Here is the call graph for this function:

◆ Write()

bool CIccTagDateTime::Write ( CIccIO * pIO)
virtual

Name: CIccTagDateTime::Write.

Purpose: Write the tag to a file

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

Return: true = succesful, false = failure

Reimplemented from CIccTag.

Definition at line 8183 of file IccTagBasic.cpp.

8184{
8186
8187 if (!pIO)
8188 return false;
8189
8190 if (!pIO->Write32(&sig))
8191 return false;
8192
8193 if (!pIO->Write32(&m_nReserved))
8194 return false;
8195
8196 if (pIO->Write16(&m_DateTime,6) != 6)
8197 return false;
8198
8199 return true;
8200}
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
Function: GetType()

References sig, CIccIO::Write16(), and CIccIO::Write32().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_DateTime

icDateTimeNumber CIccTagDateTime::m_DateTime
protected

Definition at line 1342 of file IccTagBasic.h.

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


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