SampleICC Main srcforge
Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CIccProfile Class Reference

#include <IccProfile.h>

List of all members.

Public Member Functions

 CIccProfile ()
 CIccProfile (const CIccProfile &Profile)
CIccProfileoperator= (const CIccProfile &Profile)
virtual ~CIccProfile ()
CIccTagFindTag (icSignature sig)
bool AttachTag (icSignature sig, CIccTag *pTag)
bool DeleteTag (icSignature sig)
bool Attach (CIccIO *pIO)
bool Detach ()
bool Read (CIccIO *pIO)
icValidateStatus ReadValidate (CIccIO *pIO, std::string &sReport)
bool Write (CIccIO *pIO)
void InitHeader ()
icValidateStatus Validate (std::string &sReport) const
icUInt16Number GetSpaceSamples () const
bool AreTagsUnique () const

Public Attributes

icHeader m_Header
TagEntryListm_Tags

Protected Member Functions

void Cleanup ()
IccTagEntryGetTag (icSignature sig) const
IccTagEntryGetTag (CIccTag *pTag) const
bool ReadBasic (CIccIO *pIO)
bool LoadTag (IccTagEntry *pTagEntry, CIccIO *pIO)
bool DetachTag (CIccTag *pTag)
icValidateStatus CheckRequiredTags (std::string &sReport) const
bool CheckTagExclusion (std::string &sReport) const
icValidateStatus CheckHeader (std::string &sReport) const
icValidateStatus CheckTagTypes (std::string &sReport) const
bool IsTypeValid (icTagSignature tagSig, icTagTypeSignature typeSig) const
bool CheckFileSize (CIccIO *pIO) const

Protected Attributes

CIccIOm_pAttachIO
TagPtrListm_TagVals


Detailed Description

Type: Class

Purpose: This is the base class for an ICC profile. All the operations on a profile is done using this object.


Constructor & Destructor Documentation

CIccProfile::CIccProfile  ) 
 

Name: CIccProfile::CIccProfile

Purpose: Constructor

CIccProfile::CIccProfile const CIccProfile Profile  ) 
 

Name: CIccProfile::CIccProfile

Purpose: Copy Constructor. The copy constructor makes the copy of the CIccProfile object in it's present state. It DOES NOT make a copy of the m_pAttachIO member variable. Any operation with the IO object should be done before making a copy.

Args: Profile = CIccProfile object which is to be copied.

CIccProfile::~CIccProfile  )  [virtual]
 

Name: CIccProfile::CIccProfile

Purpose: Destructor


Member Function Documentation

bool CIccProfile::AreTagsUnique  )  const
 

Name: CIccProfile::AreTagsUnique

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.

bool CIccProfile::Attach CIccIO pIO  ) 
 

Name: CIccProfile::Attach

Purpose: This allows for deferred IO with a profile. The profile header and tag directory will be read, but tag data will not be read. The IO object will remain attached to the profile for the purpose of reading data in as needed.

Args: pIO - pointer to IO object to begin reading profile file with.

Return: true - the IO object (file) is an ICC profile, and the CIccProfile object is now attached to the object, false - the IO object (file) is not an ICC profile.

bool CIccProfile::AttachTag icSignature  sig,
CIccTag pTag
 

Name: CIccProfile::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).

bool CIccProfile::CheckFileSize CIccIO pIO  )  const [protected]
 

Name: CIccProfile::CheckFileSize()

Purpose: Check if the Profile file size matches with the size mentioned in the header and is evenly divisible by four.

Args:

Return: true - size matches, false - size mismatches

icValidateStatus CIccProfile::CheckHeader std::string &  sReport  )  const [protected]
 

Name: CIccProfile::CheckHeader

Purpose: Validates profile header.

Return: icValidateOK if valid, or other error status.

icValidateStatus CIccProfile::CheckRequiredTags std::string &  sReport  )  const [protected]
 

Name: CIccProfile::CheckRequiredTags

Purpose: Check if the Profile has the required tags for the specified Profile/Device class.

Return: icValidateOK if valid, or other error status.

bool CIccProfile::CheckTagExclusion std::string &  sReport  )  const [protected]
 

Name: CIccProfile::CheckTagExclusion

Purpose: Some tags does not have a defined interpretation for a profile of a specific class. This function does these tests.

Return: true if test successful, else false.

icValidateStatus CIccProfile::CheckTagTypes std::string &  sReport  )  const [protected]
 

Name: CIccProfile::CheckTagTypes

Purpose: Check if tags have allowed tag types.

Return: icValidateOK if valid, or other error status.

void CIccProfile::Cleanup  )  [protected]
 

Name: CIccProfile::Cleanup

Purpose: Detach from a pending IO object

