3 // ===================================================================
5 * @file Interceptor_List_T.h
7 * @author Ossama Othman <ossama@uci.edu>
8 * @author Johnny Willemsen <jwillemsen@remedy.nl>
10 // ===================================================================
12 #ifndef TAO_INTERCEPTOR_LIST_H
13 #define TAO_INTERCEPTOR_LIST_H
15 #include /**/ "ace/pre.h"
17 #include "ace/Array_Base.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/orbconf.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
27 namespace PortableInterceptor
30 typedef Interceptor
*Interceptor_ptr
;
41 * @class Interceptor_List
43 * @brief Template for portable interceptor lists.
45 * Template for the various portable interceptor lists used
48 template <typename InterceptorType
, typename DetailsType
>
49 class Interceptor_List
52 /// Define the traits for the underlying portable interceptor array.
53 typedef typename
InterceptorType::_var_type InterceptorType_var_type
;
54 typedef typename
InterceptorType::_ptr_type InterceptorType_ptr_type
;
56 struct RegisteredInterceptor
58 InterceptorType_var_type interceptor_
;
65 void add_interceptor (InterceptorType_ptr_type i
);
67 /// Register an interceptor with policies.
68 void add_interceptor (InterceptorType_ptr_type i
,
69 const CORBA::PolicyList
& policies
);
71 void destroy_interceptors ();
73 /// Return the registered interceptor in sequence element @a index.
74 RegisteredInterceptor
& registered_interceptor (size_t index
);
76 /// Return the interceptor in sequence element @a index.
77 InterceptorType_ptr_type
interceptor (size_t index
);
82 typedef ACE_Array_Base
<RegisteredInterceptor
> RegisteredArray
;
84 /// Dynamic array of registered interceptors.
85 RegisteredArray interceptors_
;
89 TAO_END_VERSIONED_NAMESPACE_DECL
91 #include "tao/PI/Interceptor_List_T.cpp"
93 #include /**/ "ace/post.h"
95 #endif /* TAO_INTERCEPTOR_LIST_H */