1 #ifndef _MALLOC_FREE_ALLOCATOR_H_
2 #define _MALLOC_FREE_ALLOCATOR_H_
4 #include <util/Constructor.h>
8 template <class DataType
>
9 class MallocFreeAllocator
: public Constructor
<DataType
> {
11 typedef DataType
* Pointer
;
12 typedef const DataType
* ConstPointer
;
13 typedef DataType
& Reference
;
14 typedef const DataType
& ConstReference
;
16 /*! malloc()'s an object of type \c DataType and returns a
20 return reinterpret_cast<Pointer
>(malloc(sizeof(DataType
)));
23 /*! free()'s the given object.
25 void Deallocate(Pointer object
) {
30 #endif // _MALLOC_FREE_ALLOCATOR_H_