Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Unbounded_Value_Allocation_Traits_T.h
blobb4f7e964db3aba753521113f0bb73530f7753f91
1 #ifndef guard_unbounded_value_allocation_traits_hpp
2 #define guard_unbounded_value_allocation_traits_hpp
3 /**
4 * @file
6 * @brief Details can be found in the documentation for
7 * TAO::details::generic_sequence
9 * @author Carlos O'Ryan
12 #include "tao/Basic_Types.h"
14 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
16 namespace TAO
18 namespace details
20 template<typename T, bool dummy>
21 struct unbounded_value_allocation_traits
23 typedef T value_type;
25 inline static CORBA::ULong default_maximum()
27 return 0;
30 inline static value_type * default_buffer_allocation()
32 return 0;
35 inline static value_type * allocbuf(CORBA::ULong maximum)
37 return new value_type[maximum];
40 inline static value_type * allocbuf_noinit(CORBA::ULong maximum)
42 return new value_type[maximum];
45 inline static void freebuf(value_type * buffer)
47 delete[] buffer;
50 } // namespace details
51 } // namespace TAO
53 TAO_END_VERSIONED_NAMESPACE_DECL
55 #endif // guard_unbounded_value_allocation_traits_hpp