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

IccTagProfSeqId.h

Go to the documentation of this file.
00001 
00012 /*
00013 * The ICC Software License, Version 0.1
00014 *
00015 *
00016 * Copyright (c) 2005 The International Color Consortium. All rights 
00017 * reserved.
00018 *
00019 * Redistribution and use in source and binary forms, with or without
00020 * modification, are permitted provided that the following conditions
00021 * are met:
00022 *
00023 * 1. Redistributions of source code must retain the above copyright
00024 *    notice, this list of conditions and the following disclaimer. 
00025 *
00026 * 2. Redistributions in binary form must reproduce the above copyright
00027 *    notice, this list of conditions and the following disclaimer in
00028 *    the documentation and/or other materials provided with the
00029 *    distribution.
00030 *
00031 * 3. The end-user documentation included with the redistribution,
00032 *    if any, must include the following acknowledgment:  
00033 *       "This product includes software developed by the
00034 *        The International Color Consortium (www.color.org)"
00035 *    Alternately, this acknowledgment may appear in the software itself,
00036 *    if and wherever such third-party acknowledgments normally appear.
00037 *
00038 * 4. In the absence of prior written permission, the names "ICC" and "The
00039 *    International Color Consortium" must not be used to imply that the
00040 *    ICC organization endorses or promotes products derived from this
00041 *    software.
00042 *
00043 *
00044 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00045 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00046 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00047 * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
00048 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00049 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00050 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00051 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00052 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00053 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00054 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00055 * SUCH DAMAGE.
00056 * ====================================================================
00057 *
00058 * This software consists of voluntary contributions made by many
00059 * individuals on behalf of the The International Color Consortium. 
00060 *
00061 *
00062 * Membership in the ICC is encouraged when this software is used for
00063 * commercial purposes. 
00064 *
00065 *  
00066 * For more information on The International Color Consortium, please
00067 * see <http://www.color.org/>.
00068 *  
00069 * 
00070 */
00071 
00073 // HISTORY:
00074 //
00075 // -Jun 3, 2007 
00076 //  Initial CIccTagProfSeqId development
00077 //
00079 
00080 #ifndef _ICCTAGPROFSEQID_H
00081 #define _ICCTAGPROFSEQID_H
00082 
00083 #include "IccProfile.h"
00084 #include "IccTag.h"
00085 #include <memory>
00086 #include <list>
00087 
00088 #ifdef USESAMPLEICCNAMESPACE
00089 namespace sampleICC {
00090 #endif
00091 
00092 class ICCPROFLIB_API CIccProfileIdDesc
00093 {
00094 public:
00095   CIccProfileIdDesc();
00096   CIccProfileIdDesc(CIccProfile &profile);
00097   CIccProfileIdDesc(icProfileID id, CIccTagMultiLocalizedUnicode desc);
00098   CIccProfileIdDesc(const CIccProfileIdDesc &pid);
00099   CIccProfileIdDesc &operator=(const CIccProfileIdDesc &pid);
00100 
00101   void Describe(std::string &sDescription);
00102 
00103   bool Read(icUInt32Number size, CIccIO *pIO);
00104   bool Write(CIccIO *pIO);
00105 
00106   icValidateStatus Validate(icTagSignature sig, std::string &sReport, const CIccProfile* pProfile=NULL) const;
00107 
00108   CIccTagMultiLocalizedUnicode m_desc;
00109   icProfileID m_profileID;
00110 };
00111 
00112 typedef std::list<CIccProfileIdDesc> CIccProfileIdDescList;
00113 
00121 class ICCPROFLIB_API CIccTagProfileSequenceId : public CIccTag
00122 {
00123 public:
00124   CIccTagProfileSequenceId();
00125   CIccTagProfileSequenceId(const CIccTagProfileSequenceId &lut);
00126   CIccTagProfileSequenceId &operator=(const CIccTagProfileSequenceId &lut);
00127   virtual CIccTag *NewCopy() const { return new CIccTagProfileSequenceId(*this);}
00128   virtual ~CIccTagProfileSequenceId();
00129 
00130   static CIccTagProfileSequenceId *ParseMem(icUInt8Number *pMem, icUInt32Number size);
00131 
00132   virtual icTagTypeSignature GetType() { return icSigProfileSequceIdType; }
00133   virtual const icChar *GetClassName() { return "CIccTagProfileSequenceId"; }
00134 
00135   virtual void Describe(std::string &sDescription);
00136 
00137   virtual bool Read(icUInt32Number size, CIccIO *pIO);
00138   virtual bool Write(CIccIO *pIO);
00139 
00140   virtual icValidateStatus Validate(icTagSignature sig, std::string &sReport, const CIccProfile* pProfile=NULL) const;
00141 
00142   bool AddProfileDescription(CIccProfile &profile) { return AddProfileDescription(CIccProfileIdDesc(profile)); }
00143   bool AddProfileDescription(const CIccProfileIdDesc &profileDesc);
00144 
00145   CIccProfileIdDesc *GetFirst();
00146   CIccProfileIdDesc *GetLast();
00147 
00148   CIccProfileIdDescList::iterator begin() { return m_list->begin(); }
00149   CIccProfileIdDescList::iterator end() { return m_list->end(); }
00150 
00151 protected:
00152   void Cleanup();
00153 
00154   CIccProfileIdDescList *m_list;
00155 };
00156 
00157 
00158 
00159 //CIccTagProfSeq support
00160 #ifdef USESAMPLEICCNAMESPACE
00161 }
00162 #endif
00163 
00164 #endif //_ICCTAGPROFSEQID_H

Generated on Tue Jun 26 17:51:43 2007 for IccProfLib by  doxygen 1.3.9.1