bool CIccProfile::DeleteTag icSignature  sig  ) 
 

Name: CIccProfile::DeleteTag

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

bool CIccProfile::Detach  ) 
 

Name: CIccProfile::Detach

Purpose: Discontinues the use of defferred IO with a profile. This can be done once all the information needed for performing a transform has been extracted from the profile.

Args: true - If an IO object was attached to the profile false - if no IO object was attached to the profile

bool CIccProfile::DetachTag CIccTag pTag  )  [protected]
 

Name: CIccProfile::DetachTag

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 CIccProfile object. The caller assumes ownership of the tag object.

Args: pTag - pointer to tag object unassociate with the profile object

Return: true - tag object found and unassociated with profile object, false - tag object not found

CIccTag * CIccProfile::FindTag icSignature  sig  ) 
 

Name: CIccProfile::FindTag

Purpose: Finds the tag object associated with the directory entry with the given signature. If the profile object is attached to an IO object then the tag may need to be loaded first.

Args: sig - tag signature to find in profile

Return: The desired tag object, or NULL if unable to find in the directory or load tag object.

icUInt16Number CIccProfile::GetSpaceSamples  )  const
 

Name: CIccProfile::GetSpaceSamples

Purpose: Get the number of device channels from the color space of data.

Return: Number of device channels.

IccTagEntry * CIccProfile::GetTag CIccTag pTag  )  const [protected]
 

Name: CIccProfile::GetTag

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 directory entry that points to the desired tag object, or NULL if tag object is not pointed to by any tag directory entries.

IccTagEntry * CIccProfile::GetTag icSignature  sig  )  const [protected]
 

Name: CIccProfile::GetTag

Purpose: Get a tag entry with a given signature

Args: sig - signature id to find in tag directory

Return: Pointer to desired tag directory entry, or NULL if not found.

void CIccProfile::InitHeader  ) 
 

Name: CIccProfile::InitHeader

Purpose: Initializes the data to be written in the profile header.

bool CIccProfile::IsTypeValid icTagSignature  tagSig,
icTagTypeSignature  typeSig
const [protected]
 

Name: CIccProfile::IsTypeValid

Purpose: Check if tags have allowed tag types.

Return: true if valid, else false.

bool CIccProfile::LoadTag IccTagEntry pTagEntry,
CIccIO pIO
[protected]
 

Name: CIccProfile::LoadTag

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

CIccProfile & CIccProfile::operator= const CIccProfile Profile  ) 
 

Name: CIccProfile::operator=

Purpose: Copy Operator. The copy operator makes the copy of the CIccProfile object in it's present state. It DOES NOT make a copy of the m_pAttachIO member variable. Any operation with the IO object should be done before making a copy.

Args: Profile = CIccProfile object which is to be copied.

bool CIccProfile::Read CIccIO pIO  ) 
 

Name: CIccProfile::Read

Purpose: This will read the entire ICC profile from the IO object into the CIccProfile object

Args: pIO - pointer to IO object to read ICC profile from

Return: true - the IO object (file) is an ICC profile, and the CIccProfile object now contains all its data, false - the IO object (file) is not an ICC profile.

bool CIccProfile::ReadBasic CIccIO pIO  )  [protected]
 

Name: CIccProfile::ReadBasic

Purpose: Read in ICC header and tag directory entries.

Args: pIO - pointer to IO object to read data with

Return: true - valid ICC header and tag directory, false - failure

icValidateStatus CIccProfile::ReadValidate CIccIO pIO,
std::string &  sReport
 

Name: CIccProfile::ReadValidate

Purpose: This will read the entire ICC profile from the IO object into the CIccProfile object

Args: pIO - pointer to IO object to read ICC profile from sReport - string to put validation report info into. String should be initialized before calling

Return: icValidateOK if file can be read, bad status otherwise.

icValidateStatus CIccProfile::Validate std::string &  sReport  )  const
 

Name: CIccProfile::Validate

Purpose: Check the data integrity of the profile, and conformance to the ICC specification

Args: sReport = String to put report into

Return: icValidateOK if profile is valid, warning/error level otherwise

bool CIccProfile::Write CIccIO pIO  ) 
 

Name: CIccProfile::Write

Purpose: Write the data associated with the CIccProfile object to an IO IO object.

Args: pIO - pointer to IO object to write data to

Return: true - success, false - failure


Member Data Documentation

icHeader CIccProfile::m_Header
 

CIccIO* CIccProfile::m_pAttachIO [protected]
 

TagEntryList* CIccProfile::m_Tags
 

TagPtrList* CIccProfile::m_TagVals [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 26 17:51:45 2007 for IccProfLib by  doxygen 1.3.9.1