#include <GlobalDefinitions.h>
Inheritance diagram for AllocatorLocal< T >:


Public Member Functions | |
| AllocatorLocal (T **ptr=NULL, const string &name="", ostream &monStream=cerr) | |
| virtual Allocator< T > * | clone (T **ptr, const string &name, ostream &monStream=cerr) |
| virtual | ~AllocatorLocal () |
| virtual void | allocate (unsigned long size) |
| virtual void | allocateAndZero (unsigned long size) |
| virtual void | load (unsigned long size) |
| virtual void | save () |
| virtual void | deallocate () |
Definition at line 768 of file GlobalDefinitions.h.
| AllocatorLocal< T >::AllocatorLocal | ( | T ** | ptr = NULL, |
|
| const string & | name = "", |
|||
| ostream & | monStream = cerr | |||
| ) | [inline] |
Definition at line 772 of file GlobalDefinitions.h.
00774 : 00775 Allocator<T>(ptr,name,monStream) 00776 {}
| virtual AllocatorLocal< T >::~AllocatorLocal | ( | ) | [inline, virtual] |
| virtual Allocator<T>* AllocatorLocal< T >::clone | ( | T ** | ptr, | |
| const string & | name, | |||
| ostream & | monStream = cerr | |||
| ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 779 of file GlobalDefinitions.h.
00780 { 00781 return new AllocatorLocal<T>(ptr,name,monStream); 00782 }
| virtual void AllocatorLocal< T >::allocate | ( | unsigned long | size | ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 789 of file GlobalDefinitions.h.
Referenced by AllocatorLocal< PositionInDatabase >::allocateAndZero(), and AllocatorLocal< PositionInDatabase >::load().
00790 { 00791 size_=size; 00792 (*ptr_)=new T[size_]; 00793 isAllocated_=true; 00794 }
Here is the caller graph for this function:

| virtual void AllocatorLocal< T >::allocateAndZero | ( | unsigned long | size | ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 796 of file GlobalDefinitions.h.
00797 { 00798 const unsigned char zero(0); 00799 allocate(size); 00800 memset( (void*)(*ptr_), zero, size_*sizeof(MyType) ); 00801 }
| virtual void AllocatorLocal< T >::load | ( | unsigned long | size | ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 802 of file GlobalDefinitions.h.
00803 { 00804 allocate(size); 00805 loadFromFile( name_, (char*)(*ptr_), size_*sizeof(MyType), monStream_ ); 00806 }
| virtual void AllocatorLocal< T >::save | ( | ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 807 of file GlobalDefinitions.h.
00808 { 00809 saveToFile( name_, (char*)(*ptr_), size_*sizeof(MyType), monStream_ ); 00810 }
| virtual void AllocatorLocal< T >::deallocate | ( | ) | [inline, virtual] |
Implements Allocator< T >.
Definition at line 812 of file GlobalDefinitions.h.
Referenced by AllocatorLocal< PositionInDatabase >::~AllocatorLocal().
00813 { 00814 if (!isAllocated_) return; 00815 delete [] (*ptr_); 00816 isAllocated_=false; 00817 }
Here is the caller graph for this function:

1.5.2