00001 00024 #ifndef __VETLIB_VETBUFFER_H__ 00025 #define __VETLIB_VETBUFFER_H__ 00026 00027 #include "vetDefs.h" 00028 00029 00030 template<class T> 00031 class vetBuffer 00032 { 00033 protected: 00034 00035 00039 long v_fcount; 00040 00041 00045 bool copyData; 00046 00047 public: 00048 00049 00053 vetBuffer() { } 00054 00055 00059 virtual ~vetBuffer() { } 00060 00061 00062 00070 void setDoDataCopy(bool value = true) 00071 { 00072 copyData = value; 00073 }; 00074 00080 bool isDataCopyEnabled() const { return copyData; }; 00081 00082 00088 virtual VETRESULT reset() = 0; 00089 00090 00096 virtual VETRESULT deleteFrames() = 0; 00097 00098 00099 00100 00110 virtual VETRESULT addFrame(T* newFrame) = 0; 00111 00122 virtual VETRESULT insertFrame(long index, T* newFrame) = 0; 00123 00134 virtual VETRESULT updateFrame(long index, T* newFrame, bool removeold) = 0; 00135 00136 00137 00138 00147 virtual VETRESULT removeFrame(long index, bool freeData = false) = 0; 00148 00157 virtual VETRESULT removeFrame(T* frameToDelete, bool freeData = false) = 0; 00158 00159 00160 00161 00169 long getFramesCount() const { return v_fcount; }; 00170 00176 virtual long getCurrentFrameIndex() const = 0; 00177 00185 virtual T* getFrame(long index) = 0; 00186 00193 virtual VETRESULT goToNextFrame() = 0; 00194 00201 virtual VETRESULT goToPreviousFrame() = 0; 00202 00208 virtual VETRESULT goToFirstFrame() = 0; 00209 00215 virtual VETRESULT goToLastFrame() = 0; 00216 00225 virtual VETRESULT goToFrame(long index) = 0; 00226 00235 virtual VETRESULT goToStepFrame(long offset) = 0; 00236 00237 00243 virtual T* getLastFrame() = 0; 00244 00250 virtual T* getFirstFrame() = 0; 00251 00257 virtual T* getNextFrame() = 0; 00258 00264 virtual T* getPreviousFrame() = 0; 00265 00271 virtual T* getCurrentFrame() = 0; 00272 00279 enum{ vetClassType = VETCLASS_TYPE_BUFFER }; 00280 00281 }; 00282 00283 00284 #endif //__VETLIB_VETBUFFER_H__ 00285
1.4.4