CoreLinux++
0.4.32
|
AbstractAllocator is a abstract template which provides for the extension of memory managment on a TypeImpl object by TypeImpl object basis. More...
#include <AbstractAllocator.hpp>
Public Member Functions | |
AbstractAllocator (void) | |
Default constructor. | |
AbstractAllocator (const AbstractAllocator &aRef) | |
Copy constructor. More... | |
virtual | ~AbstractAllocator (void) |
Virtual destructor. | |
AbstractAllocator & | operator= (const AbstractAllocator &aRef) |
Assingment operator overload. More... | |
bool | operator== (const AbstractAllocator &aRef) const |
Equality operator overload. More... | |
TypeImpl * | createType (void) |
Create type will invoke the allocateObject method of the derivation and will increment the number of allocations. More... | |
void | destroyType (TypeImpl *aPtr) |
Destroy type will invoke the deallocateObject method of the derivation and will increment the number of deallocation. More... | |
![]() | |
Allocator (void) | |
Default constructor. | |
Allocator (AllocatorCref) | |
Copy constructor. More... | |
virtual | ~Allocator (void) |
Virtual destructor. | |
Allocator & | operator= (AllocatorCref) |
Assingment operator overload. More... | |
bool | operator== (AllocatorCref) const |
Equality operator overload. More... | |
virtual CountCref | getAllocateCount (void) const |
Retrieves the number of allocations by this Allocator. More... | |
virtual CountCref | getDeallocateCount (void) const |
Retrieves the number of deallocations by this Allocator. More... | |
virtual void | incrementAllocates (void) |
Increment the allocates. | |
virtual void | decrementAllocates (void) |
Decrement the allocates. | |
virtual void | incrementDeallocates (void) |
Increment the deallocates. | |
virtual void | decrementDeallocates (void) |
Decrement the deallocates. | |
![]() | |
Strategy (void) | |
Default Constructor. | |
Strategy (StrategyCref) | |
Copy Constructor. More... | |
virtual | ~Strategy (void) |
Virtual Destructor. | |
StrategyRef | operator= (StrategyCref) |
Assignment operator overload. More... | |
bool | operator== (StrategyCref) const |
Equality operator overload. More... | |
bool | operator!= (StrategyCref) const |
Non-equality operator overload. More... | |
Protected Member Functions | |
virtual TypeImpl * | allocateObject (void)=0 |
allocates a object in the subclass More... | |
virtual void | deallocateObject (TypeImpl *)=0 |
de-allocates a object in the subclass More... | |
AbstractAllocator is a abstract template which provides for the extension of memory managment on a TypeImpl object by TypeImpl object basis.
The derivation needs to implement the allocateObject and deallocateObject mutators for memory management.
|
inline |
Copy constructor.
AbstractAllocator | const reference |
|
protectedpure virtual |
allocates a object in the subclass
Referenced by corelinux::AbstractAllocator< TypeImpl >::createType(), and corelinux::AbstractAllocator< TypeImpl >::destroyType().
|
inline |
Create type will invoke the allocateObject method of the derivation and will increment the number of allocations.
In the event of any exception, the allocation count will be adjusted.
any |
References corelinux::AbstractAllocator< TypeImpl >::allocateObject(), corelinux::Allocator::decrementAllocates(), and corelinux::Allocator::incrementAllocates().
|
protectedpure virtual |
de-allocates a object in the subclass
TypeImpl | pointer |
Referenced by corelinux::AbstractAllocator< TypeImpl >::destroyType().
|
inline |
Destroy type will invoke the deallocateObject method of the derivation and will increment the number of deallocation.
In the event of any exception, the deallocation count will be adjusted
TypeImpl | pointer |
any |
References corelinux::AbstractAllocator< TypeImpl >::allocateObject(), corelinux::AbstractAllocator< TypeImpl >::deallocateObject(), corelinux::Allocator::decrementDeallocates(), and corelinux::Allocator::incrementDeallocates().
|
inline |
Assingment operator overload.
AbstractAllocator | const reference |
References corelinux::Allocator::operator=().
|
inline |
Equality operator overload.
AbstractAllocator | const reference |
References corelinux::Allocator::operator==().