TuttleOFX  1
tuttle::host::memory::PoolData Class Reference
Inheritance diagram for tuttle::host::memory::PoolData:
Collaboration diagram for tuttle::host::memory::PoolData:

Public Member Functions

 PoolData (IPool &pool, const std::size_t size)
 ~PoolData ()
bool operator== (const PoolData &other) const
void addRef ()
void release ()
char * data ()
const char * data () const
const std::size_t size () const
const std::size_t reservedSize () const
void setSize (const std::size_t newSize)

Private Member Functions

 PoolData ()
 No default Ctor.
 PoolData (const PoolData &)
 No copy Ctor.

Private Attributes

IPool_pool
 ref to the owner pool
const std::size_t _id
 unique id to identify one memory data
const std::size_t _reservedSize
 memory allocated
std::size_t _size
 memory requested
char *const _pData
 own the data
int _refCount
 counter on clients currently using this data

Static Private Attributes

static std::size_t _count = 0
 unique id generator

Friends

class MemoryPool

Detailed Description

Definition at line 17 of file MemoryPool.cpp.


Constructor & Destructor Documentation

tuttle::host::memory::PoolData::PoolData ( ) [private]

No default Ctor.

tuttle::host::memory::PoolData::PoolData ( const PoolData ) [private]

No copy Ctor.

tuttle::host::memory::PoolData::PoolData ( IPool pool,
const std::size_t  size 
) [inline]

Definition at line 25 of file MemoryPool.cpp.

tuttle::host::memory::PoolData::~PoolData ( ) [inline]

Definition at line 34 of file MemoryPool.cpp.

References _pData.


Member Function Documentation

void tuttle::host::memory::PoolData::addRef ( ) [virtual]

Implements tuttle::host::memory::IUnknown.

Definition at line 81 of file MemoryPool.cpp.

References _pool, _refCount, and tuttle::host::memory::IPool::referenced().

Here is the call graph for this function:

char* tuttle::host::memory::PoolData::data ( ) [inline, virtual]

Implements tuttle::host::memory::IPoolData.

Definition at line 48 of file MemoryPool.cpp.

References _pData.

Referenced by tuttle::host::memory::MemoryPool::referenced().

const char* tuttle::host::memory::PoolData::data ( ) const [inline, virtual]

Implements tuttle::host::memory::IPoolData.

Definition at line 49 of file MemoryPool.cpp.

References _pData.

bool tuttle::host::memory::PoolData::operator== ( const PoolData other) const [inline]

Definition at line 40 of file MemoryPool.cpp.

References _id.

void tuttle::host::memory::PoolData::release ( ) [virtual]

Implements tuttle::host::memory::IUnknown.

Definition at line 87 of file MemoryPool.cpp.

References _pool, _refCount, and tuttle::host::memory::IPool::released().

Here is the call graph for this function:

const std::size_t tuttle::host::memory::PoolData::reservedSize ( ) const [inline, virtual]

Implements tuttle::host::memory::IPoolData.

Definition at line 51 of file MemoryPool.cpp.

References _reservedSize.

void tuttle::host::memory::PoolData::setSize ( const std::size_t  newSize) [inline, virtual]

Implements tuttle::host::memory::IPoolData.

Definition at line 53 of file MemoryPool.cpp.

References _reservedSize, and _size.

const std::size_t tuttle::host::memory::PoolData::size ( ) const [inline, virtual]

Implements tuttle::host::memory::IPoolData.

Definition at line 50 of file MemoryPool.cpp.

References _size.


Friends And Related Function Documentation

friend class MemoryPool [friend]

Definition at line 22 of file MemoryPool.cpp.


Field Documentation

std::size_t tuttle::host::memory::PoolData::_count = 0 [static, private]

unique id generator

Definition at line 60 of file MemoryPool.cpp.

const std::size_t tuttle::host::memory::PoolData::_id [private]

unique id to identify one memory data

Definition at line 62 of file MemoryPool.cpp.

Referenced by operator==().

own the data

Definition at line 65 of file MemoryPool.cpp.

Referenced by data(), and ~PoolData().

ref to the owner pool

Definition at line 61 of file MemoryPool.cpp.

Referenced by addRef(), and release().

counter on clients currently using this data

Definition at line 66 of file MemoryPool.cpp.

Referenced by addRef(), and release().

const std::size_t tuttle::host::memory::PoolData::_reservedSize [private]

memory allocated

Definition at line 63 of file MemoryPool.cpp.

Referenced by reservedSize(), and setSize().

memory requested

Definition at line 64 of file MemoryPool.cpp.

Referenced by setSize(), and size().


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