IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
BaseBuffer.h
1 // BaseBuffer.h:
3 // -------------
4 //
14 
15 #ifndef __IPSDKBASEDATA_BASEBUFFER_H__
16 #define __IPSDKBASEDATA_BASEBUFFER_H__
17 
18 // warnings removal
19 // warning C4251: 'ipsdk::BaseBuffer::_dataType' : class 'ipsdk::eDataType' needs to have dll-interface to be used by clients of class 'ipsdk::BaseBuffer'
20 #pragma warning (push)
21 #pragma warning (disable : 4275 4251)
22 
25 #include <IPSDKSerialization/Engine/BaseObjectWithSkeleton.h>
26 #include <IPSDKUtil/BaseTypes.h>
27 #include <boost/dynamic_bitset.hpp>
28 
29 namespace ipsdk {
30 
33 
35 {
36  // declare dynamic class
38 
39 public:
42  BaseBuffer();
43  virtual ~BaseBuffer() = 0;
45 
46 // methods
47 public:
49  virtual eBufferType getBufferType() const = 0;
50 
54  bool isInit() const;
55 
59  ipUInt64 getSize() const;
60 
65 
69  ipUInt64 getMemorySize() const;
70 
74  const eDataType& getDataType() const;
75 
77  void clear();
78 
79 protected:
83  void initBase(const ipUInt64 size,
84  const eDataType& dataType);
85 
87  virtual void clearDerived() {}
88 
89 // attributes
90 private:
92  ipUInt64 _size;
93 
95  eDataType _dataType;
96 
98  ipUInt32 _bufferBaseSize;
99 
101  bool _bInit;
102 };
103 
106 
107 inline bool
109 {
110  return _bInit;
111 }
112 
115 
116 } // end of namespace ipsdk
117 
118 #pragma warning (pop)
119 
120 #endif // __IPSDKBASEDATA_BASEBUFFER_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
#define IPSDK_DECLARE_ABSTRACT_DYNAMIC_WITHOUT_COPY(libraryName, className)
macro enabling dynamic properties on abstract class and disabling copy support
Definition: DynamicHdrMacro.h:102
Definition of import/export macro for library.
Predefined types for buffer manipulations.
IPSDKBASEDATA_API ipUInt32 getBufferBaseSize(const eDataType &dataType)
recovery of buffer size from its type (in octets)
Base types for multiplatform compatibility.
virtual void clearDerived()
clear method instanciation in derived class
Definition: BaseBuffer.h:87
eDataType
Enumerate describing a base type.
Definition: BaseTypes.h:77
Base class for buffer encapsulation.
Definition: BaseBuffer.h:34
Base class for serialization object with three serialization modes :
Definition: BaseObjectWithSkeleton.h:33
bool isInit() const
Definition: BaseBuffer.h:108
eBufferType
Enumerate describing buffer types.
Definition: BufferTypes.h:36
#define IPSDKBASEDATA_API
Import/Export macro for library IPSDKUtil.
Definition: IPSDKBaseDataExports.h:27
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53