Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / tao / DiffServPolicy / Server_Network_Priority_Policy.h
blobed3d7fad55a27b6f456e5d6bc2ce70e70c1395b6
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Server_Network_Priority_Policy.h
6 */
7 //=============================================================================
10 #ifndef TAO_SERVER_NETWORK_PRIORITY_POLICY_H
11 #define TAO_SERVER_NETWORK_PRIORITY_POLICY_H
13 #include /**/ "ace/pre.h"
15 #include "tao/DiffServPolicy/DiffServPolicy_Export.h"
16 #include "tao/DiffServPolicy/DiffServPolicy.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
19 # pragma once
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/LocalObject.h"
23 #include "tao/Basic_Types.h"
25 #if defined(_MSC_VER)
26 #pragma warning(push)
27 #pragma warning(disable:4250)
28 #endif /* _MSC_VER */
30 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
32 /**
33 * @class TAO_Server_Network_Priority_Policy
35 * @brief Implementation class for TAO-specific Network Priority Policy.
37 * This policy is defined by a server application to specify the
38 * network priority model that it would like to follow, as well as
39 * the request DiffServ codepoint and reply DiffServ codepoint
40 * corresponding to the network priority model.
42 class TAO_DiffServPolicy_Export TAO_Server_Network_Priority_Policy
43 : public TAO::NetworkPriorityPolicy,
44 public ::CORBA::LocalObject
46 public:
47 /// default constructor.
48 TAO_Server_Network_Priority_Policy ();
50 /// Constructor.
51 TAO_Server_Network_Priority_Policy (
52 const TAO::DiffservCodepoint &request_diffserv_codepoint,
53 const TAO::DiffservCodepoint &reply_diffserv_codepoint,
54 TAO::NetworkPriorityModel &network_priority_model);
56 /// Copy constructor.
57 TAO_Server_Network_Priority_Policy (
58 const TAO_Server_Network_Priority_Policy &rhs);
60 /// Returns a copy of <this>.
61 TAO_Server_Network_Priority_Policy *clone () const;
63 TAO::DiffservCodepoint request_diffserv_codepoint ();
65 void request_diffserv_codepoint (TAO::DiffservCodepoint req_dscp);
67 TAO::DiffservCodepoint reply_diffserv_codepoint ();
69 void reply_diffserv_codepoint (TAO::DiffservCodepoint reply_dscp);
71 TAO::NetworkPriorityModel network_priority_model ();
73 void network_priority_model (TAO::NetworkPriorityModel npm);
75 static CORBA::Policy_ptr create (const CORBA::Any &val);
77 CORBA::PolicyType policy_type ();
79 CORBA::Policy_ptr copy ();
81 void destroy ();
83 // Return the cached policy type for this policy.
84 TAO_Cached_Policy_Type _tao_cached_type () const;
86 // Returns the scope at which this policy can be applied. See orbconf.h.
87 TAO_Policy_Scope _tao_scope () const;
89 /// This method writes a CDR representation of the object state.
90 CORBA::Boolean _tao_encode (TAO_OutputCDR &out_cdr);
92 /// This method reads the object state from a CDR representation.
93 CORBA::Boolean _tao_decode (TAO_InputCDR &in_cdr);
95 protected:
96 virtual ~TAO_Server_Network_Priority_Policy ();
98 private:
99 /// The attributes
100 TAO::DiffservCodepoint request_diffserv_codepoint_;
101 TAO::DiffservCodepoint reply_diffserv_codepoint_;
102 TAO::NetworkPriorityModel network_priority_model_;
105 TAO_END_VERSIONED_NAMESPACE_DECL
107 #if defined(_MSC_VER)
108 #pragma warning(pop)
109 #endif /* _MSC_VER */
111 #include /**/ "ace/post.h"
112 #endif /* TAO_SERVER_NETWORK_PRIORITY_POLICY_H */