summaryrefslogtreecommitdiff
path: root/TAO/tao/Policy_Set.i
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Policy_Set.i')
-rw-r--r--TAO/tao/Policy_Set.i29
1 files changed, 29 insertions, 0 deletions
diff --git a/TAO/tao/Policy_Set.i b/TAO/tao/Policy_Set.i
new file mode 100644
index 00000000000..910b866e3c1
--- /dev/null
+++ b/TAO/tao/Policy_Set.i
@@ -0,0 +1,29 @@
+// $Id$
+
+ACE_INLINE
+TAO_Policy_Set::TAO_Policy_Set (TAO_Policy_Scope scope)
+ : scope_ (scope)
+{
+ for (int i = 0; i < TAO_CACHED_POLICY_MAX_CACHED; i++)
+ this->cached_policies_[i] = 0;
+}
+
+ACE_INLINE CORBA::Boolean
+TAO_Policy_Set::compatible_scope (TAO_Policy_Scope policy_scope) const
+{
+ return (ACE_static_cast (unsigned int, policy_scope) &
+ ACE_static_cast (unsigned int, this->scope_));
+}
+
+ACE_INLINE CORBA::Policy *
+TAO_Policy_Set::get_policy_by_index (CORBA::ULong index)
+{
+ return CORBA::Policy::_duplicate (this->policy_list_[index]);
+}
+
+ACE_INLINE CORBA::ULong
+TAO_Policy_Set::num_policies (void) const
+{
+ return this->policy_list_.length();
+}
+