IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ipsdk::HybridBuffer Class Reference

Class allowing to encapsulate an hybrid form of buffer. More...

#include <HybridBuffer.h>

Inheritance diagram for ipsdk::HybridBuffer:
ipsdk::BaseBlockBuffer ipsdk::BaseBuffer ipsdk::BaseObjectWithSkeleton ipsdk::BaseSerializationObject ipsdk::BaseDynamicObject

Public Member Functions

eBufferType getBufferType () const
 retrieve buffer type
 
void init (const ipUInt64 size, const eDataType &dataType, void *pData)
 generic initialisation method for buffer from external data More...
 
template<typename T >
void init (const ipUInt64 size, T *pData)
 specialized initialisation method for buffer from external data
 
void init (const ipUInt64 size, const eDataType &dataType)
 initialization method for buffer with own data More...
 
bool isBufferOwn () const
 check whether buffer is own More...
 
Constructors and destructors
 HybridBuffer ()
 
 ~HybridBuffer ()
 
- Public Member Functions inherited from ipsdk::BaseBlockBuffer
 BaseBlockBuffer ()
 
virtual ~BaseBlockBuffer ()=0
 
const void * getDataPtr () const
 retrieve buffer data More...
 
void * getDataPtr ()
 retrieve buffer data More...
 
const void * getDataPtr (const ipUInt64 offset) const
 retrieve buffer data associated to a given offset More...
 
void * getDataPtr (const ipUInt64 offset)
 retrieve buffer data associated to a given offset More...
 
- Public Member Functions inherited from ipsdk::BaseBuffer
bool isInit () const
 
ipUInt64 getSize () const
 retrieve buffer size More...
 
ipUInt32 getBufferBaseSize () const
 retrieve buffer base size More...
 
ipUInt64 getMemorySize () const
 retrieve buffer memory size (in octets) More...
 
const eDataTypegetDataType () const
 retrieve buffer data type More...
 
void clear ()
 delete buffer data
 
 BaseBuffer ()
 
virtual ~BaseBuffer ()=0
 
- Public Member Functions inherited from ipsdk::BaseObjectWithSkeleton
const eSklSrzModegetSerializationMode () const
 retrieve serialization flag for object More...
 
void setSerializationMode (const eSklSrzMode &sklSrzMode) const
 set serialization flag for object
 
 BaseObjectWithSkeleton ()
 
 ~BaseObjectWithSkeleton ()
 
- Public Member Functions inherited from ipsdk::BaseSerializationObject
 BaseSerializationObject ()
 Default constructor.
 
virtual ~BaseSerializationObject ()=0
 destructor
 
- Public Member Functions inherited from ipsdk::BaseDynamicObject
virtual const std::string & getClassName () const
 method allowing to retrieve object class name
 
virtual BaseDynamicObjectcreateNew () const =0
 method allowing to create new instance of current object type
 
virtual DynamicObjectPtr createShared () const =0
 method allowing to create new shared instance of current object type
 
virtual bool hasCopySupport () const =0
 check whether objet has copy support
 
virtual BaseDynamicObjectduplicate () const =0
 method allowing to duplicate current object More...
 
virtual DynamicObjectPtr duplicateShared () const =0
 method allowing shared duplication of current object More...
 
 BaseDynamicObject ()
 
virtual ~BaseDynamicObject ()=0
 

Protected Member Functions

void clearDerived ()
 clear method instanciation in derived class
 
- Protected Member Functions inherited from ipsdk::BaseBlockBuffer
void initBase (const ipUInt64 size, const eDataType &dataType, void *pData)
 initialization of base class More...
 
- Protected Member Functions inherited from ipsdk::BaseBuffer
void initBase (const ipUInt64 size, const eDataType &dataType)
 initialization of base class More...
 
- Protected Member Functions inherited from ipsdk::BaseSerializationObject
virtual BoolResult write (BaseOArchive &ar) const
 method allowing to ensure serialization write part for object
 
virtual BoolResult read (BaseIArchive &ar)
 method allowing to ensure serialization read part for object
 
- Protected Member Functions inherited from ipsdk::BaseDynamicObject
virtual void initCtorCopy (const BaseDynamicObject &object)
 
virtual void copy (const BaseDynamicObject &object)
 method allowing to copy data from another object
 

Protected Attributes

boost::scoped_array< ipUInt8_pBufferData
 own buffer data
 
- Protected Attributes inherited from ipsdk::BaseObjectWithSkeleton
eSklSrzMode _sklSrzMode
 serialization flag for object More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ipsdk::BaseSerializationObject
static ipUInt32 getVersion ()
 method allowing to retrieve class version information for serialization
 
- Static Public Member Functions inherited from ipsdk::BaseDynamicObject
static const std::string & getTypeName ()
 method allowing to retrieve name associated to class
 

Detailed Description

Class allowing to encapsulate an hybrid form of buffer.

Author
E. Noirfalise
Date
2013/5/15

This buffer can be alternatively own or external

When buffer is own, resize and reinit operations conduce to reallocation only if size differ.

When restored (via serialization), an already initialized buffer will try to match restored data with its buffer.

Member Function Documentation

◆ init() [1/2]

void ipsdk::HybridBuffer::init ( const ipUInt64  size,
const eDataType dataType,
void *  pData 
)

generic initialisation method for buffer from external data

Exceptions
ipsdk::IPSDKBaseDataExceptionif dataType == eDataType::eDT_None

◆ init() [2/2]

void ipsdk::HybridBuffer::init ( const ipUInt64  size,
const eDataType dataType 
)

initialization method for buffer with own data

Exceptions
ipsdk::IPSDKBaseDataExceptionif dataType == eDataType::eDT_None
ipsdk::IPSDKBaseDataExceptionif can't allocate memory

◆ isBufferOwn()

bool ipsdk::HybridBuffer::isBufferOwn ( ) const

check whether buffer is own

Exceptions
ipsdk::IPSDKBaseDataExceptionif isInit() == false

The documentation for this class was generated from the following file: