Previous Table of Contents Next


4.8.5 Specification of New Policy Objects


   When new PolicyTypes are added to CORBA specifications, the following details must be defined. It must be clearly stated which particular uses of a new policy are legal and which are not:

   //IDL

   struct MyPolicyRange { long low; long high;

   };

   const CORBA::PolicyType MY_POLICY_TYPE = 666;

   interface MyPolicy : Policy { readonly attribute long low; readonly attribute long high;

   };

   If this sample MyPolicy can be constructed via create_policy, the specification of MyPolicy will have a statement such as: “When instances of MyPolicy are created, a value of type MyPolicyRange is passed to CORBA::ORB::create_policy and the resulting MyPolicy’s attribute ‘low’ has the same value as the MyPolicyRange member ‘low’ and attribute ‘high’ has the same value as the MyPolicyRange member ‘high.’