DocumentationOverviewBuilding ASL Documentation Library Wiki Docs Indices Browse Perforce More InfoRelease NotesWiki Site Search License Success Stories Contributors MediaDownloadPerforce Depots SupportASL SourceForge HomeMailing Lists Discussion Forums Report Bugs Suggest Features Contribute to ASL RSSShort-text newsFull-text news File releases Other Adobe ProjectsAdobe AirAdobe GIL Adobe Labs Adobe Media Gallery Adobe XMP Tamarin project (Mozilla Foundation) Other ResourcesBoostRIAForge SGI STL |
dng_opcode_list.h00001 /*****************************************************************************/ 00002 // Copyright 2008-2009 Adobe Systems Incorporated 00003 // All Rights Reserved. 00004 // 00005 // NOTICE: Adobe permits you to use, modify, and distribute this file in 00006 // accordance with the terms of the Adobe license agreement accompanying it. 00007 /*****************************************************************************/ 00008 00009 /* $Id: //mondo/workarea/stern/camera_raw/dng_sdk/source/dng_opcode_list.h#8 $ */ 00010 /* $DateTime: 2009/05/29 23:35:32 $ */ 00011 /* $Change: 570796 $ */ 00012 /* $Author: stern $ */ 00013 00014 /*****************************************************************************/ 00015 00016 #ifndef __dng_opcode_list__ 00017 #define __dng_opcode_list__ 00018 00019 /*****************************************************************************/ 00020 00021 #include "dng_auto_ptr.h" 00022 #include "dng_classes.h" 00023 #include "dng_opcodes.h" 00024 00025 #include <vector> 00026 00027 /*****************************************************************************/ 00028 00029 class dng_opcode_list 00030 { 00031 00032 private: 00033 00034 std::vector<dng_opcode *> fList; 00035 00036 bool fAlwaysApply; 00037 00038 uint32 fStage; 00039 00040 public: 00041 00042 dng_opcode_list (uint32 stage); 00043 00044 ~dng_opcode_list (); 00045 00046 bool IsEmpty () const 00047 { 00048 return fList.size () == 0; 00049 } 00050 00051 bool NotEmpty () const 00052 { 00053 return !IsEmpty (); 00054 } 00055 00056 bool AlwaysApply () const 00057 { 00058 return fAlwaysApply && NotEmpty (); 00059 } 00060 00061 void SetAlwaysApply () 00062 { 00063 fAlwaysApply = true; 00064 } 00065 00066 uint32 Count () const 00067 { 00068 return (uint32) fList.size (); 00069 } 00070 00071 dng_opcode & Entry (uint32 index) 00072 { 00073 return *fList [index]; 00074 } 00075 00076 const dng_opcode & Entry (uint32 index) const 00077 { 00078 return *fList [index]; 00079 } 00080 00081 void Clear (); 00082 00083 uint32 MinVersion (bool includeOptional) const; 00084 00085 void Apply (dng_host &host, 00086 dng_negative &negative, 00087 AutoPtr<dng_image> &image); 00088 00089 void Append (AutoPtr<dng_opcode> &opcode); 00090 00091 dng_memory_block * Spool (dng_host &host) const; 00092 00093 void FingerprintToStream (dng_stream &stream) const; 00094 00095 void Parse (dng_host &host, 00096 dng_stream &stream, 00097 uint32 byteCount, 00098 uint64 streamOffset); 00099 00100 private: 00101 00102 // Hidden copy constructor and assignment operator. 00103 00104 dng_opcode_list (const dng_opcode_list &list); 00105 00106 dng_opcode_list & operator= (const dng_opcode_list &list); 00107 00108 }; 00109 00110 /*****************************************************************************/ 00111 00112 #endif 00113 00114 /*****************************************************************************/ |