Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_INTERCEPTOR_LIST_H
00015 #define TAO_INTERCEPTOR_LIST_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "ace/Array_Base.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "tao/orbconf.h"
00026
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 namespace PortableInterceptor
00030 {
00031 class Interceptor;
00032 typedef Interceptor *Interceptor_ptr;
00033 }
00034
00035 namespace CORBA
00036 {
00037 class PolicyList;
00038 }
00039
00040 namespace TAO
00041 {
00042
00043
00044
00045
00046
00047
00048
00049
00050 template <typename InterceptorType, typename DetailsType>
00051 class Interceptor_List
00052 {
00053 public:
00054
00055 typedef typename InterceptorType::_var_type InterceptorType_var_type;
00056 typedef typename InterceptorType::_ptr_type InterceptorType_ptr_type;
00057
00058 struct RegisteredInterceptor
00059 {
00060 InterceptorType_var_type interceptor_;
00061 DetailsType details_;
00062 };
00063
00064
00065 Interceptor_List (void);
00066
00067 void add_interceptor (InterceptorType_ptr_type i);
00068
00069
00070 void add_interceptor (InterceptorType_ptr_type i,
00071 const CORBA::PolicyList& policies);
00072
00073 void destroy_interceptors (void);
00074
00075
00076 RegisteredInterceptor& registered_interceptor (size_t index);
00077
00078
00079 InterceptorType_ptr_type interceptor (size_t index);
00080
00081 size_t size (void) const;
00082
00083 private:
00084 typedef ACE_Array_Base<RegisteredInterceptor > RegisteredArray;
00085
00086
00087 RegisteredArray interceptors_;
00088 };
00089 }
00090
00091 TAO_END_VERSIONED_NAMESPACE_DECL
00092
00093 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00094 #include "tao/PI/Interceptor_List_T.cpp"
00095 #endif
00096
00097 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00098 #pragma implementation ("Interceptor_List_T.cpp")
00099 #endif
00100
00101 #include "ace/post.h"
00102
00103 #endif