Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Interceptor_List.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   Interceptor_List.h
00006  *
00007  *  $Id: Interceptor_List.h,v 1.1.1.2 2003/02/21 18:36:45 chad Exp $
00008  *
00009  *  @author Ossama Othman <ossama@uci.edu>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_INTERCEPTOR_LIST_H
00014 #define TAO_INTERCEPTOR_LIST_H
00015 
00016 #include "ace/pre.h"
00017 
00018 #include "corbafwd.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 
00025 #include "PortableInterceptorC.h"
00026 #include "ace/Array_Base.h"
00027 
00028 
00029 /**
00030  * @class TAO_Interceptor_List
00031  *
00032  * @brief Base class for portable interceptor lists.
00033  *
00034  * Base class for the various portable interceptor lists used
00035  * internally by TAO.
00036  */
00037 class TAO_Export TAO_Interceptor_List
00038 {
00039 public:
00040 
00041   /// Constructor
00042   TAO_Interceptor_List (void);
00043 
00044   /// Destructor
00045   virtual ~TAO_Interceptor_List (void);
00046 
00047 protected:
00048 
00049   /// Register an in interceptor with interceptor list.
00050   size_t add_interceptor_i (
00051       PortableInterceptor::Interceptor_ptr interceptor
00052       ACE_ENV_ARG_DECL)
00053     ACE_THROW_SPEC ((CORBA::SystemException,
00054                      PortableInterceptor::ORBInitInfo::DuplicateName));
00055 
00056   /// Return the length of the underlying interceptor sequence.
00057   virtual size_t length (void) = 0;
00058 
00059   /// Set the length of the underlying interceptor sequence.
00060   virtual void length (size_t) = 0;
00061 
00062   /// Return the interceptor in sequence element <index>.
00063   virtual PortableInterceptor::Interceptor_ptr interceptor (
00064    size_t index) = 0;
00065 
00066 };
00067 
00068 #if (TAO_HAS_INTERCEPTORS == 1)
00069 /**
00070  * @class TAO_ClientRequestInterceptor_List
00071  *
00072  * @brief Encapsulation for a list of client request interceptors.
00073  */
00074 class TAO_Export TAO_ClientRequestInterceptor_List
00075   : public TAO_Interceptor_List
00076 {
00077 public:
00078 
00079   /// Define a trait for the underlying portable interceptor array.
00080   typedef
00081   ACE_Array_Base<PortableInterceptor::ClientRequestInterceptor_ptr> TYPE;
00082 
00083 public:
00084 
00085   /// Constructor
00086   TAO_ClientRequestInterceptor_List (void);
00087 
00088   /// Destructor
00089   ~TAO_ClientRequestInterceptor_List (void);
00090 
00091   /// Register a client request interceptor.
00092   void add_interceptor (PortableInterceptor::ClientRequestInterceptor_ptr i
00093                         ACE_ENV_ARG_DECL);
00094 
00095   /// Return reference to the underlying Portable Interceptor array.
00096   TYPE &interceptors (void);
00097 
00098 protected:
00099 
00100   /// Return the length of the underlying interceptor array.
00101   virtual size_t length (void);
00102 
00103   /// Set the length of the underlying interceptor array.
00104   virtual void length (size_t);
00105 
00106   /// Return the interceptor in element <index>.
00107   virtual PortableInterceptor::Interceptor_ptr interceptor (size_t);
00108 
00109 private:
00110 
00111   /// Dynamic array of registered client request interceptors.
00112   TYPE interceptors_;
00113 
00114 };
00115 
00116 
00117 /**
00118  * @class TAO_ServerRequestInterceptor_List
00119  *
00120  * @brief Encapsulation for a list of server request interceptors.
00121  */
00122 class TAO_Export TAO_ServerRequestInterceptor_List
00123   : public TAO_Interceptor_List
00124 {
00125 public:
00126 
00127   /// Define a trait for the underlying portable interceptor array.
00128   typedef
00129   ACE_Array_Base<PortableInterceptor::ServerRequestInterceptor_ptr> TYPE;
00130 
00131 public:
00132 
00133   /// Constructor
00134   TAO_ServerRequestInterceptor_List (void);
00135 
00136   /// Destructor
00137   ~TAO_ServerRequestInterceptor_List (void);
00138 
00139   /// Register a server request interceptor.
00140   void add_interceptor (PortableInterceptor::ServerRequestInterceptor_ptr i
00141                         ACE_ENV_ARG_DECL);
00142 
00143   /// Return reference to the underlying Portable Interceptor array.
00144   TYPE &interceptors (void);
00145 
00146 protected:
00147 
00148   /// Return the length of the underlying interceptor array.
00149   virtual size_t length (void);
00150 
00151   /// Set the length of the underlying interceptor array.
00152   virtual void length (size_t);
00153 
00154   /// Return the interceptor in array element <index>.
00155   virtual PortableInterceptor::Interceptor_ptr interceptor (size_t);
00156 
00157 private:
00158 
00159   /// Dynamic array of registered server request interceptors.
00160   TYPE interceptors_;
00161 
00162 };
00163 #endif  /* TAO_HAS_INTERCEPTORS == 1 */
00164 
00165 
00166 /**
00167  * @class TAO_IORInterceptor_List
00168  *
00169  * @brief Encapsulation for a list of IOR interceptors.
00170  */
00171 class TAO_Export TAO_IORInterceptor_List
00172   : public TAO_Interceptor_List
00173 {
00174 public:
00175 
00176   /// Define a trait for the underlying portable interceptor array.
00177   typedef
00178   ACE_Array_Base<PortableInterceptor::IORInterceptor_ptr> TYPE;
00179 
00180 public:
00181 
00182   /// Constructor
00183   TAO_IORInterceptor_List (void);
00184 
00185   /// Destructor
00186   ~TAO_IORInterceptor_List (void);
00187 
00188   /// Register an IOR interceptor.
00189   void add_interceptor (PortableInterceptor::IORInterceptor_ptr i
00190                         ACE_ENV_ARG_DECL);
00191 
00192   /// Return reference to the underlying Portable Interceptor array.
00193   TYPE &interceptors (void);
00194 
00195 protected:
00196 
00197   /// Return the length of the underlying interceptor array.
00198   virtual size_t length (void);
00199 
00200   /// Set the length of the underlying interceptor array.
00201   virtual void length (size_t);
00202 
00203   /// Return the interceptor in array element <index>.
00204   virtual PortableInterceptor::Interceptor_ptr interceptor (size_t);
00205 
00206 private:
00207 
00208   /// Dynamic array of registered IOR interceptors.
00209   TYPE interceptors_;
00210 
00211 };
00212 
00213 
00214 #if defined (__ACE_INLINE__)
00215 #include "Interceptor_List.inl"
00216 #endif /* defined INLINE */
00217 
00218 #include "ace/post.h"
00219 
00220 #endif /* TAO_INTERCEPTOR_LIST_H */

Generated on Mon Jun 16 13:48:36 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002