Buffer_Allocator_T.h

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Buffer_Allocator_T.h
00006  *
00007  *  Buffer_Allocator_T.h,v 1.3 2005/11/02 07:13:02 ossama Exp
00008  *
00009  *  @author Johnny Willemsen (jwillemsen@remedy.nl)
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_BUFFER_ALLOCATOR_T_H
00014 #define TAO_BUFFER_ALLOCATOR_T_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "tao/Allocator.h"
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 namespace TAO
00027 {
00028   /**
00029    * @class TAO_Buffer_Allocator
00030    *
00031    * @brief Generic buffer allocator for TAO
00032    *
00033    * handler_type is the type of object to allocator, alloc_type is the type
00034    * of allocator to be used to allocate the object.
00035    */
00036   template <typename handler_type, typename alloc_type>
00037   class TAO_Buffer_Allocator : public TAO_Allocator<handler_type>
00038   {
00039     public:
00040       typedef handler_type HANDLER_TYPE;
00041       typedef alloc_type ALLOC_TYPE;
00042       TAO_Buffer_Allocator (alloc_type *allocator);
00043 
00044       virtual handler_type *allocate (void);
00045       virtual void release (handler_type *ptr);
00046     private:
00047       alloc_type* allocator_;
00048   };
00049 }
00050 
00051 TAO_END_VERSIONED_NAMESPACE_DECL
00052 
00053 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00054 #include "tao/Buffer_Allocator_T.cpp"
00055 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00056 
00057 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00058 #pragma implementation ("Buffer_Allocator_T.cpp")
00059 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00060 
00061 #include /**/ "ace/post.h"
00062 #endif /* TAO_BUFFER_ALLOCATOR_T_H */

Generated on Thu Nov 9 11:54:08 2006 for TAO by doxygen 1.3.6