00001 00033 #ifndef INC_SPATMOD_IMAGESAMPLETABLE_H 00034 #define INC_SPATMOD_IMAGESAMPLETABLE_H 00035 00036 #ifndef INC_SPATMOD_IMAGESAMPLE_H 00037 #include <spatmod/imagesample.h> 00038 #endif 00039 00040 #ifndef INC_MI32_MIDBLARY_H 00041 #include <mi32/midblary.h> 00042 #endif 00043 00044 namespace SPATMOD { 00045 namespace IMAGE { 00046 00047 //===================================================================================================================== 00048 00050 class SAMPLETABLE { 00051 public: 00052 00054 SAMPLETABLE (); 00055 00057 SAMPLETABLE ( 00058 const SAMPLETABLE& rhs 00059 ); 00060 00062 ~SAMPLETABLE (); 00063 00065 SAMPLETABLE& operator= ( 00066 const SAMPLETABLE& rhs 00067 ); 00068 00071 ERRVALUE Create ( 00072 const SAMPLE& SampleProperties, 00073 UINT32 NumItems, 00074 const void *pValues = 0 00075 ); 00076 00078 void Exchange ( 00079 SAMPLETABLE& other 00080 ); 00081 00083 UINT32 GetNumItems ( 00084 ) const { return (m_NumItems); } 00085 00088 const void* GetPtrItem ( 00089 UINT32 ItemIndex 00090 ) const { return (static_cast<const UINT8*>(GetPtrItems()) + ItemIndex * m_SampleProperties.GetNumBytes()); } 00091 00093 const void* GetPtrItems ( 00094 ) const { return (static_cast<const void*>(m_Values.GetPointer())); } 00095 00097 void* GetPtrItems ( 00098 ) { return (static_cast<void*>(m_Values.GetPointer())); } 00099 00101 const SAMPLE& GetSampleProperties ( 00102 ) const { return (m_SampleProperties); } 00103 00105 ERRVALUE SetAllItems ( 00106 const SAMPLE& value 00107 ); 00108 00110 ERRVALUE SetItem ( 00111 UINT32 index, 00112 const SAMPLE& value 00113 ); 00114 00116 ERRVALUE SetItem ( 00117 UINT32 index, 00118 double value 00119 ); 00120 00122 ERRVALUE SetItems ( 00123 UINT32 StartIndex, 00124 const void *pValues, 00125 UINT32 NumItems = 1 00126 ); 00127 00128 private: 00129 #ifndef GENERATING_DOXYGEN_OUTPUT 00130 SAMPLE m_SampleProperties; 00131 MIDOUBLEARRAY m_Values; 00132 UINT32 m_NumItems; 00133 00134 #endif // GENERATING_DOXYGEN_OUTPUT 00135 }; 00136 00137 //===================================================================================================================== 00138 00139 } // End namespace IMAGE 00140 } // End namespace SPATMOD 00141 00142 #endif // INC_SPATMOD_IMAGESAMPLETABLE_H
1.6.1