OpenRTM-aist  1.2.1
Allocator.h
Go to the documentation of this file.
1 // -*- C++ -*-
20 #ifndef COIL_ALLOCATOR_H
21 #define COIL_ALLOCATOR_H
22 
23 #include <stddef.h>
24 #include <new>
25 #include <coil/Singleton.h>
26 
27 namespace coil
28 {
42  class Allocator
43  : public Singleton<Allocator>
44  {
45  public:
61  virtual ~Allocator(){};
62 
86  virtual void* New(size_t t) throw (std::bad_alloc);
87 
107  virtual void Delete(void* p) throw ();
108 
132  virtual void* NewArray(size_t t) throw (std::bad_alloc);
133 
153  virtual void DeleteArray(void* p) throw ();
154 
155  };
156 };
157 #endif // COIL_ALLOCATOR_H
virtual void * New(size_t t)
Create of memory allocation.
Allocator class.
Definition: Allocator.h:42
virtual void * NewArray(size_t t)
Create of array memory allocation.
Singleton template class.
Singleton template class.
Definition: Singleton.h:106
virtual void Delete(void *p)
Delete of memory allocation.
virtual void DeleteArray(void *p)
Delete of array memory allocation.
virtual ~Allocator()
Destructor.
Definition: Allocator.h:61
Common Object Interface Layer.
Definition: Affinity.h:28