#include <PsAllocator.h>
Public Types | |
| typedef size_t | size_type |
| typedef ptrdiff_t | difference_type |
| typedef T * | pointer |
| typedef const T * | const_pointer |
| typedef T & | reference |
| typedef const T & | const_reference |
| typedef T | value_type |
Public Methods | |
| pointer | address (reference x) const |
| const_pointer | address (const_reference x) const |
| pointer | allocate (size_type n, PsAllocatorT< void >::const_pointer hint=0) |
| void | deallocate (pointer p, size_type n) |
| size_type | max_size () const throw () |
| void | construct (pointer p, const T &val) |
| void | destroy (pointer p) |
: incorect usage of the class PsMemoryAllocator | |
| PsAllocatorT () throw () | |
| construtor. More... | |
| PsAllocatorT (const PsAllocatorT &) throw () | |
| copy constructor. More... | |
| template<typename U> | PsAllocatorT (const PsAllocatorT< U > &) throw () |
| copy from an other allocator. More... | |
| ~PsAllocatorT () throw () | |
| destructor. More... | |
Definition at line 45 of file PsAllocator.h.
|
|||||
|
Definition at line 50 of file PsAllocator.h. |
|
|||||
|
Definition at line 52 of file PsAllocator.h. Referenced by address. |
|
|||||
|
Definition at line 48 of file PsAllocator.h. |
|
|||||
|
Definition at line 49 of file PsAllocator.h. Referenced by address, allocate, construct, deallocate, and destroy. |
|
|||||
|
Definition at line 51 of file PsAllocator.h. Referenced by address. |
|
|||||
|
Definition at line 47 of file PsAllocator.h. Referenced by allocate, deallocate, and max_size. |
|
|||||
|
Definition at line 53 of file PsAllocator.h. |
|
|||||||||
|
construtor.
Definition at line 62 of file PsAllocator.h.
00062 {
00063 //cerr<<"PsAllocatorT"<<endl;
00064 }
|
|
||||||||||
|
copy constructor.
Definition at line 68 of file PsAllocator.h.
00068 {
00069 //cerr<<"PsAllocatorT(const PsAllocatorT &)"<<endl;
00070 }
|
|
||||||||||||||
|
copy from an other allocator.
Definition at line 74 of file PsAllocator.h.
00074 {
00075 //cerr<<"PsAllocatorT(const PsAllocatorT<U> &)"<<endl;
00076 }
|
|
|||||||||
|
destructor.
Definition at line 80 of file PsAllocator.h.
00080 {
00081 //cerr<<"~PsAllocatorT()"<<endl;
00082 }
|
|
||||||||||
|
Definition at line 89 of file PsAllocator.h. References const_pointer, and const_reference.
00089 {
00090 return &x;
00091 }
|
|
||||||||||
|
Definition at line 85 of file PsAllocator.h. References pointer, and reference.
00085 {
00086 return &x;
00087 }
|
|
||||||||||||||||
|
Definition at line 93 of file PsAllocator.h. References const_pointer, pointer, and size_type.
00093 {
00094 #ifdef _DEBUGALLOCATIONMOME
00095 cerr<<"PsAllocatorT::allocate"<<endl;
00096 #endif
00097 if(n<=0) {
00098 n=1;
00099 }
00100 pointer resul=(pointer)operator new(n*sizeof(T));
00101 #ifdef _DEBUGALLOCATIONMOME
00102 cerr<<"PsAllocatorT::allocate returns "<<resul<<" of size "<<n*sizeof(T)<<endl;
00103 #endif
00104 return resul;
00105 }
|
|
||||||||||||||||
|
Definition at line 121 of file PsAllocator.h. References pointer.
00121 {
00122 #ifdef _DEBUGALLOCATIONMOME
00123 cerr<<"PsAllocatorT::construct"<<endl;
00124 #endif
00125 return new((void *)p) T(val);
00126 };
|
|
||||||||||||||||
|
Definition at line 107 of file PsAllocator.h. References pointer, and size_type.
00107 {
00108 #ifdef _DEBUGALLOCATIONMOME
00109 cerr<<"PsAllocatorT::deallocate"<<endl;
00110 #endif
00111 operator delete ((void *)p);
00112 }
|
|
||||||||||
|
Definition at line 128 of file PsAllocator.h. References pointer.
00128 {
00129 #ifdef _DEBUGALLOCATIONMOME
00130 cerr<<"PsAllocatorT::destroy"<<endl;
00131 #endif
00132 ((T*)p)->~T() ;
00133 }
|
|
|||||||||
|
Definition at line 114 of file PsAllocator.h. References size_type.
00114 {
00115 #ifdef _DEBUGALLOCATIONMOME
00116 cerr<<"PsAllocatorT::max_size"<<endl;
00117 #endif
00118 return 16374;
00119 }
|
| Documentation generated on Wed Jun 2 18:49:04 2004 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |