Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Thread_Lane_Resources_Manager.h
blob2f509154f6d78e527eccd896a74e6ab8ca361bc6
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Thread_Lane_Resources_Manager.h
7 * @author Irfan Pyarali
8 */
9 // ============================================================================
11 #ifndef TAO_THREAD_LANE_RESOURCES_MANAGER_H
12 #define TAO_THREAD_LANE_RESOURCES_MANAGER_H
14 #include /**/ "ace/pre.h"
15 #include "ace/Service_Object.h"
17 #if !defined (ACE_LACKS_PRAGMA_ONCE)
18 # pragma once
19 #endif /* ACE_LACKS_PRAGMA_ONCE */
21 #include /**/ "tao/TAO_Export.h"
22 #include /**/ "tao/Versioned_Namespace.h"
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
26 class TAO_ORB_Core;
27 class TAO_Thread_Lane_Resources;
28 class TAO_LF_Strategy;
29 class TAO_MProfile;
31 /**
32 * @class TAO_Thread_Lane_Resources_Manager
34 * @brief This class is a manager for thread resources.
36 * \nosubgrouping
38 **/
39 class TAO_Export TAO_Thread_Lane_Resources_Manager
41 public:
42 /// Constructor.
43 TAO_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core);
45 /// Destructor.
46 virtual ~TAO_Thread_Lane_Resources_Manager ();
48 /// Finalize resources.
49 virtual void finalize () = 0;
51 /// Open default resources.
52 virtual int open_default_resources () = 0;
54 /// Shutdown reactor.
55 virtual void shutdown_reactor () = 0;
57 /// Cleanup transports to wake threads up waiting on those sockets.
58 virtual void close_all_transports () = 0;
60 /// Does @a mprofile belong to us?
61 virtual int is_collocated (const TAO_MProfile& mprofile) = 0;
63 /// @name Accessors
64 // @{
65 virtual TAO_Thread_Lane_Resources &lane_resources () = 0;
67 virtual TAO_Thread_Lane_Resources &default_lane_resources () = 0;
69 TAO_LF_Strategy &lf_strategy ();
70 // @}
72 private:
73 void operator= (const TAO_Thread_Lane_Resources_Manager &);
74 TAO_Thread_Lane_Resources_Manager (const TAO_Thread_Lane_Resources_Manager &);
76 protected:
77 /// The ORB Core.
78 TAO_ORB_Core * const orb_core_;
80 /// The leader follower strategy
81 TAO_LF_Strategy *lf_strategy_;
84 /**
85 * @class TAO_Thread_Lane_Resources_Manager_Factory
87 * @brief This class is a factory for managers of thread resources.
89 * \nosubgrouping
91 **/
92 class TAO_Export TAO_Thread_Lane_Resources_Manager_Factory
93 : public ACE_Service_Object
95 public:
96 /// Virtual destructor.
97 virtual ~TAO_Thread_Lane_Resources_Manager_Factory ();
99 /// Factory method.
100 virtual TAO_Thread_Lane_Resources_Manager *
101 create_thread_lane_resources_manager (TAO_ORB_Core &core) = 0;
104 TAO_END_VERSIONED_NAMESPACE_DECL
107 #include /**/ "ace/post.h"
109 #endif /* TAO_THREAD_LANE_RESOURCES_MANAGER_H */