Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Policy.pidl

Go to the documentation of this file.
00001 /**
00002  * @file Policy.pidl
00003  *
00004  * $Id: Policy.pidl,v 1.1.1.3 2003/02/21 18:36:45 chad Exp $
00005  *
00006  * @brief Pre-compiled IDL source for the CORBA::Policy related
00007  * classes.
00008  *
00009  * This file is used to generate the code in PolicyC.{h,i,cpp}.
00010  * Also, skeleton code for the only non local Policy interface is
00011  * generated from this pidl file and then the declaration code is
00012  * moved to tao/PortableServer/PolicyS.{h,i,cpp}
00013  *
00014  *   The steps to regenerate the code are as follows:
00015  *
00016  *   1. Run the tao_idl compiler on the patched pidl file.  The
00017  *   command used for this is:
00018  *
00019  *     tao_idl.exe
00020  *        -o orig -Gp -Gd -Ge 1 -Gv -DCORBA3
00021  *          -Wb,export_macro=TAO_Export
00022  *          -Wb,export_include="tao/corbafwd.h"
00023  *          -Wb,pre_include="ace/pre.h"
00024  *          -Wb,post_include="ace/post.h"
00025  *          Policy.pidl
00026  *
00027  *   2. Then patch the generated code.  This patch (a) eliminates
00028  *   cycles in the include dependencies; (b) adds the TAO_Encodable
00029  *   methods to the Policy class; (c) fixes the #includes in the
00030  *   PolicyS.h file.
00031  *
00032  *   Apply patches using the following commands:
00033  *
00034  *   cp orig/PolicyC.{h,i,cpp} .
00035  *   cp orig/PolicyS.{h,i,cpp} PortableServer
00036  *   cp orig/PolicyS_T.{h,i,cpp} PortableServer
00037  *   patch < diffs/Policy.diff
00038  *
00039  *   Note: The diffs were generated with these commands:
00040  *
00041  *   for i in PolicyC.{h,i,cpp}; do
00042  *     diff -wBbu orig/$i $i;
00043  *   done > diffs/Policy.diff
00044  *   for i in Policy{S,S_T}.{h,i,cpp}; do
00045  *     diff -wBbu orig/$i PortableServer/$i;
00046  *   done >> diffs/Policy.diff
00047  */
00048 
00049 #ifndef TAO_CORBA_POLICY_PIDL
00050 #define TAO_CORBA_POLICY_PIDL
00051 
00052 #include <Current.pidl>
00053 #include <Policy_Forward.pidl>
00054 
00055 #pragma prefix "omg.org"
00056 
00057 module CORBA
00058 {
00059   typedef short PolicyErrorCode;
00060   const PolicyErrorCode BAD_POLICY               = 0;
00061   const PolicyErrorCode UNSUPPORTED_POLICY       = 1;
00062   const PolicyErrorCode BAD_POLICY_TYPE          = 2;
00063   const PolicyErrorCode BAD_POLICY_VALUE         = 3;
00064   const PolicyErrorCode UNSUPPORTED_POLICY_VALUE = 4;
00065 
00066   exception PolicyError
00067   {
00068     PolicyErrorCode reason;
00069   };
00070 
00071   exception InvalidPolicies
00072   {
00073     sequence<unsigned short> indices;
00074   };
00075 
00076   interface Policy
00077   {
00078     readonly attribute PolicyType policy_type;
00079     Policy copy ();
00080     void destroy ();
00081   };
00082 
00083   local interface PolicyManager
00084   {
00085     PolicyList get_policy_overrides (in PolicyTypeSeq ts);
00086     void set_policy_overrides (
00087              in PolicyList policies,
00088              in SetOverrideType set_add)
00089         raises (InvalidPolicies);
00090   };
00091 
00092   local interface PolicyCurrent : PolicyManager, Current
00093   {
00094   };
00095 
00096 };
00097 
00098 #pragma prefix ""
00099 
00100 #endif /* TAO_CORBA_POLICY_PIDL */

Generated on Mon Jun 16 13:49:14 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002