3 //=============================================================================
5 * @file Buffer_Allocator_T.h
7 * @author Johnny Willemsen (jwillemsen@remedy.nl)
9 //=============================================================================
11 #ifndef TAO_BUFFER_ALLOCATOR_T_H
12 #define TAO_BUFFER_ALLOCATOR_T_H
14 #include /**/ "ace/pre.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "tao/Allocator.h"
22 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 * @class TAO_Buffer_Allocator
29 * @brief Generic buffer allocator for TAO
31 * handler_type is the type of object to allocator, alloc_type is the type
32 * of allocator to be used to allocate the object.
34 template <typename handler_type
, typename alloc_type
>
35 class TAO_Buffer_Allocator
: public TAO_Allocator
<handler_type
>
38 typedef handler_type HANDLER_TYPE
;
39 typedef alloc_type ALLOC_TYPE
;
40 TAO_Buffer_Allocator (alloc_type
*allocator
);
42 virtual handler_type
*allocate ();
43 virtual void release (handler_type
*ptr
);
45 alloc_type
* allocator_
;
49 TAO_END_VERSIONED_NAMESPACE_DECL
51 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
52 #include "tao/Buffer_Allocator_T.cpp"
53 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
55 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
56 #pragma implementation ("Buffer_Allocator_T.cpp")
57 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
59 #include /**/ "ace/post.h"
60 #endif /* TAO_BUFFER_ALLOCATOR_T_H */