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

#include <IccTagBasic.h>

+ Inheritance diagram for CIccTagUnknown:
+ Collaboration diagram for CIccTagUnknown:

Public Member Functions

 CIccTagUnknown ()
 
 CIccTagUnknown (const CIccTagUnknown &ITU)
 
virtual ~CIccTagUnknown ()
 
virtual void Describe (std::string &sDescription, int nVerboseness)
 
virtual void DetachIO ()
 
virtual const icCharGetClassName () const
 
virtual const icUInt8NumberGetData () const
 
virtual IIccExtensionTagGetExtension ()
 
virtual icUInt32Number GetSize () const
 
virtual icArraySignature GetTagArrayType () const
 
virtual icStructSignature GetTagStructType () const
 
virtual icTagTypeSignature GetType () const
 
virtual bool IsArrayType ()
 
virtual bool IsMBBType ()
 
virtual bool IsNumArrayType () const
 
virtual bool IsSupported ()
 
virtual CIccTagNewCopy () const
 
CIccTagUnknownoperator= (const CIccTagUnknown &UnknownTag)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO)
 
virtual bool Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile)
 
virtual bool ReadAll ()
 
virtual icValidateStatus Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const
 
virtual bool Write (CIccIO *pIO)
 

Static Public Member Functions

static CIccTagCreate (icTagTypeSignature sig)
 

Data Fields

icUInt32Number m_nReserved
 

Protected Attributes

icUInt32Number m_nSize
 
icTagTypeSignature m_nType
 
icUInt8Numberm_pData
 

Detailed Description

Class: IccTagUnknown

Purpose: The general purpose I don't know tag.

Constructor & Destructor Documentation

◆ CIccTagUnknown() [1/2]

CIccTagUnknown::CIccTagUnknown ( )

Name: CIccTagUnknown::CIccTagUnknown

Purpose: Constructor

190{
192 m_pData = NULL;
193}
#define icSigUnknownType
Definition icProfileHeader.h:591
icTagTypeSignature m_nType
Definition IccTagBasic.h:270
icUInt8Number * m_pData
Definition IccTagBasic.h:271

References m_nType, and m_pData.

◆ CIccTagUnknown() [2/2]

CIccTagUnknown::CIccTagUnknown ( const CIccTagUnknown ITU)

Name: CIccTagUnknown::CIccTagUnknown

Purpose: Copy Constructor

Args: ITU = The CIccTagUnknown object to be copied

206{
207 m_nSize = ITU.m_nSize;
208 m_nType = ITU.m_nType;
209
211 memcpy(m_pData, ITU.m_pData, sizeof(icUInt8Number)*m_nSize);
212}
unsigned char icUInt8Number
Definition icProfileHeader.h:250
icUInt32Number m_nSize
Definition IccTagBasic.h:272

References m_nSize, m_nType, and m_pData.

Referenced by NewCopy().

+ Here is the caller graph for this function:

◆ ~CIccTagUnknown()

CIccTagUnknown::~CIccTagUnknown ( )
virtual

Name: CIccTagUnknown::~CIccTagUnknown

Purpose: Destructor

248{
249 if (m_pData)
250 delete [] m_pData;
251}

References m_pData.

Member Function Documentation

◆ Create()

CIccTag * CIccTag::Create ( icTagTypeSignature  sig)
staticinherited

Name: CIccTag::Create

Purpose: This is a static tag creator based upon tag signature type

Args: sig = tag type signature

Return: Pointer to Allocated tag

144{
145 return CIccTagCreator::CreateTag(sig);
146}
static CIccTag * CreateTag(icTagTypeSignature tagTypeSig)
Definition IccTagFactory.h:279

References CIccTagCreator::CreateTag().

Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), CIccTagStruct::LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().

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

◆ Describe()

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

Name: CIccTagUnknown::Describe

Purpose: Dump data associated with unknown tag to a string

Args: sDescription - string to concatenate tag dump to

Reimplemented from CIccTag.

