IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
MemoryPlanStorage.h
1 // MemoryPlanStorage.h:
3 // --------------------
4 //
14 
15 #ifndef __IPSDKIMAGE_MEMORYPLANSTORAGE_H__
16 #define __IPSDKIMAGE_MEMORYPLANSTORAGE_H__
17 
18 #include <IPSDKImage/Storage/BasePlanStorage.h>
19 #include <IPSDKBaseData/Buffer/TypedOwnBuffer.h>
20 
21 namespace ipsdk {
22 namespace image {
23 
26 
28 {
29  // declare dynamic serializable class
31 
32 // predefined public types
33 public:
35  static const ePlanStorageType::domain g_planStorageType = ePlanStorageType::ePST_Memory;
36 
37 public:
43 
44 // methods
45 public:
47  ePlanStorageType getPlanStorageType() const;
48 
51  BoolResult init(const ImagePlanGeometry& planGeometry);
52 
55  eImageAccessMode getAccessMode() const;
56 
60  const void* getDataPtr() const;
61  void* getDataPtr();
63 
66  bool canBeRemotlyAccessed() const;
67 
71  bool hasBinary8BitsStorage() const;
72 
75  ipUInt64 getFullBufferSize() const;
76 
82  const TypedOwnBuffer& getBuffer() const;
83  TypedOwnBuffer& getBuffer();
85 
86 protected:
89  BoolResult resizePlan(const ImagePlanGeometry& planGeometry);
90 
93  BoolResult readRawData(const ipUInt64 startOffset,
94  const ipUInt64 size,
95  void* pData) const;
96 
101  BoolResult writeRawData(const ipUInt64 startOffset,
102  const ipUInt64 size,
103  const void* pData);
104 
106  void clearPlanData();
107 
108 // attributes
109 protected:
112 };
113 
116 
117 inline ePlanStorageType
119 {
120  return g_planStorageType;
121 }
122 
125 
126 } // end of namespace image
127 } // end of namespace ipsdk
128 
129 #endif // __IPSDKIMAGE_MEMORYPLANSTORAGE_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
uint64_t ipUInt64
Base types definition.
Definition: BaseTypes.h:55
ePlanStorageType getPlanStorageType() const
retrieve plan storage type
Definition: MemoryPlanStorage.h:118
Base class for image plan data storage.
Definition: BasePlanStorage.h:38
#define IPSDK_DECLARE_SERIAL_WITHOUT_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:79
#define IPSDKIMAGE_API
Import/Export macro for library IPSDKImage.
Definition: IPSDKImageExports.h:27
Class encapsulating image plan geometry.
Definition: ImagePlanGeometry.h:33
ePlanStorageType
Enumerate describing plan storage type.
Definition: PlanStorageTypes.h:33
Class encapsulating memory plan data.
Definition: MemoryPlanStorage.h:27
TypedOwnBuffer _buffer
buffer associated to storage
Definition: MemoryPlanStorage.h:111
static const ePlanStorageType::domain g_planStorageType
plan storage type
Definition: MemoryPlanStorage.h:35
Dynamically typed buffer class.
Definition: TypedOwnBuffer.h:25
eImageAccessMode
Image access mode.
Definition: ImageTypes.h:110
memory plan storage
Definition: PlanStorageTypes.h:35