#include <Buffer_Allocator_T.h>
Inheritance diagram for TAO::TAO_Buffer_Allocator< handler_type, alloc_type >:
Public Types | |
typedef handler_type | HANDLER_TYPE |
typedef alloc_type | ALLOC_TYPE |
Public Member Functions | |
TAO_Buffer_Allocator (alloc_type *allocator) | |
virtual handler_type * | allocate (void) |
virtual void | release (handler_type *ptr) |
Private Attributes | |
alloc_type * | allocator_ |
handler_type is the type of object to allocator, alloc_type is the type of allocator to be used to allocate the object.
Definition at line 37 of file Buffer_Allocator_T.h.
typedef alloc_type TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::ALLOC_TYPE |
Definition at line 41 of file Buffer_Allocator_T.h.
typedef handler_type TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::HANDLER_TYPE |
Definition at line 40 of file Buffer_Allocator_T.h.
TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::TAO_Buffer_Allocator | ( | alloc_type * | allocator | ) |
Definition at line 15 of file Buffer_Allocator_T.cpp.
00015 : 00016 allocator_(allocator) 00017 { 00018 }
handler_type * TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::allocate | ( | void | ) | [virtual] |
Implements TAO::TAO_Allocator< handler_type >.
Definition at line 22 of file Buffer_Allocator_T.cpp.
References ACE_NEW_MALLOC_RETURN, and TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::allocator_.
00023 { 00024 handler_type* myvalue = 0; 00025 ACE_NEW_MALLOC_RETURN (myvalue, 00026 static_cast <handler_type*>( 00027 allocator_->malloc (sizeof (handler_type))), 00028 handler_type (), 0); 00029 00030 return myvalue; 00031 }
void TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::release | ( | handler_type * | ptr | ) | [virtual] |
Implements TAO::TAO_Allocator< handler_type >.
Definition at line 35 of file Buffer_Allocator_T.cpp.
References ACE_DES_FREE, and TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::allocator_.
00036 { 00037 ACE_DES_FREE (ptr, 00038 allocator_->free, 00039 handler_type); 00040 }
alloc_type* TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::allocator_ [private] |
Definition at line 47 of file Buffer_Allocator_T.h.
Referenced by TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::allocate(), and TAO::TAO_Buffer_Allocator< handler_type, alloc_type >::release().