340{
341 icChar buf[128];
342
343 sDescription = "Unknown Tag Type of ";
344 sprintf(buf, "%u Bytes.", m_nSize-4);
345 sDescription += buf;
346
347 if (nVerboseness > 50) {
348 sDescription += "\n\nData Follows:\n";
349
350 icMemDump(sDescription, m_pData+4, m_nSize-4);
351 }
352}
char icChar
Definition IccDefs.h:110
ICCPROFLIB_API void icMemDump(std::string &sDump, void *pBuf, icUInt32Number nNum)
Definition IccUtil.cpp:951

References icMemDump(), m_nSize, and m_pData.

+ Here is the call graph for this function:

◆ DetachIO()

virtual void CIccTag::DetachIO ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

183{}

◆ GetClassName()

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

Reimplemented from CIccTag.

Reimplemented in CIccTagXmlUnknown.

258{ return "CIccTagUnknown"; }

◆ GetData()

virtual const icUInt8Number * CIccTagUnknown::GetData ( ) const
inlinevirtual
261{ return m_pData; }

References m_pData.

◆ GetExtension()

virtual IIccExtensionTag * CIccTag::GetExtension ( )
inlinevirtualinherited

Reimplemented in CIccTagXmlUnknown, CIccTagXmlText, CIccTagXmlUtf8Text, CIccTagXmlZipUtf8Text, CIccTagXmlZipXml, CIccTagXmlUtf16Text, CIccTagXmlTextDescription, CIccTagXmlSignature, CIccTagXmlNamedColor2, CIccTagXmlXYZ, CIccTagXmlChromaticity, CIccTagXmlCicp, CIccTagXmlSparseMatrixArray, CIccTagXmlFixedNum< T, Tsig >, CIccTagXmlNum< T, A, Tsig >, CIccTagXmlFloatNum< T, A, Tsig >, CIccTagXmlMeasurement, CIccTagXmlMultiLocalizedUnicode, CIccTagXmlTagData, CIccTagXmlDateTime, CIccTagXmlColorantOrder, CIccTagXmlColorantTable, CIccTagXmlViewingConditions, CIccTagXmlSpectralDataInfo, CIccTagXmlSpectralViewingConditions, CIccTagXmlProfileSeqDesc, CIccTagXmlResponseCurveSet16, CIccTagXmlCurve, CIccTagXmlParametricCurve, CIccTagXmlSegmentedCurve, CIccTagXmlLutAtoB, CIccTagXmlLutBtoA, CIccTagXmlLut8, CIccTagXmlLut16, CIccTagXmlMultiProcessElement, CIccTagXmlProfileSequenceId, CIccTagXmlDict, CIccTagXmlStruct, CIccTagXmlArray, CIccTagXmlGamutBoundaryDesc, CIccTagXmlEmbeddedHeightImage, CIccTagXmlEmbeddedNormalImage, and CIccTagXmlEmbeddedProfile.

143{return NULL;}

Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().

+ Here is the caller graph for this function:

◆ GetSize()

virtual icUInt32Number CIccTagUnknown::GetSize ( ) const
inlinevirtual
260{ return m_nSize; }

References m_nSize.

◆ GetTagArrayType()

virtual icArraySignature CIccTag::GetTagArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagArray.

133{ return icSigUndefinedArray; }
@ icSigUndefinedArray
Definition icProfileHeader.h:617

References icSigUndefinedArray.

Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ GetTagStructType()

virtual icStructSignature CIccTag::GetTagStructType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagStruct.

132{ return icSigUndefinedStruct; }
@ icSigUndefinedStruct
Definition icProfileHeader.h:606

References icSigUndefinedStruct.

Referenced by icGetTagStructHandlerOfType(), CIccArrayColorantInfo::Validate(), and CIccArrayNamedColor::Validate().

+ Here is the caller graph for this function:

◆ GetType()

virtual icTagTypeSignature CIccTagUnknown::GetType ( ) const
inlinevirtual

Function: GetType()

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

Reimplemented from CIccTag.

257{ return m_nType; }

References m_nType.

◆ IsArrayType()

virtual bool CIccTag::IsArrayType ( )
inlinevirtualinherited

Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.

135{ return false; }

Referenced by MyTagDialog::MyTagDialog(), and DumpTag().

