blob: 13276094b1126d1c4f9fec1bd25d9793a92173c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
//
// $Id$
//
// ================================================================
//
// = LIBRARY
// TAO
//
// = FILENAME
// Policy.pidl
//
// = DESCRIPTION
//
// This file was used to generate the code in PolicyC.{h,i,cpp}.
// Also, skeleton code for the only non local Policy interface is
// generated from this pidl file and then the declaration code is
// moved to POA_CORBA.h and the definition is kept in PolicyS.cpp.
//
// The steps to regenerate the code are as follows:
//
// 1. Patch this pidl file to (a) remove the CORBA module bringing
// the Policy interfaces to the global scope; and (b) rename the
// Policy interfaces to CORBA_Policy.
//
// Apply patches using the following commands:
//
// patch < diffs\Policy.pidl.diff
//
// 2. Run the tao_idl compiler on the patched pidl file. The
// command used for this is:
//
// tao_idl.exe \
// -Ge 1 \
// -Wb,export_macro=TAO_Export \
// -Wb,export_include="tao/corbafwd.h" \
// -Wb,pre_include="ace/pre.h" \
// -Wb,post_include="ace/post.h" \
// Policy.pidl
//
// 3. Then patch the generated code. This patch (a) fixes the
// interface repository IDs; (b) eliminates cycles in the include
// dependencies; (c) removes the extra CORBA module; (d) removes the
// extra Current interface; (e) adds the TAO_Encodable methods to
// the Policy class; (f) adds the PolicyErrorCode constants; (g)
// fixes the Policy class skeleton code to fit into the POA_CORBA
// namespace; and (h) removes the typecodes definitions.
//
// Apply patches using the following commands:
//
// patch < diffs\PolicyC.h.diff
// patch < diffs\PolicyC.i.diff
// patch < diffs\PolicyC.cpp.diff
//
// patch < diffs\PolicyS.cpp.diff
//
// 4. You'll have to move the Policy skeleton definition from
// PolicyS.h to the POA_CORBA.h by hand.
//
// 5. Undo the patches to this pidl file.
//
// Note: The diffs were generated with these commands:
//
// diff -wbu Policy.pidl Policy.pidl.mod > diffs\Policy.pidl.diff
//
// diff -wbu PolicyC.h PolicyC.h.mod > diffs\PolicyC.h.diff
// diff -wbu PolicyC.i PolicyC.i.mod > diffs\PolicyC.i.diff
// diff -wbu PolicyC.cpp PolicyC.cpp.mod > diffs\PolicyC.cpp.diff
//
// diff -wbu PolicyS.cpp PolicyS.cpp.mod > diffs\PolicyS.cpp.diff
//
// ================================================================
#ifndef TAO_CORBA_POLICY_IDL
#define TAO_CORBA_POLICY_IDL
#pragma prefix "omg.org"
module CORBA
{
typedef short PolicyErrorCode;
const PolicyErrorCode BAD_POLICY = 0;
const PolicyErrorCode UNSUPPORTED_POLICY = 1;
const PolicyErrorCode BAD_POLICY_TYPE = 2;
const PolicyErrorCode BAD_POLICY_VALUE = 3;
const PolicyErrorCode UNSUPPORTED_POLICY_VALUE = 4;
exception PolicyError
{
PolicyErrorCode reason;
};
exception InvalidPolicies
{
sequence<unsigned short> indices;
};
typedef unsigned long PolicyType;
interface Policy
{
readonly attribute PolicyType policy_type;
Policy copy ();
void destroy ();
};
typedef sequence<Policy> PolicyList;
typedef sequence<PolicyType> PolicyTypeSeq;
enum SetOverrideType
{
SET_OVERRIDE,
ADD_OVERRIDE
};
local interface PolicyManager
{
PolicyList get_policy_overrides (in PolicyTypeSeq ts);
void set_policy_overrides (
in PolicyList policies,
in SetOverrideType set_add)
raises (InvalidPolicies);
};
local interface Current
{
};
local interface PolicyCurrent : PolicyManager, Current
{
};
};
#pragma prefix ""
#endif /* TAO_CORBA_POLICY_IDL */
|