#include <Unbounded_Reference_Allocation_Traits_T.h>
Public Types | |
typedef T | value_type |
typedef ref_traits | reference_traits |
Static Public Member Functions | |
static CORBA::ULong | default_maximum () |
static value_type * | default_buffer_allocation () |
static value_type * | allocbuf (CORBA::ULong maximum) |
static void | freebuf (value_type *buffer) |
Definition at line 24 of file Unbounded_Reference_Allocation_Traits_T.h.
typedef ref_traits TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::reference_traits |
Definition at line 27 of file Unbounded_Reference_Allocation_Traits_T.h.
typedef T TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::value_type |
Definition at line 26 of file Unbounded_Reference_Allocation_Traits_T.h.
static value_type* TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::allocbuf | ( | CORBA::ULong | maximum | ) | [inline, static] |
Definition at line 39 of file Unbounded_Reference_Allocation_Traits_T.h.
00040 { 00041 value_type * buffer = new value_type[maximum + 1]; 00042 reinterpret_cast<value_type**>(buffer)[0] = buffer + maximum + 1; 00043 00044 // no throw 00045 reference_traits::zero_range(buffer + 1, buffer + maximum + 1); 00046 00047 return buffer + 1; 00048 }
static value_type* TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::default_buffer_allocation | ( | ) | [inline, static] |
static CORBA::ULong TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::default_maximum | ( | ) | [inline, static] |
static void TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::freebuf | ( | value_type * | buffer | ) | [inline, static] |
Definition at line 50 of file Unbounded_Reference_Allocation_Traits_T.h.
00051 { 00052 if(buffer != 0) 00053 { 00054 value_type * begin = buffer - 1; 00055 value_type * end = reinterpret_cast<value_type*>(*begin); 00056 reference_traits::release_range(buffer, end); 00057 00058 buffer = begin; 00059 } 00060 delete[] buffer; 00061 }