+ Here is the caller graph for this function:

◆ IsMBBType()

virtual bool CIccTag::IsMBBType ( )
inlinevirtualinherited

Reimplemented in CIccMBB.

136{ return false; } //If true then CIccTag can be cast as an CIccMBB

Referenced by CIccProfileXml::ParseTag().

+ Here is the caller graph for this function:

◆ IsNumArrayType()

virtual bool CIccTag::IsNumArrayType ( ) const
inlinevirtualinherited

Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.

137{ return false;} //If true then CIccTag can be cast as a CIccTagNumArray

Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), CIccTagStruct::GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().

+ Here is the caller graph for this function:

◆ IsSupported()

virtual bool CIccTagUnknown::IsSupported ( )
inlinevirtual

Function: IsSupported(size, pIO) - Check if tag fully supported for apply purposes. By Default inherited classes are supported. Unknown tag types are not supported.

Returns true if tag type is supported.

Reimplemented from CIccTag.

255{ return false; }

◆ NewCopy()

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

252{return new CIccTagUnknown(*this);}
CIccTagUnknown()
Definition IccTagBasic.cpp:189

References CIccTagUnknown().

+ Here is the call graph for this function:

◆ operator=()

CIccTagUnknown & CIccTagUnknown::operator= ( const CIccTagUnknown UnknownTag)

Name: CIccTagUnknown::operator=

Purpose: Copy Operator

Args: UnknownTag = The CIccTagUnknown object to be copied

225{
226 if (&UnknownTag == this)
227 return *this;
228
229 m_nSize = UnknownTag.m_nSize;
230 m_nType = UnknownTag.m_nType;
231
232 if (m_pData)
233 delete [] m_pData;
235 memcpy(m_pData, UnknownTag.m_pData, sizeof(icUInt8Number)*m_nSize);
236
237 return *this;
238}

References m_nSize, m_nType, and m_pData.

◆ Read() [1/2]

bool CIccTagUnknown::Read ( icUInt32Number  size,
CIccIO pIO 
)
virtual

Name: CIccTagUnknown::Read

Purpose: Read in an unknown tag type 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.

269{
270 if (m_pData) {
271 delete [] m_pData;
272 m_pData = NULL;
273 }
274
275 if (size<sizeof(icTagTypeSignature) || !pIO) {
276 return false;
277 }
278
279 if (!pIO->Read32(&m_nType))
280 return false;
281
282 m_nSize = size - sizeof(icTagTypeSignature);
283
284 if (m_nSize > 0) { // size could be stored as smaller than expected value, therefore the size check
285
287
288 if (pIO->Read8(m_pData, m_nSize) != (icInt32Number)m_nSize) {
289 return false;
290 }
291 } else {
292 return false;
293 }
294
295 return true;
296}
long icInt32Number
Definition icProfileHeader.h:291
icTagTypeSignature
Definition icProfileHeader.h:526
virtual icInt32Number Read8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:104
icInt32Number Read32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:143

References m_nSize, m_nType, m_pData, CIccIO::Read32(), and CIccIO::Read8().

+ Here is the call graph for this function:

◆ Read() [2/2]

virtual bool CIccTag::Read ( icUInt32Number  size,
CIccIO pIO,
CIccProfile pProfile 
)
inlinevirtualinherited

Function: Read(size, pIO) - Read tag from file. Each derived tag will implement it's own Read() function.

Parameter(s): size - number of bytes in tag including the type signature. pIO - IO object used to read in tag. The IO object should already be initialized to point to the begining of the tag.

Returns true if Read is successful.

Reimplemented in CIccTagEmbeddedProfile.

197{ return Read(size, pIO); }
virtual bool Read(icUInt32Number size, CIccIO *pIO)
Definition IccTagBasic.h:167

References CIccTag::Read().

+ Here is the call graph for this function:

◆ ReadAll()

virtual bool CIccTag::ReadAll ( )
inlinevirtualinherited

Function: ReadAll() - Read All sub data for tag from file. Called by CIccProfile::ReadAll() to read all sub data for tag

Returns true if ReadAll is successful.

