OpenRTM
1.0.0
|
00001 // -*- C++ -*- 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 { 00042 class Allocator 00043 : public Singleton<Allocator> 00044 { 00045 public: 00061 virtual ~Allocator(){}; 00062 00086 virtual void* New(size_t t) throw (std::bad_alloc); 00087 00107 virtual void Delete(void* p) throw (); 00108 00132 virtual void* NewArray(size_t t) throw (std::bad_alloc); 00133 00153 virtual void DeleteArray(void* p) throw (); 00154 00155 }; 00156 }; 00157 #endif // COIL_ALLOCATOR_H