diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:21 +0000 |
commit | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (patch) | |
tree | 197c810e5f5bce17b1233a7cb8d7b50c0bcd25e2 /TAO/tao/PortableServer/POA_Cached_Policies.h | |
parent | 6b846cf03c0bcbd8c276cb0af61a181e5f98eaae (diff) | |
download | ATCD-3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c.tar.gz |
Repo restructuring
Diffstat (limited to 'TAO/tao/PortableServer/POA_Cached_Policies.h')
-rw-r--r-- | TAO/tao/PortableServer/POA_Cached_Policies.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/TAO/tao/PortableServer/POA_Cached_Policies.h b/TAO/tao/PortableServer/POA_Cached_Policies.h new file mode 100644 index 00000000000..a756f101782 --- /dev/null +++ b/TAO/tao/PortableServer/POA_Cached_Policies.h @@ -0,0 +1,114 @@ +// -*- C++ -*- + +//============================================================================= +/** + * @file POA_Cached_Policies.h + * + * $Id$ + * + * POA + * + * @author Irfan Pyarali + */ +//============================================================================= + +#ifndef TAO_POA_CACHED_POLICIES_H +#define TAO_POA_CACHED_POLICIES_H +#include /**/ "ace/pre.h" + +#include "tao/PortableServer/portableserver_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "tao/PortableServer/ThreadPolicyC.h" +#include "tao/PortableServer/LifespanPolicyC.h" +#include "tao/PortableServer/IdUniquenessPolicyC.h" +#include "tao/PortableServer/IdAssignmentPolicyC.h" +#include "tao/PortableServer/ImplicitActivationPolicyC.h" +#include "tao/PortableServer/ServantRetentionPolicyC.h" +#include "tao/PortableServer/RequestProcessingPolicyC.h" + +TAO_BEGIN_VERSIONED_NAMESPACE_DECL + +// Forward references. +class TAO_POA_Policy_Set; + +namespace TAO +{ + namespace Portable_Server + { + class TAO_PortableServer_Export Cached_Policies + { + public: + + enum PriorityModel + { + CLIENT_PROPAGATED, + SERVER_DECLARED, + NOT_SPECIFIED + }; + + Cached_Policies (); + + ~Cached_Policies (void); + + /// Update the cached policy values. + void update (TAO_POA_Policy_Set &policy_set + ACE_ENV_ARG_DECL); + + /** + * @name Accessor methods to cached values. + */ + //@{ + ::PortableServer::ThreadPolicyValue thread (void) const; + ::PortableServer::LifespanPolicyValue lifespan (void) const; + ::PortableServer::IdUniquenessPolicyValue id_uniqueness (void) const; + ::PortableServer::IdAssignmentPolicyValue id_assignment (void) const; + ::PortableServer::ImplicitActivationPolicyValue implicit_activation (void) const; + ::PortableServer::ServantRetentionPolicyValue servant_retention (void) const; + ::PortableServer::RequestProcessingPolicyValue request_processing (void) const; + PriorityModel priority_model (void) const; + CORBA::Short server_priority (void) const; + + void priority_model (PriorityModel priority_model); + void server_priority (CORBA::Short priority); + void implicit_activation (::PortableServer::ImplicitActivationPolicyValue value); + //@} + + protected: + + /// Helper method to update a particular policy. + void update_policy (const CORBA::Policy_ptr policy + ACE_ENV_ARG_DECL); + + ::PortableServer::ThreadPolicyValue thread_; + + ::PortableServer::LifespanPolicyValue lifespan_; + + ::PortableServer::IdUniquenessPolicyValue id_uniqueness_; + + ::PortableServer::IdAssignmentPolicyValue id_assignment_; + + ::PortableServer::ImplicitActivationPolicyValue implicit_activation_; + + ::PortableServer::ServantRetentionPolicyValue servant_retention_; + + ::PortableServer::RequestProcessingPolicyValue request_processing_; + + PriorityModel priority_model_; + + CORBA::Short server_priority_; + }; + } +} + +TAO_END_VERSIONED_NAMESPACE_DECL + +#if defined (__ACE_INLINE__) +# include "tao/PortableServer/POA_Cached_Policies.i" +#endif /* __ACE_INLINE__ */ + +#include /**/ "ace/post.h" +#endif /* TAO_POA_CACHED_POLICIES_H */ |