00001
00020 #ifndef COIL_ALLOCATOR_H
00021 #define COIL_ALLOCATOR_H
00022
00023 #include <stddef.h>
00024 #include <new>
00025 #include <coil/Singleton.h>
00026
00027 namespace coil
00028 {
00029 class Allocator
00030 : public Singleton<Allocator>
00031 {
00032 public:
00033 virtual ~Allocator(){};
00034 virtual void* New(size_t t) throw (std::bad_alloc);
00035 virtual void Delete(void* p) throw ();
00036 virtual void* NewArray(size_t t) throw (std::bad_alloc);
00037 virtual void DeleteArray(void* p) throw ();
00038 };
00039 };
00040 #endif // COIL_ALLOCATOR_H