Revert to Current Include Style
[ACE_TAO.git] / ACE / ace / QoS / QoS_Session_Factory.h
blobcdb48235fbac246dfa819ab39c974adde5bff06b
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file QoS_Session_Factory.h
7 * @author Vishal Kachroo <vishal@cs.wustl.edu>
8 */
9 //=============================================================================
12 #ifndef ACE_QOS_SESSION_FACTORY_H
13 #define ACE_QOS_SESSION_FACTORY_H
14 #include /**/ "ace/pre.h"
16 #include "ace/QoS/QoS_Session.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "ace/Containers_T.h"
23 #include "ACE_QoS_Export.h"
25 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
27 // Forward declare this, so the factory uses only references to this.
28 class ACE_QoS_Session;
30 /**
31 * @class ACE_QoS_Session_Factory
33 * @brief Concrete factory for the QoS Session objects.
35 * This class manages the life cycle of QoS Session objects. These
36 * objects are currently either RAPI session objects or GQoS session
37 * objects. It stores the sessions in an unbounded set.
39 class ACE_QoS_Export ACE_QoS_Session_Factory
41 public :
42 /// Default constructor.
43 ACE_QoS_Session_Factory (void);
45 /// Default destructor.
46 ~ACE_QoS_Session_Factory (void);
48 /// Types of sessions for this factory to manage.
49 enum ACE_QoS_Session_Type
51 /// ACE_RAPI_SESSION on Unix platforms with RAPI support
52 ACE_RAPI_SESSION,
54 /// ACE_GQOS_SESSION on Windows platforms with GQOS support
55 ACE_GQOS_SESSION
58 /** The default QoS type supported on this platform.
60 * ACE_DEFAULT_QOS_SESSION = ACE_RAPI_SESSION on Unix platforms with RAPI support
61 * = ACE_GQOS_SESSION on Windows platforms with GQOS support
63 static const enum ACE_QoS_Session_Type ACE_DEFAULT_QOS_SESSION;
65 /// Create a QoS session of the given type (RAPI or GQoS).
66 ACE_QoS_Session * create_session (ACE_QoS_Session_Type qos_session_type = ACE_DEFAULT_QOS_SESSION );
68 /// Destroy the QoS Session.
69 int destroy_session (ACE_QoS_Session *qos_session);
71 private:
73 /// Used by the create_session () to add new sessions to the
74 /// set of sessions created by this factory.
75 int add_session (ACE_QoS_Session *qos_session);
77 /// Used by the destroy_session () to remove a session from the set
78 /// of sessions created by this factory.
79 int remove_session (ACE_QoS_Session *qos_session);
81 /// Unordered set of QoS Sessions.
82 typedef ACE_Unbounded_Set <ACE_QoS_Session *> QOS_SESSION_SET;
83 QOS_SESSION_SET qos_session_set_;
87 ACE_END_VERSIONED_NAMESPACE_DECL
89 #include /**/ "ace/post.h"
90 #endif /* ACE_QOS_SESSION_FACTORY_H */