IccMAX 2.1.27
Color Profile Tools
|
#include <IccTagComposite.h>
Public Member Functions | |
CIccTagStruct () | |
CIccTagStruct (const CIccTagStruct &lut) | |
virtual | ~CIccTagStruct () |
bool | AreElemsUnique () const |
bool | AttachElem (icSignature sig, CIccTag *pTag) |
bool | DeleteElem (icSignature sig) |
virtual void | Describe (std::string &sDescription, int nVerboseness) |
virtual void | DetachIO () |
CIccTag * | FindElem (icSignature sig) |
CIccTag * | FindElemOfType (icSignature sig, icTagTypeSignature sigType) |
virtual const icChar * | GetClassName () const |
TagEntryList * | GetElemList () |
icFloatNumber | GetElemNumberValue (icSignature sig, icFloatNumber defaultValue=0) |
virtual IIccExtensionTag * | GetExtension () |
IIccStruct * | GetStructHandler () |
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 CIccTag * | NewCopy () const |
CIccTagStruct & | operator= (const CIccTagStruct &lut) |
virtual bool | Read (icUInt32Number size, CIccIO *pIO) |
virtual bool | Read (icUInt32Number size, CIccIO *pIO, CIccProfile *pProfile) |
virtual bool | ReadAll () |
virtual bool | SetTagStructType (icStructSignature sig) |
virtual icValidateStatus | Validate (std::string sigPath, std::string &sReport, const CIccProfile *pProfile=NULL) const |
virtual bool | Write (CIccIO *pIO) |
Static Public Member Functions | |
static CIccTag * | Create (icTagTypeSignature sig) |
static std::string | GetElemName (icTagSignature sig, icStructSignature sigThis) |
static CIccTagStruct * | ParseMem (icUInt8Number *pMem, icUInt32Number size) |
Data Fields | |
icUInt32Number | m_nReserved |
Protected Member Functions | |
void | Cleanup () |
bool | DetachElem (CIccTag *pTag) |
IccTagEntry * | GetElem (CIccTag *pTag) const |
IccTagEntry * | GetElem (icSignature sig) const |
bool | LoadElem (IccTagEntry *pTagEntry, CIccIO *pIO) |
Protected Attributes | |
TagEntryList * | m_ElemEntries |
TagPtrList * | m_ElemVals |
IIccStruct * | m_pStruct |
icStructSignature | m_sigStructType |
icUInt32Number | m_tagSize |
icUInt32Number | m_tagStart |
Class: CIccTagStruct
Purpose: The general purpose Tag Struct type tag
CIccTagStruct::CIccTagStruct | ( | ) |
Name: CIccTagStruct::CIccTagStruct
Purpose:
Args:
Return:
References m_ElemEntries, m_ElemVals, and m_pStruct.
CIccTagStruct::CIccTagStruct | ( | const CIccTagStruct & | subTags | ) |
Name: CIccTagStruct::CIccTagStruct
Purpose:
Args:
Return:
References m_ElemEntries, m_ElemVals, m_pStruct, m_sigStructType, CIccTag::NewCopy(), and IIccStruct::NewCopy().
Referenced by NewCopy().
|
virtual |
Name: CIccTagStruct::~CIccTagStruct
Purpose:
Args:
Return:
References Cleanup(), m_ElemEntries, m_ElemVals, and m_pStruct.
bool CIccTagStruct::AreElemsUnique | ( | ) | const |
Name: CIccTagStruct::AreElemsUnique
Purpose: For each tag it checks to see if any other tags have the same signature.
Return: true if all tags have unique signatures, or false if there are duplicate tag signatures.
References m_ElemEntries, and icTag::sig.
Referenced by Validate().
bool CIccTagStruct::AttachElem | ( | icSignature | sig, |
CIccTag * | pTag | ||
) |
Name: CIccTagStruct::AttachTag
Purpose: Assign a tag object to a directory entry in the profile. This will assume ownership of the tag object.
Args: sig - signature of tag 'name' to use to assign tag object with, pTag - pointer to tag object to attach to profile.
Return: true = tag assigned to profile, false - tag not assigned to profile (tag already exists).
References GetElem(), m_ElemEntries, m_ElemVals, icTag::offset, icTag::sig, and icTag::size.
Referenced by icConvertEncodingProfile(), and CIccTagXmlStruct::ParseTag().
|
protected |
Name: CIccTagStruct::Cleanup
Purpose: Detach from a pending IO object
References icSigUndefinedStruct, m_ElemEntries, m_ElemVals, m_pStruct, and m_sigStructType.
Referenced by ~CIccTagStruct(), operator=(), and Read().
|
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
References CIccTagCreator::CreateTag().
Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), LoadElem(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeTintArray::Read(), CIccTagLutAtoB::Read(), CIccTagLut8::Read(), CIccTagLut16::Read(), CIccTagLut8::SetColorSpaces(), CIccTagLut16::SetColorSpaces(), and CIccProfileDescText::SetType().
bool CIccTagStruct::DeleteElem | ( | icSignature | sig | ) |
Name: CIccTagStruct::DeleteSubTag
Purpose: Delete tag directory entry with given signature. If no other tag directory entries use the tag object, the tag object will also be deleted.
Args: sig - signature of tag directory entry to remove
Return: true - desired tag directory entry was found and deleted, false - desired tag directory entry was not found
References DetachElem(), GetElem(), m_ElemEntries, and icTag::sig.
Referenced by icConvertEncodingProfile().
|
virtual |
Name: CIccTagStruct::Describe
Purpose:
Args:
Return:
Reimplemented from CIccTag.
References CIccStructUnknown::CIccStructUnknown(), CIccStructCreator::CreateStruct(), CIccStructUnknown::Describe(), IIccStruct::Describe(), CIccStructCreator::GetStructSigName(), m_pStruct, and m_sigStructType.
|
protected |
Name: CIccTagStruct::DetachSubTag
Purpose: Remove association of a tag object from all tag directory entries. Associated tag directory entries will be removed from the tag directory. The tag object is NOT deleted from memory, but is considered to be no longer associated with the CIccTagStruct object. The caller assumes ownership of the tag object.
Args: pTag - pointer to tag object unassociated with the profile object
Return: true - tag object found and unassociated with profile object, false - tag object not found
References m_ElemEntries, and m_ElemVals.
Referenced by DeleteElem().
|
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.
CIccTag * CIccTagStruct::FindElem | ( | icSignature | sig | ) |
Name: CIccTagStruct::FindElem
Purpose: Finds the tag object associated with the struct entry with the given signature.
Args: sig - element signature to find
Return: The desired tag object, or NULL if unable to find in the struct
References GetElem().
Referenced by CIccStructUnknown::GetElem(), GetElemNumberValue(), CIccStructNamedColor::getName(), CIccTagXmlStruct::ParseTag(), CIccTagXmlStruct::ToXml(), CIccStructNamedColor::Validate(), CIccStructBRDF::Validate(), and CIccStructColorantInfo::Validate().
CIccTag * CIccTagStruct::FindElemOfType | ( | icSignature | sig, |
icTagTypeSignature | sigType | ||
) |
Name: CIccTagStruct::FindElemOfType
Purpose: Finds the tag object associated with the struct entry with the given signature that has a specific tag type.
Args: sig - element signature to find sigType - signature of desired tag type
Return: The desired tag object, or NULL if unable to find in the struct
References GetElem(), and CIccTag::GetType().
Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), and icGetParamFloatNum().
|
inlinevirtual |
|
protected |
Name: CIccTagStruct::GetElem
Purpose: Finds the first tag entry that points to the indicated tag object
Args: pTag - pointer to tag object desired to be found
Return: pointer to first tag struct entry that points to the desired tag object, or NULL if tag object is not pointed to by any tag struct entries.
References m_ElemEntries.
Referenced by DeleteElem().
|
protected |
Name: CIccTagStruct::GetElem
Purpose: Get a tag entry with a given signature
Args: sig - signature id to find in tag structure
Return: Pointer to desired tag struct entry, or NULL if not found.
References m_ElemEntries, and icTag::sig.
Referenced by AttachElem(), FindElem(), and FindElemOfType().
|
inline |
References m_ElemEntries.
Referenced by CIccStructUnknown::Describe(), IIccStruct::Describe(), and icConvertEncodingProfile().
|
static |
icFloatNumber CIccTagStruct::GetElemNumberValue | ( | icSignature | sig, |
icFloatNumber | defaultValue = 0 |
||
) |
Name: CIccTagStruct::GetElemNumberValue
Purpose: Returns the number value associated with the first entry of a CIccTagNumberArray based tag with the given signature.
Args: sig - subtag signature to find defaultValue - value to use if the tag cannot be found, or is not a number tag
Return: The tags value or defaultValue if unable to find subtag in the struct or if the subtag is not a CIccTagNumberArray based tag.
References FindElem(), CIccTagNumArray::GetValues(), and CIccTag::IsNumArrayType().
Referenced by CIccDefaultEncProfileConverter::ConvertFromParams().
|
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.
Referenced by icCurvesFromXml(), icCurvesToXml(), icProfDescToXml(), icXmlParseProfDesc(), CIccProfileXml::ParseTag(), CIccTagXmlStruct::ParseTag(), CIccMpeXmlTintArray::ParseXml(), CIccTagXmlArray::ParseXml(), CIccMpeXmlTintArray::ToXml(), CIccTagXmlStruct::ToXml(), CIccTagXmlArray::ToXml(), and CIccProfileXml::ToXmlWithBlanks().
IIccStruct * CIccTagStruct::GetStructHandler | ( | ) |
Name: CIccTagStruct::GetStructHandler
Purpose: Get struct object handler
Args:
Return: Pointer to a IIccStruct object handler for the associated struct type
References CIccStructCreator::CreateStruct(), m_pStruct, and m_sigStructType.
Referenced by icGetTagStructHandler(), CIccTagXmlStruct::ToXml(), and CIccArrayNamedColor::Validate().
|
inlinevirtualinherited |
Reimplemented in CIccTagArray.
References icSigUndefinedArray.
Referenced by icGetTagArrayHandlerOfType(), and CIccProfileXml::ParseTag().
|
inlinevirtual |
Reimplemented from CIccTag.
References m_sigStructType.
Referenced by CIccDefaultEncProfileConverter::ConvertFromParams(), IIccStruct::Describe(), and CIccStructNamedColor::Validate().
|
inlinevirtual |
Function: GetType()
Purpose: Get Tag Type. Each derived tag will implement it's own GetType() function.
Reimplemented from CIccTag.
References icSigTagStructType.
Referenced by Write().
|
inlinevirtualinherited |
Reimplemented in CIccTagXYZ, CIccTagChromaticity, CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, CIccTagFloatNum< T, Tsig >, and CIccTagData.
Referenced by MyTagDialog::MyTagDialog(), and DumpTag().
|
inlinevirtualinherited |
Reimplemented in CIccMBB.
Referenced by CIccProfileXml::ParseTag().
|
inlinevirtualinherited |
Reimplemented in CIccTagSparseMatrixArray, CIccTagFixedNum< T, Tsig >, CIccTagNum< T, Tsig >, and CIccTagFloatNum< T, Tsig >.
Referenced by CIccArrayNamedColor::FindDeviceColor(), CIccArrayNamedColor::FindPcsColor(), CIccArrayNamedColor::FindSpectralColor(), GetElemNumberValue(), CIccStructNamedColor::GetNumArray(), CIccMpeXmlTintArray::ParseXml(), and CIccMpeTintArray::Read().
|
inlinevirtualinherited |
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 in CIccTagUnknown, CIccTagEmbeddedProfile, and CIccTagMultiProcessElement.
|
protected |
Name: CIccTagStruct::LoadSubTag
Purpose: This will load from the indicated IO object and associate a tag object to a tag directory entry. Nothing happens if tag directory entry is associated with a tag object.
Args: pTagEntry - pointer to tag directory entry, pIO - pointer to IO object to read tag object data from
Return: true - tag directory object associated with tag directory entry, false - failure
References CIccTag::Create(), icSeekSet, m_ElemEntries, m_ElemVals, m_tagSize, m_tagStart, icTag::offset, CIccTag::Read(), CIccIO::Read32(), CIccIO::Seek(), and icTag::size.
Referenced by Read().
|
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.
References CIccTagStruct().
CIccTagStruct & CIccTagStruct::operator= | ( | const CIccTagStruct & | subTags | ) |
Name: &operator=
Purpose:
Args:
Return:
References Cleanup(), m_ElemEntries, m_ElemVals, m_pStruct, m_sigStructType, CIccTag::NewCopy(), and IIccStruct::NewCopy().
|
static |
Name: CIccTagStruct::ParseMem
Purpose:
Args:
Return:
References CIccMemIO::Attach(), and Read().
|
virtual |
Name: CIccTagStruct::Read
Purpose:
Args:
Return:
Reimplemented from CIccTag.
References Cleanup(), LoadElem(), m_ElemEntries, CIccTag::m_nReserved, m_tagSize, m_tagStart, icTag::offset, CIccIO::Read32(), SetTagStructType(), icTag::sig, icTag::size, and CIccIO::Tell().
Referenced by ParseMem().
|
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.
References CIccTag::Read().
|
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.
|
virtual |
Name: CIccTagStruct::SetTagStructType
Purpose:
Args:
Return:
References CIccStructCreator::CreateStruct(), m_pStruct, and m_sigStructType.
Referenced by CIccTagXmlStruct::ParseXml(), and Read().
|
virtual |
Name: CIccTagStruct::Validate
Purpose:
Args:
Return:
Reimplemented from CIccTag.
References AreElemsUnique(), CIccInfo::GetSigPathName(), icGetSigPath(), icMaxStatus(), icMsgValidateWarning, icValidateWarning, m_ElemEntries, m_pStruct, icTag::sig, CIccTag::Validate(), and IIccStruct::Validate().
|
virtual |
Name: CIccTagStruct::Write
Purpose:
Args:
Return:
Reimplemented from CIccTag.
References CIccIO::Align32(), CIccIO::GetLength(), GetType(), icSeekSet, m_ElemEntries, CIccTag::m_nReserved, m_sigStructType, m_tagStart, icTag::offset, CIccIO::Seek(), icTag::sig, icTag::size, CIccIO::Tell(), CIccTag::Write(), and CIccIO::Write32().
|
protected |
|
protected |
Referenced by CIccTagStruct(), CIccTagStruct(), ~CIccTagStruct(), AttachElem(), Cleanup(), DetachElem(), LoadElem(), and operator=().
|
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(), 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(), Write(), CIccTagArray::Write(), CIccTagDict::Write(), CIccTagEmbeddedProfile::Write(), CIccTagCurve::Write(), CIccTagParametricCurve::Write(), CIccTagLutAtoB::Write(), CIccTagLut8::Write(), CIccTagLut16::Write(), CIccTagGamutBoundaryDesc::Write(), CIccTagMultiProcessElement::Write(), and CIccTagProfileSequenceId::Write().
|
protected |
|
protected |
Referenced by CIccTagStruct(), Cleanup(), Describe(), GetStructHandler(), GetTagStructType(), operator=(), SetTagStructType(), CIccTagXmlStruct::ToXml(), and Write().
|
protected |
Referenced by LoadElem(), and Read().
|
protected |
Referenced by LoadElem(), Read(), and Write().