1 #if !defined(__ABSTRACTALLOCATOR_HPP) 2 #define __ABSTRACTALLOCATOR_HPP 24 #if !defined(__COMMON_HPP) 28 #if !defined(__ALLOCATOR_HPP) 29 #include <Allocator.hpp> 43 template<
class TypeImpl >
130 TypeImpl *aPtr( NULLPTR );
200 #define CORELINUX_DEFAULT_ALLOCATOR( nameTag, typeTag ) \ 201 class nameTag : public CORELINUX(AbstractAllocator<typeTag>) \ 206 CORELINUX(AbstractAllocator<typeTag>)()\ 211 virtual ~nameTag( void ) \ 218 virtual typeTag *allocateObject( void ) \ 220 return ::new typeTag; \ 223 virtual void deallocateObject( typeTag *aPtr ) \ 228 typedef nameTag * nameTag ## Ptr; \ 229 typedef const nameTag * nameTag ## Cptr; \ 230 typedef nameTag & nameTag ## Ref; \ 231 typedef const nameTag & nameTag ## Cref; 233 #endif // if !defined(__ABSTRACTALLOCATOR_HPP) Allocator & operator=(AllocatorCref)
Assingment operator overload.
Definition: Allocator.cpp:72
AbstractAllocator is a abstract template which provides for the extension of memory managment on a Ty...
Definition: AbstractAllocator.hpp:44
virtual void incrementDeallocates(void)
Increment the deallocates.
Definition: Allocator.cpp:122
virtual void incrementAllocates(void)
Increment the allocates.
Definition: Allocator.cpp:117
void destroyType(TypeImpl *aPtr)
Destroy type will invoke the deallocateObject method of the derivation and will increment the number ...
Definition: AbstractAllocator.hpp:154
virtual void decrementAllocates(void)
Decrement the allocates.
Definition: Allocator.cpp:127
Forward reference the various common classes.
Definition: AbstractAllocator.hpp:32
AbstractAllocator(void)
Default constructor.
Definition: AbstractAllocator.hpp:54
Allocator is a Strategy class used by AbstractAllocator and AbstractFactory.Each Allocator instance t...
Definition: Allocator.hpp:43
virtual ~AbstractAllocator(void)
Virtual destructor.
Definition: AbstractAllocator.hpp:78
virtual void decrementDeallocates(void)
Decrement the deallocates.
Definition: Allocator.cpp:132
virtual TypeImpl * allocateObject(void)=0
allocates a object in the subclass
virtual void deallocateObject(TypeImpl *)=0
de-allocates a object in the subclass
bool operator==(AllocatorCref) const
Equality operator overload.
Definition: Allocator.cpp:90
TypeImpl * createType(void)
Create type will invoke the allocateObject method of the derivation and will increment the number of ...
Definition: AbstractAllocator.hpp:128
Allocator(void)
Default constructor.
Definition: Allocator.cpp:37
bool operator==(const AbstractAllocator &aRef) const
Equality operator overload.
Definition: AbstractAllocator.hpp:108