Reimplemented in CIccTagEmbeddedProfile.

175{ return true; }

◆ Validate()

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

Function: Validate Each derived tag will implement it's own IsValid() function

Parameter(s): sig - signature of tag being validated, sDescription - A string to put tag validation report.

Name: CIccTag::Validate

Purpose: Check tag data validity. In base class we only look at the tag's reserved data value

Args: sig = signature of tag being validated, sReport = String to add report information to

Return: icValidateStatusOK if valid, or other error status.

Reimplemented in CIccTagGamutBoundaryDesc, CIccTagText, CIccTagUtf8Text, CIccTagZipUtf8Text, CIccTagUtf16Text, CIccTagTextDescription, CIccTagSignature, CIccTagNamedColor2, CIccTagXYZ, CIccTagChromaticity, CIccTagCicp, CIccTagSparseMatrixArray, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, CIccTagMeasurement, CIccTagMultiLocalizedUnicode, CIccTagData, CIccTagDateTime, CIccTagColorantOrder, CIccTagColorantTable, CIccTagViewingConditions, CIccTagProfileSeqDesc, CIccTagResponseCurveSet16, CIccTagSpectralDataInfo, CIccTagSpectralViewingConditions, CIccTagEmbeddedHeightImage, CIccTagEmbeddedNormalImage, CIccTagStruct, CIccTagArray, CIccTagDict, CIccTagEmbeddedProfile, CIccTagCurve, CIccTagParametricCurve, CIccTagSegmentedCurve, CIccTagMultiProcessElement, and CIccTagProfileSequenceId.

165{
167
168 if (m_nReserved != 0) {
169 CIccInfo Info;
170 sReport += icMsgValidateNonCompliant;
171 sReport += Info.GetSigPathName(sigPath);
172 sReport += " - Reserved Value must be zero.\n";
173
175 }
176
177 return rv;
178}
icValidateStatus
Definition IccDefs.h:119
@ icValidateOK
Definition IccDefs.h:120
@ icValidateNonCompliant
Definition IccDefs.h:122
ICCPROFLIB_API const char * icMsgValidateNonCompliant
Definition IccUtil.cpp:91
Definition IccUtil.h:303
std::string GetSigPathName(std::string sigPath)
Definition IccUtil.cpp:1614
icUInt32Number m_nReserved
Definition IccTagBasic.h:235

References CIccInfo::GetSigPathName(), icMsgValidateNonCompliant, icValidateNonCompliant, icValidateOK, and CIccTag::m_nReserved.

Referenced by CIccTagGamutBoundaryDesc::Validate(), CIccMBB::Validate(), CIccTagLutAtoB::Validate(), CIccTagLutBtoA::Validate(), CIccTagLut8::Validate(), CIccTagLut16::Validate(), CIccArrayUnknown::Validate(), CIccArrayColorantInfo::Validate(), CIccArrayNamedColor::Validate(), CIccStructUnknown::Validate(), CIccTagText::Validate(), CIccTagUtf8Text::Validate(), CIccTagZipUtf8Text::Validate(), CIccTagUtf16Text::Validate(), CIccTagTextDescription::Validate(), CIccTagSignature::Validate(), CIccTagNamedColor2::Validate(), CIccTagXYZ::Validate(), CIccTagChromaticity::Validate(), CIccTagCicp::Validate(), CIccTagNum< T, Tsig >::Validate(), CIccTagFloatNum< T, Tsig >::Validate(), CIccTagMeasurement::Validate(), CIccTagMultiLocalizedUnicode::Validate(), CIccTagData::Validate(), CIccTagDateTime::Validate(), CIccTagColorantOrder::Validate(), CIccTagColorantTable::Validate(), CIccTagViewingConditions::Validate(), CIccTagProfileSeqDesc::Validate(), CIccTagResponseCurveSet16::Validate(), CIccTagSpectralDataInfo::Validate(), CIccTagSpectralViewingConditions::Validate(), CIccTagEmbeddedHeightImage::Validate(), CIccTagEmbeddedNormalImage::Validate(), CIccTagStruct::Validate(), CIccTagArray::Validate(), CIccTagDict::Validate(), CIccTagEmbeddedProfile::Validate(), CIccTagCurve::Validate(), CIccTagParametricCurve::Validate(), and CIccTagProfileSequenceId::Validate().

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

