Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Connector_Impl.h
blobe9ca7c68bc1ef325dc0db0d81d04b4e7bc048d66
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file Connector_Impl.h
7 * @author Balachandran Natarajan <bala@cs.wustl.edu>
8 */
9 // ===================================================================
11 #ifndef TAO_CONNECTOR_IMPL_H
12 #define TAO_CONNECTOR_IMPL_H
14 #include /**/ "ace/pre.h"
15 #include "ace/Strategies_T.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include "tao/Basic_Types.h"
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 class ACE_Thread_Manager;
25 ACE_END_VERSIONED_NAMESPACE_DECL
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 class TAO_ORB_Core;
31 /**
32 * @class TAO_Connect_Creation_Strategy
34 * @brief Creation strategy helper
36 * Creates the TAO_*_Connection_Handler object for the TAO_*_Connector
37 * objects. This template class can now be used by all the Connector
38 * objects instead of having to duplicate code. This class can be used
39 * to set any required properties on the connection handlers at
40 * creation time.
43 template <class SVC_HANDLER>
44 class TAO_Connect_Creation_Strategy : public ACE_Creation_Strategy<SVC_HANDLER>
46 public:
47 /// Constructor.
48 TAO_Connect_Creation_Strategy (ACE_Thread_Manager * = 0,
49 TAO_ORB_Core* orb_core = 0);
51 /// Makes TAO_*_Client_Connection_Handlers
52 virtual int make_svc_handler (SVC_HANDLER *&sh);
55 private:
56 /// Pointer to the ORB_Core on which we are activated
57 TAO_ORB_Core * const orb_core_;
61 /**
62 * @class TAO_Connect_Concurrency_Strategy
64 * @brief Concurrency strategy helper
66 * Activates the Svc_Handler, and then if the correct wait strategy is
67 * in use registers the handler with the reactor.
70 template <class SVC_HANDLER>
71 class TAO_Connect_Concurrency_Strategy :
72 public ACE_Concurrency_Strategy<SVC_HANDLER>
74 public:
75 /// Constructor.
76 TAO_Connect_Concurrency_Strategy (TAO_ORB_Core *orb_core);
79 /// Activates the Svc_Handler, and if the right wait strategy is in
80 /// use, registers the handle with the reactor.
81 int activate_svc_handler (SVC_HANDLER *svc_handler, void *arg);
83 private:
84 /// Pointer to the ORB Core.
85 TAO_ORB_Core * const orb_core_;
88 TAO_END_VERSIONED_NAMESPACE_DECL
90 #include "tao/Connector_Impl.cpp"
92 #include /**/ "ace/post.h"
93 #endif /*TAO_CONNECTOR_IMPL_H*/