IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HybridBuffer.h
1 // HybridBuffer.h:
3 // ---------------
4 //
35 
36 #ifndef __IPSDKBASEDATA_HYBRIDBUFFER_H__
37 #define __IPSDKBASEDATA_HYBRIDBUFFER_H__
38 
39 // suppression warnings
40 // warning C4251: 'ipsdk::HybridBuffer::_pBufferData' : class 'boost::scoped_array<T>' needs to have dll-interface to be used by clients of class 'ipsdk::HybridBuffer'
41 #pragma warning (push)
42 #pragma warning (disable : 4251)
43 
44 #include <IPSDKBaseData/Buffer/BaseBlockBuffer.h>
45 #include <boost/scoped_array.hpp>
46 
47 namespace ipsdk {
48 
51 
53 {
54  // declare serial class
56 
57 public:
60  HybridBuffer();
61  ~HybridBuffer();
63 
64 // methods
65 public:
67  eBufferType getBufferType() const;
68 
72  void init(const ipUInt64 size,
73  const eDataType& dataType,
74  void* pData);
75 
77  template <typename T>
78  void init(const ipUInt64 size,
79  T* pData);
80 
86  void init(const ipUInt64 size,
87  const eDataType& dataType);
88 
92  bool isBufferOwn() const;
93 
94 protected:
96  void clearDerived();
97 
98 // attributes
99 protected:
101  boost::scoped_array<ipUInt8> _pBufferData;
102 };
103 
106 
107 inline eBufferType
109 {
111 }
112 
115 
116 } // end of namespace ipsdk
117 
118 #pragma warning (pop)
119 
120 #endif // __IPSDKBASEDATA_HYBRIDBUFFER_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
Hybrid buffer.
Definition: BufferTypes.h:42
Base class for mono block buffers.
Definition: BaseBlockBuffer.h:25
boost::scoped_array< ipUInt8 > _pBufferData
own buffer data
Definition: HybridBuffer.h:101
eBufferType getBufferType() const
retrieve buffer type
Definition: HybridBuffer.h:108
eDataType
Enumerate describing a base type.
Definition: BaseTypes.h:77
Class allowing to encapsulate an hybrid form of buffer.
Definition: HybridBuffer.h:52
eBufferType
Enumerate describing buffer types.
Definition: BufferTypes.h:36
#define IPSDKBASEDATA_API
Import/Export macro for library IPSDKUtil.
Definition: IPSDKBaseDataExports.h:27