◆ Write()

bool CIccTagUnknown::Write ( CIccIO pIO)
virtual

Name: CIccTagUnknown::Write

Purpose: Write an unknown tag to a file

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

Return: true = succesful, false = failure

Reimplemented from CIccTag.

313{
314 if (!pIO)
315 return false;
316
317 if (!pIO->Write32(&m_nType))
318 return false;
319
320 if (m_nSize && m_pData) {
322 return false;
323 }
324
325 return true;
326}
virtual icInt32Number Write8(void *pBuf8, icInt32Number nNum=1)
Definition IccIO.h:105
icInt32Number Write32(void *pBuf32, icInt32Number nNum=1)
Definition IccIO.cpp:152

References m_nSize, m_nType, m_pData, CIccIO::Write32(), and CIccIO::Write8().

+ Here is the call graph for this function:

Field Documentation

◆ m_nReserved

icUInt32Number CIccTag::m_nReserved
inherited

Referenced by CIccTag::CIccTag(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::CIccTagMultiProcessElement(), CIccTagMultiProcessElement::operator=(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccTagText::Read(), CIccTagUtf8Text::Read(), CIccTagZipUtf8Text::Read(), CIccTagUtf16Text::Read(), CIccTagTextDescription::Read(), CIccTagSignature::Read(), CIccTagNamedColor2::Read(), CIccTagXYZ::Read(), CIccTagChromaticity::Read(), CIccTagCicp::Read(), CIccTagSparseMatrixArray::Read(), CIccTagFixedNum< T, Tsig >::Read(), CIccTagNum< T, Tsig >::Read(), CIccTagFloatNum< T, Tsig >::Read(), CIccTagMeasurement::Read(), CIccTagMultiLocalizedUnicode::Read(), CIccTagData::Read(), CIccTagDateTime::Read(), CIccTagColorantOrder::Read(), CIccTagColorantTable::Read(), CIccTagViewingConditions::Read(), CIccTagProfileSeqDesc::Read(), CIccTagResponseCurveSet16::Read(), CIccTagSpectralDataInfo::Read(), CIccTagSpectralViewingConditions::Read(), CIccTagEmbeddedHeightImage::Read(), CIccTagEmbeddedNormalImage::Read(), CIccTagStruct::Read(), CIccTagArray::Read(), CIccTagDict::Read(), CIccTagCurve::Read(), CIccTagParametricCurve::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagGamutBoundaryDesc::Read(), CIccTagMultiProcessElement::Read(), CIccTagProfileSequenceId::Read(), CIccTagEmbeddedProfile::Read(), CIccTag::Validate(), CIccTagText::Write(), CIccTagUtf8Text::Write(), CIccTagZipUtf8Text::Write(), CIccTagUtf16Text::Write(), CIccTagTextDescription::Write(), CIccTagSignature::Write(), CIccTagNamedColor2::Write(), CIccTagXYZ::Write(), CIccTagChromaticity::Write(), CIccTagCicp::Write(), CIccTagSparseMatrixArray::Write(), CIccTagFixedNum< T, Tsig >::Write(), CIccTagNum< T, Tsig >::Write(), CIccTagFloatNum< T, Tsig >::Write(), CIccTagMeasurement::Write(), CIccTagMultiLocalizedUnicode::Write(), CIccTagData::Write(), CIccTagDateTime::Write(), CIccTagColorantOrder::Write(), CIccTagColorantTable::Write(), CIccTagViewingConditions::Write(), CIccTagProfileSeqDesc::Write(), CIccTagResponseCurveSet16::Write(), CIccTagSpectralDataInfo::Write(), CIccTagSpectralViewingConditions::Write(), CIccTagEmbeddedHeightImage::Write(), CIccTagEmbeddedNormalImage::Write(), CIccTagStruct::Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().

◆ m_nSize

◆ m_nType

◆ m_pData


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