DD::Image::BaseHandle Class Reference

Inherits DD::Image::RefCountedObject.

Inherited by DD::Image::Handle.

List of all members.

Public Member Functions

 BaseHandle (void *data, size_t size)
 ctor, sets the data and size
virtual ~BaseHandle ()=0
 Empty function - C++ requires an implementation for pure virtual destructors.
void * getAllocatedData () const
 Get the data that has been allocated at construction.
size_t getDataSize () const
 get the amount of data that is pointed to by this handle

Protected Attributes

void * _data
 our data blob
const size_t _size
 how big it is

Detailed Description

Base class for an object that allocates data in some way.

This class is meant to be derived from, the ctor of the derived class should set up the data pointer and size while it's dtor should destroy it. The destructor needs to be overridden for this to happen.

The data is allocated on constuction of the object and deallocated on destruction.