| 1 | // File: DynamicAny.idl
|
|---|
| 2 | // CORBA 3.0, Chapter 9
|
|---|
| 3 |
|
|---|
| 4 | #ifndef _DYNAMIC_ANY_IDL_
|
|---|
| 5 | #define _DYNAMIC_ANY_IDL_
|
|---|
| 6 |
|
|---|
| 7 | #ifdef _PRE_3_0_COMPILER_
|
|---|
| 8 | #pragma prefix "omg.org"
|
|---|
| 9 | #include <orb.idl>
|
|---|
| 10 | #else
|
|---|
| 11 | import ::CORBA;
|
|---|
| 12 | #endif // _PRE_3_0_COMPILER_
|
|---|
| 13 |
|
|---|
| 14 | module DynamicAny {
|
|---|
| 15 |
|
|---|
| 16 | #ifndef _PRE_3_0_COMPILER_
|
|---|
| 17 | typeprefix DynamicAny "omg.org";
|
|---|
| 18 | #endif // _PRE_3_0_COMPILER_
|
|---|
| 19 |
|
|---|
| 20 | local interface DynAny {
|
|---|
| 21 | exception InvalidValue {};
|
|---|
| 22 | exception TypeMismatch {};
|
|---|
| 23 |
|
|---|
| 24 | CORBA::TypeCode type();
|
|---|
| 25 |
|
|---|
| 26 | void assign( in DynAny dyn_any)
|
|---|
| 27 | raises(TypeMismatch);
|
|---|
| 28 | void from_any( in any value)
|
|---|
| 29 | raises(TypeMismatch, InvalidValue);
|
|---|
| 30 | any to_any();
|
|---|
| 31 |
|
|---|
| 32 | boolean equal( in DynAny dyn_any);
|
|---|
| 33 |
|
|---|
| 34 | void destroy();
|
|---|
| 35 | DynAny copy();
|
|---|
| 36 |
|
|---|
| 37 | void insert_boolean(in boolean value)
|
|---|
| 38 | raises(TypeMismatch, InvalidValue);
|
|---|
| 39 | void insert_octet( in octet value)
|
|---|
| 40 | raises(TypeMismatch, InvalidValue);
|
|---|
| 41 | void insert_char( in char value)
|
|---|
| 42 | raises(TypeMismatch, InvalidValue);
|
|---|
| 43 | void insert_short( in short value)
|
|---|
| 44 | raises(TypeMismatch, InvalidValue);
|
|---|
| 45 | void insert_ushort( in unsigned short
|
|---|
| 46 | value)
|
|---|
| 47 | raises(TypeMismatch, InvalidValue);
|
|---|
| 48 | void insert_long( in long value)
|
|---|
| 49 | raises(TypeMismatch, InvalidValue);
|
|---|
| 50 | void insert_ulong( in unsigned long
|
|---|
| 51 | value)
|
|---|
| 52 | raises(TypeMismatch, InvalidValue);
|
|---|
| 53 | void insert_float( in float value)
|
|---|
| 54 | raises(TypeMismatch, InvalidValue);
|
|---|
| 55 | void insert_double( in double value)
|
|---|
| 56 | raises(TypeMismatch, InvalidValue);
|
|---|
| 57 | void insert_string( in string value)
|
|---|
| 58 | raises(TypeMismatch, InvalidValue);
|
|---|
| 59 | void insert_reference(in CORBA::Object value)
|
|---|
| 60 | raises(TypeMismatch, InvalidValue);
|
|---|
| 61 | void insert_typecode(in CORBA::TypeCode
|
|---|
| 62 | value)
|
|---|
| 63 | raises(TypeMismatch, InvalidValue);
|
|---|
| 64 | void insert_longlong(in long long value)
|
|---|
| 65 | raises(TypeMismatch, InvalidValue);
|
|---|
| 66 | void insert_ulonglong(in unsigned long long
|
|---|
| 67 | value)
|
|---|
| 68 | raises(TypeMismatch, InvalidValue);
|
|---|
| 69 | void insert_longdouble(in long double
|
|---|
| 70 | value)
|
|---|
| 71 | raises(TypeMismatch, InvalidValue);
|
|---|
| 72 | void insert_wchar( in wchar value)
|
|---|
| 73 | raises(TypeMismatch, InvalidValue);
|
|---|
| 74 | void insert_wstring(in wstring value)
|
|---|
| 75 | raises(TypeMismatch, InvalidValue);
|
|---|
| 76 | void insert_any( in any value)
|
|---|
| 77 | raises(TypeMismatch, InvalidValue);
|
|---|
| 78 | void insert_dyn_any(in DynAny value)
|
|---|
| 79 | raises(TypeMismatch, InvalidValue);
|
|---|
| 80 | #ifndef _ORBIT2_
|
|---|
| 81 | void insert_val( in ValueBase value)
|
|---|
| 82 | raises(TypeMismatch, InvalidValue);
|
|---|
| 83 | #endif
|
|---|
| 84 | boolean get_boolean()
|
|---|
| 85 | raises(TypeMismatch, InvalidValue);
|
|---|
| 86 | octet get_octet()
|
|---|
| 87 | raises(TypeMismatch, InvalidValue);
|
|---|
| 88 | char get_char()
|
|---|
| 89 | raises(TypeMismatch, InvalidValue);
|
|---|
| 90 | short get_short()
|
|---|
| 91 | raises(TypeMismatch, InvalidValue);
|
|---|
| 92 | unsigned short get_ushort()
|
|---|
| 93 | raises(TypeMismatch, InvalidValue);
|
|---|
| 94 | long get_long()
|
|---|
| 95 | raises(TypeMismatch, InvalidValue);
|
|---|
| 96 | unsigned long get_ulong()
|
|---|
| 97 | raises(TypeMismatch, InvalidValue);
|
|---|
| 98 | float get_float()
|
|---|
| 99 | raises(TypeMismatch, InvalidValue);
|
|---|
| 100 | double get_double()
|
|---|
| 101 | raises(TypeMismatch, InvalidValue);
|
|---|
| 102 | string get_string()
|
|---|
| 103 | raises(TypeMismatch, InvalidValue);
|
|---|
| 104 | CORBA::Object get_reference()
|
|---|
| 105 | raises(TypeMismatch, InvalidValue);
|
|---|
| 106 | CORBA::TypeCode get_typecode()
|
|---|
| 107 | raises(TypeMismatch, InvalidValue);
|
|---|
| 108 | long long get_longlong()
|
|---|
| 109 | raises(TypeMismatch, InvalidValue);
|
|---|
| 110 | unsigned long long get_ulonglong()
|
|---|
| 111 | raises(TypeMismatch, InvalidValue);
|
|---|
| 112 | long double get_longdouble()
|
|---|
| 113 | raises(TypeMismatch, InvalidValue);
|
|---|
| 114 | wchar get_wchar()
|
|---|
| 115 | raises(TypeMismatch, InvalidValue);
|
|---|
| 116 | wstring get_wstring()
|
|---|
| 117 | raises(TypeMismatch, InvalidValue);
|
|---|
| 118 | any get_any()
|
|---|
| 119 | raises(TypeMismatch, InvalidValue);
|
|---|
| 120 | DynAny get_dyn_any()
|
|---|
| 121 | raises(TypeMismatch, InvalidValue);
|
|---|
| 122 | #ifndef _ORBIT2_
|
|---|
| 123 | ValueBase get_val()
|
|---|
| 124 | raises(TypeMismatch, InvalidValue);
|
|---|
| 125 | #endif
|
|---|
| 126 | boolean seek(in long index);
|
|---|
| 127 | void rewind();
|
|---|
| 128 | boolean next();
|
|---|
| 129 | unsigned long component_count();
|
|---|
| 130 | DynAny current_component()
|
|---|
| 131 | raises(TypeMismatch);
|
|---|
| 132 |
|
|---|
| 133 | void insert_abstract(in CORBA::AbstractBase value)
|
|---|
| 134 | raises(TypeMismatch, InvalidValue);
|
|---|
| 135 | CORBA::AbstractBase get_abstract()
|
|---|
| 136 | raises(TypeMismatch, InvalidValue);
|
|---|
| 137 |
|
|---|
| 138 | void insert_boolean_seq(in CORBA::BooleanSeq value)
|
|---|
| 139 | raises(TypeMismatch, InvalidValue);
|
|---|
| 140 | void insert_octet_seq(in CORBA::OctetSeq value)
|
|---|
| 141 | raises(TypeMismatch, InvalidValue);
|
|---|
| 142 | void insert_char_seq(in CORBA::CharSeq value)
|
|---|
| 143 | raises(TypeMismatch, InvalidValue);
|
|---|
| 144 | void insert_short_seq(in CORBA::ShortSeq value)
|
|---|
| 145 | raises(TypeMismatch, InvalidValue);
|
|---|
| 146 | void insert_ushort_seq(in CORBA::UShortSeq value)
|
|---|
| 147 | raises(TypeMismatch, InvalidValue);
|
|---|
| 148 | void insert_long_seq(in CORBA::LongSeq value)
|
|---|
| 149 | raises(TypeMismatch, InvalidValue);
|
|---|
| 150 | void insert_ulong_seq(in CORBA::ULongSeq value)
|
|---|
| 151 | raises(TypeMismatch, InvalidValue);
|
|---|
| 152 | void insert_float_seq(in CORBA::FloatSeq value)
|
|---|
| 153 | raises(TypeMismatch, InvalidValue);
|
|---|
| 154 | void insert_double_seq(in CORBA::DoubleSeq value)
|
|---|
| 155 | raises(TypeMismatch, InvalidValue);
|
|---|
| 156 | void insert_longlong_seq(in CORBA::LongLongSeq value)
|
|---|
| 157 | raises(TypeMismatch, InvalidValue);
|
|---|
| 158 | void insert_ulonglong_seq(in CORBA::ULongLongSeq value)
|
|---|
| 159 | raises(TypeMismatch, InvalidValue);
|
|---|
| 160 | void insert_longdouble_seq(in CORBA::LongDoubleSeq value)
|
|---|
| 161 | raises(TypeMismatch, InvalidValue);
|
|---|
| 162 | void insert_wchar_seq(in CORBA::WCharSeq value)
|
|---|
| 163 | raises(TypeMismatch, InvalidValue);
|
|---|
| 164 | CORBA::BooleanSeq get_boolean_seq()
|
|---|
| 165 | raises(TypeMismatch, InvalidValue);
|
|---|
| 166 | CORBA::OctetSeq get_octet_seq()
|
|---|
| 167 | raises(TypeMismatch, InvalidValue);
|
|---|
| 168 | CORBA::CharSeq get_char_seq()
|
|---|
| 169 | raises(TypeMismatch, InvalidValue);
|
|---|
| 170 | CORBA::ShortSeq get_short_seq()
|
|---|
| 171 | raises(TypeMismatch, InvalidValue);
|
|---|
| 172 | CORBA::UShortSeq get_ushort_seq()
|
|---|
| 173 | raises(TypeMismatch, InvalidValue);
|
|---|
| 174 | CORBA::LongSeq get_long_seq()
|
|---|
| 175 | raises(TypeMismatch, InvalidValue);
|
|---|
| 176 | CORBA::ULongSeq get_ulong_seq()
|
|---|
| 177 | raises(TypeMismatch, InvalidValue);
|
|---|
| 178 | CORBA::FloatSeq get_float_seq()
|
|---|
| 179 | raises(TypeMismatch, InvalidValue);
|
|---|
| 180 | CORBA::DoubleSeq get_double_seq()
|
|---|
| 181 | raises(TypeMismatch, InvalidValue);
|
|---|
| 182 | CORBA::LongLongSeq get_longlong_seq()
|
|---|
| 183 | raises(TypeMismatch, InvalidValue);
|
|---|
| 184 | CORBA::ULongLongSeq get_ulonglong_seq()
|
|---|
| 185 | raises(TypeMismatch, InvalidValue);
|
|---|
| 186 | CORBA::LongDoubleSeq get_longdouble_seq()
|
|---|
| 187 | raises(TypeMismatch, InvalidValue);
|
|---|
| 188 | CORBA::WCharSeq get_wchar_seq()
|
|---|
| 189 | raises(TypeMismatch, InvalidValue);
|
|---|
| 190 | };
|
|---|
| 191 |
|
|---|
| 192 | local interface DynFixed : DynAny {
|
|---|
| 193 | string get_value();
|
|---|
| 194 | boolean set_value(in string val)
|
|---|
| 195 | raises(TypeMismatch, InvalidValue);
|
|---|
| 196 | };
|
|---|
| 197 |
|
|---|
| 198 | local interface DynEnum : DynAny {
|
|---|
| 199 | string get_as_string();
|
|---|
| 200 | void set_as_string(in string value)
|
|---|
| 201 | raises(InvalidValue);
|
|---|
| 202 | unsigned long get_as_ulong();
|
|---|
| 203 | void set_as_ulong( in unsigned long value)
|
|---|
| 204 | raises(InvalidValue);
|
|---|
| 205 | };
|
|---|
| 206 | typedef string FieldName;
|
|---|
| 207 | struct NameValuePair {
|
|---|
| 208 | FieldName id;
|
|---|
| 209 | any value;
|
|---|
| 210 | };
|
|---|
| 211 |
|
|---|
| 212 | typedef sequence<NameValuePair> NameValuePairSeq;
|
|---|
| 213 | struct NameDynAnyPair {
|
|---|
| 214 | FieldName id;
|
|---|
| 215 | DynAny value;
|
|---|
| 216 | };
|
|---|
| 217 |
|
|---|
| 218 | typedef sequence<NameDynAnyPair> NameDynAnyPairSeq;
|
|---|
| 219 | local interface DynStruct : DynAny {
|
|---|
| 220 | FieldName current_member_name()
|
|---|
| 221 | raises(TypeMismatch, InvalidValue);
|
|---|
| 222 | CORBA::TCKind current_member_kind()
|
|---|
| 223 | raises(TypeMismatch, InvalidValue);
|
|---|
| 224 | NameValuePairSeq get_members();
|
|---|
| 225 | void set_members(in NameValuePairSeq value)
|
|---|
| 226 | raises(TypeMismatch, InvalidValue);
|
|---|
| 227 | NameDynAnyPairSeq get_members_as_dyn_any();
|
|---|
| 228 | void set_members_as_dyn_any(in NameDynAnyPairSeq value)
|
|---|
| 229 | raises(TypeMismatch, InvalidValue);
|
|---|
| 230 | };
|
|---|
| 231 |
|
|---|
| 232 | local interface DynUnion : DynAny {
|
|---|
| 233 | DynAny get_discriminator();
|
|---|
| 234 | void set_discriminator(in DynAny d)
|
|---|
| 235 | raises(TypeMismatch);
|
|---|
| 236 | void set_to_default_member()
|
|---|
| 237 | raises(TypeMismatch);
|
|---|
| 238 | void set_to_no_active_member()
|
|---|
| 239 | raises(TypeMismatch);
|
|---|
| 240 | boolean has_no_active_member();
|
|---|
| 241 | CORBA::TCKind discriminator_kind();
|
|---|
| 242 | DynAny member()
|
|---|
| 243 | raises(InvalidValue);
|
|---|
| 244 | FieldName member_name()
|
|---|
| 245 | raises(InvalidValue);
|
|---|
| 246 | CORBA::TCKind member_kind()
|
|---|
| 247 | raises(InvalidValue);
|
|---|
| 248 | };
|
|---|
| 249 |
|
|---|
| 250 | typedef sequence<any> AnySeq;
|
|---|
| 251 | typedef sequence<DynAny> DynAnySeq;
|
|---|
| 252 | local interface DynSequence : DynAny {
|
|---|
| 253 | unsigned long get_length();
|
|---|
| 254 | void set_length(in unsigned long len)
|
|---|
| 255 | raises(InvalidValue);
|
|---|
| 256 | AnySeq get_elements();
|
|---|
| 257 | void set_elements(in AnySeq value)
|
|---|
| 258 | raises(TypeMismatch, InvalidValue);
|
|---|
| 259 | DynAnySeq get_elements_as_dyn_any();
|
|---|
| 260 | void set_elements_as_dyn_any(in DynAnySeq value)
|
|---|
| 261 | raises(TypeMismatch, InvalidValue);
|
|---|
| 262 | };
|
|---|
| 263 |
|
|---|
| 264 | local interface DynArray : DynAny {
|
|---|
| 265 | AnySeq get_elements();
|
|---|
| 266 | void set_elements(in AnySeq value)
|
|---|
| 267 | raises(TypeMismatch, InvalidValue);
|
|---|
| 268 | DynAnySeq get_elements_as_dyn_any();
|
|---|
| 269 | void set_elements_as_dyn_any(in DynAnySeq value)
|
|---|
| 270 | raises(TypeMismatch, InvalidValue);
|
|---|
| 271 | };
|
|---|
| 272 |
|
|---|
| 273 | local interface DynValueCommon : DynAny {
|
|---|
| 274 | boolean is_null();
|
|---|
| 275 | void set_to_null();
|
|---|
| 276 | void set_to_value();
|
|---|
| 277 | };
|
|---|
| 278 |
|
|---|
| 279 | local interface DynValue : DynValueCommon {
|
|---|
| 280 | FieldName current_member_name()
|
|---|
| 281 | raises(TypeMismatch, InvalidValue);
|
|---|
| 282 | CORBA::TCKind current_member_kind()
|
|---|
| 283 | raises(TypeMismatch, InvalidValue);
|
|---|
| 284 | NameValuePairSeq get_members()
|
|---|
| 285 | raises(InvalidValue);
|
|---|
| 286 | void set_members(in NameValuePairSeq value)
|
|---|
| 287 | raises(TypeMismatch, InvalidValue);
|
|---|
| 288 | NameDynAnyPairSeq get_members_as_dyn_any()
|
|---|
| 289 | raises(InvalidValue);
|
|---|
| 290 | void set_members_as_dyn_any(in NameDynAnyPairSeq value)
|
|---|
| 291 | raises(TypeMismatch, InvalidValue);
|
|---|
| 292 | };
|
|---|
| 293 |
|
|---|
| 294 | local interface DynValueBox : DynValueCommon {
|
|---|
| 295 | any get_boxed_value()
|
|---|
| 296 | raises(InvalidValue);
|
|---|
| 297 | void set_boxed_value(in any boxed)
|
|---|
| 298 | raises(TypeMismatch, InvalidValue);
|
|---|
| 299 | DynAny get_boxed_value_as_dyn_any()
|
|---|
| 300 | raises(InvalidValue);
|
|---|
| 301 | void set_boxed_value_as_dyn_any(in DynAny boxed)
|
|---|
| 302 | raises(TypeMismatch);
|
|---|
| 303 | };
|
|---|
| 304 |
|
|---|
| 305 | exception MustTruncate { };
|
|---|
| 306 |
|
|---|
| 307 | local interface DynAnyFactory {
|
|---|
| 308 | exception InconsistentTypeCode {};
|
|---|
| 309 | DynAny create_dyn_any(in any value)
|
|---|
| 310 | raises(InconsistentTypeCode);
|
|---|
| 311 | DynAny create_dyn_any_from_type_code(in CORBA::TypeCode type)
|
|---|
| 312 | raises(InconsistentTypeCode);
|
|---|
| 313 | DynAny create_dyn_any_without_truncation(in any value)
|
|---|
| 314 | raises(InconsistentTypeCode, MustTruncate);
|
|---|
| 315 | DynAnySeq create_multiple_dyn_anys(
|
|---|
| 316 | in AnySeq values,
|
|---|
| 317 | in boolean allow_truncate)
|
|---|
| 318 | raises(InconsistentTypeCode, MustTruncate);
|
|---|
| 319 | AnySeq create_multiple_anys(in DynAnySeq values);
|
|---|
| 320 | };
|
|---|
| 321 |
|
|---|
| 322 |
|
|---|
| 323 |
|
|---|
| 324 | }; // module DynamicAny
|
|---|
| 325 | #endif // _DYNAMIC_ANY_IDL_
|
|---|