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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
#ifndef _COSPROPERTY_IDL
#define _COSPROPERTY_IDL
#pragma prefix "omg.org"
module CosPropertyService {
/*****************************************************/
/* Data Types */
/*****************************************************/
typedef string PropertyName;
struct Property {
PropertyName property_name;
any property_value;
};
enum PropertyModeType {
normal, read_only, fixed_normal, fixed_readonly, undefined };
struct PropertyDef {
PropertyName property_name;
any property_value;
PropertyModeType property_mode;
};
struct PropertyMode {
PropertyName property_name;
PropertyModeType property_mode;
};
typedef sequence<PropertyName> PropertyNames;
typedef sequence<Property> Properties;
typedef sequence<PropertyDef> PropertyDefs;
typedef sequence<PropertyMode> PropertyModes;
typedef sequence<CORBA::TypeCode> PropertyTypes;
interface PropertyNamesIterator;
interface PropertiesIterator;
interface PropertySetFactory;
interface PropertySetDef;
interface PropertySet;
/*****************************************************/
/* Exceptions */
/*****************************************************/
exception ConstraintNotSupported{};
exception InvalidPropertyName {};
exception ConflictingProperty {};
exception PropertyNotFound {};
exception UnsupportedTypeCode {};
exception UnsupportedProperty {};
exception UnsupportedMode {};
exception FixedProperty {};
exception ReadOnlyProperty {};
enum ExceptionReason { invalid_property_name, conflicting_property,
property_not_found, unsupported_type_code,
unsupported_property, unsupported_mode,
fixed_property, read_only_property };
struct PropertyException {
ExceptionReason reason;
PropertyName failing_property_name;
};
typedef sequence<PropertyException> PropertyExceptions;
exception MultipleExceptions { PropertyExceptions exceptions; };
/*****************************************************/
/* Interface Definitions */
/*****************************************************/
interface PropertySetFactory {
PropertySet create_propertyset();
PropertySet create_constrained_propertyset( in PropertyTypes allowed_property_types,
in Properties allowed_properties)
raises(ConstraintNotSupported);
PropertySet create_initial_propertyset( in Properties initial_properties)
raises(MultipleExceptions); };
/*---------------------------------------------------*/
interface PropertySetDefFactory {
PropertySetDef create_propertysetdef();
PropertySetDef create_constrained_propertysetdef( in PropertyTypes allowed_property_types,
in PropertyDefs allowed_property_defs)
raises(ConstraintNotSupported);
PropertySetDef create_initial_propertysetdef( in PropertyDefs initial_property_defs)
raises(MultipleExceptions);
};
/*---------------------------------------------------*/
interface PropertySet {
/* Support for defining and modifying properties */
void define_property( in PropertyName property_name, in any property_value)
raises(InvalidPropertyName, ConflictingProperty, UnsupportedTypeCode,
UnsupportedProperty, ReadOnlyProperty);
void define_properties( in Properties nproperties)
raises(MultipleExceptions);
/* Support for Getting Properties and their Names */
unsigned long get_number_of_properties();
void get_all_property_names( in unsigned long how_many,
out PropertyNames property_names,
out PropertyNamesIterator rest);
any get_property_value( in PropertyName property_name)
raises(PropertyNotFound, InvalidPropertyName);
boolean get_properties( in PropertyNames property_names,
out Properties nproperties);
void get_all_properties( in unsigned long how_many,
out Properties nproperties,
out PropertiesIterator rest);
/* Support for Deleting Properties */
void delete_property( in PropertyName property_name)
raises(PropertyNotFound, InvalidPropertyName, FixedProperty);
void delete_properties( in PropertyNames property_names)
raises(MultipleExceptions);
boolean delete_all_properties();
/* Support for Existence Check */
boolean is_property_defined( in PropertyName property_name)
raises(InvalidPropertyName);
};
/*---------------------------------------------------*/
interface PropertySetDef:PropertySet {
/* Support for retrieval of PropertySet constraints*/
void get_allowed_property_types( out PropertyTypes property_types);
void get_allowed_properties( out PropertyDefs property_defs);
/* Support for defining and modifying properties */
void define_property_with_mode( in PropertyName property_name,
in any property_value,
in PropertyModeType property_mode)
raises(InvalidPropertyName, ConflictingProperty, UnsupportedTypeCode,
UnsupportedProperty, UnsupportedMode, ReadOnlyProperty);
void define_properties_with_modes( in PropertyDefs property_defs)
raises(MultipleExceptions);
/* Support for Getting and Setting Property Modes */
PropertyModeType get_property_mode( in PropertyName property_name)
raises(PropertyNotFound, InvalidPropertyName);
boolean get_property_modes( in PropertyNames property_names,
out PropertyModes property_modes);
void set_property_mode( in PropertyName property_name,
in PropertyModeType property_mode)
raises(InvalidPropertyName, PropertyNotFound, UnsupportedMode);
void set_property_modes( in PropertyModes property_modes)
raises(MultipleExceptions);
};
/*---------------------------------------------------*/
interface PropertyNamesIterator{
void reset();
boolean next_one( out PropertyName property_name);
boolean next_n ( in unsigned long how_many,
out PropertyNames property_names);
void destroy();
};
/*---------------------------------------------------*/
interface PropertiesIterator {
void reset();
boolean next_one( out Property aproperty);
boolean next_n( in unsigned long how_many,
out Properties nproperties);
void destroy();
};
};
#endif
|