TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy > Struct Template Reference

#include <Unbounded_Reference_Allocation_Traits_T.h>

List of all members.

Public Types

typedef T value_type
typedef ref_traits reference_traits

Static Public Member Functions

CORBA::ULong default_maximum ()
value_typedefault_buffer_allocation ()
value_typeallocbuf (CORBA::ULong maximum)
void freebuf (value_type *buffer)

template<typename T, class ref_traits, bool dummy>
struct TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >


Member Typedef Documentation

template<typename T, class ref_traits, bool dummy>
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.

template<typename T, class ref_traits, bool dummy>
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.


Member Function Documentation

template<typename T, class ref_traits, bool dummy>
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   }

template<typename T, class ref_traits, bool dummy>
value_type* TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::default_buffer_allocation  )  [inline, static]
 

Definition at line 34 of file Unbounded_Reference_Allocation_Traits_T.h.

00035   {
00036     return 0;
00037   }

template<typename T, class ref_traits, bool dummy>
CORBA::ULong TAO::details::unbounded_reference_allocation_traits< T, ref_traits, dummy >::default_maximum  )  [inline, static]
 

Definition at line 29 of file Unbounded_Reference_Allocation_Traits_T.h.

00030   {
00031     return 0;
00032   }

template<typename T, class ref_traits, bool dummy>
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   }


The documentation for this struct was generated from the following file:
Generated on Thu Nov 9 12:27:44 2006 for TAO by doxygen 1.3.6