#include <AbstractAllocator.hpp>
Public Member Functions | |
AbstractAllocator (void) | |
Default constructor. | |
AbstractAllocator (const AbstractAllocator &aRef) | |
Copy constructor. | |
virtual | ~AbstractAllocator (void) |
Virtual destructor. | |
AbstractAllocator & | operator= (const AbstractAllocator &aRef) |
Assingment operator overload. | |
bool | operator== (const AbstractAllocator &aRef) const |
Equality operator overload. | |
TypeImpl * | createType (void) |
Create type will invoke the allocateObject method of the derivation and will increment the number of allocations. | |
void | destroyType (TypeImpl *aPtr) |
Destroy type will invoke the deallocateObject method of the derivation and will increment the number of deallocation. | |
Protected Member Functions | |
virtual TypeImpl * | allocateObject (void)=0 |
allocates a object in the subclass | |
virtual void | deallocateObject (TypeImpl *)=0 |
de-allocates a object in the subclass |
The derivation needs to implement the allocateObject and deallocateObject mutators for memory management.
corelinux::AbstractAllocator< TypeImpl >::AbstractAllocator | ( | const AbstractAllocator< TypeImpl > & | aRef | ) | [inline] |
AbstractAllocator& corelinux::AbstractAllocator< TypeImpl >::operator= | ( | const AbstractAllocator< TypeImpl > & | aRef | ) | [inline] |
Assingment operator overload.
AbstractAllocator | const reference |
References corelinux::Allocator::operator=().
bool corelinux::AbstractAllocator< TypeImpl >::operator== | ( | const AbstractAllocator< TypeImpl > & | aRef | ) | const [inline] |
Equality operator overload.
AbstractAllocator | const reference |
References corelinux::Allocator::operator==().
TypeImpl* corelinux::AbstractAllocator< TypeImpl >::createType | ( | void | ) | [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().
void corelinux::AbstractAllocator< TypeImpl >::destroyType | ( | TypeImpl * | aPtr | ) | [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 >::deallocateObject(), corelinux::Allocator::decrementDeallocates(), and corelinux::Allocator::incrementDeallocates().
virtual TypeImpl* corelinux::AbstractAllocator< TypeImpl >::allocateObject | ( | void | ) | [protected, pure virtual] |
allocates a object in the subclass
Referenced by corelinux::AbstractAllocator< TypeImpl >::createType().
virtual void corelinux::AbstractAllocator< TypeImpl >::deallocateObject | ( | TypeImpl * | ) | [protected, pure virtual] |
de-allocates a object in the subclass
TypeImpl | pointer |
Referenced by corelinux::AbstractAllocator< TypeImpl >::destroyType().