4 * @file DynamicAny.pidl
6 * @brief IDL source for the DynamicAny module.
8 * It was obtained from the OMG website as part of the full CORBA IDL,
9 * the document reference number is: formal/04-03-01, or use the
11 * http://www.omg.org/technology/documents/formal/corba_omg_idl_text_file.htm
13 * We couldn't find a copyright notice in the document, but it is safe
14 * to assume that it is Copyright (C) 2004, OMG.
17 #ifndef _DYNAMIC_ANY_IDL_
18 #define _DYNAMIC_ANY_IDL_
20 #include "tao/Typecode_types.pidl"
21 #include "tao/BooleanSeq.pidl"
22 #include "tao/CharSeq.pidl"
23 #include "tao/DoubleSeq.pidl"
24 #include "tao/FloatSeq.pidl"
25 #include "tao/LongDoubleSeq.pidl"
26 #include "tao/LongLongSeq.pidl"
27 #include "tao/LongSeq.pidl"
28 #include "tao/OctetSeq.pidl"
29 #include "tao/BooleanSeq.pidl"
30 #include "tao/ShortSeq.pidl"
31 #include "tao/ULongLongSeq.pidl"
32 #include "tao/ULongSeq.pidl"
33 #include "tao/UShortSeq.pidl"
34 #include "tao/WCharSeq.pidl"
38 typeprefix DynamicAny "omg.org";
40 local interface DynAny
42 exception InvalidValue {};
43 exception TypeMismatch {};
45 CORBA::TypeCode type ();
47 void assign (in DynAny dyn_any)
48 raises (TypeMismatch);
50 void from_any (in any value)
51 raises (TypeMismatch, InvalidValue);
55 boolean equal (in DynAny dyn_any);
61 void insert_boolean (in boolean value)
62 raises (TypeMismatch, InvalidValue);
63 void insert_octet (in octet value)
64 raises (TypeMismatch, InvalidValue);
65 void insert_char (in char value)
66 raises (TypeMismatch, InvalidValue);
67 void insert_short (in short value)
68 raises (TypeMismatch, InvalidValue);
69 void insert_ushort (in unsigned short value)
70 raises (TypeMismatch, InvalidValue);
71 void insert_long (in long value)
72 raises (TypeMismatch, InvalidValue);
73 void insert_ulong (in unsigned long value)
74 raises (TypeMismatch, InvalidValue);
75 void insert_float (in float value)
76 raises (TypeMismatch, InvalidValue);
77 void insert_double (in double value)
78 raises (TypeMismatch, InvalidValue);
79 void insert_string (in string value)
80 raises (TypeMismatch, InvalidValue);
81 void insert_reference (in Object value)
82 raises (TypeMismatch, InvalidValue);
83 void insert_typecode (in CORBA::TypeCode value)
84 raises (TypeMismatch, InvalidValue);
85 void insert_longlong (in long long value)
86 raises (TypeMismatch, InvalidValue);
87 void insert_ulonglong (in unsigned long long value)
88 raises (TypeMismatch, InvalidValue);
89 void insert_longdouble (in long double value)
90 raises (TypeMismatch, InvalidValue);
91 void insert_wchar (in wchar value)
92 raises (TypeMismatch, InvalidValue);
93 void insert_wstring (in wstring value)
94 raises (TypeMismatch, InvalidValue);
95 void insert_any (in any value)
96 raises (TypeMismatch, InvalidValue);
97 void insert_dyn_any (in DynAny value)
98 raises (TypeMismatch, InvalidValue);
99 void insert_val (in ValueBase value)
100 raises (TypeMismatch, InvalidValue);
102 boolean get_boolean ()
103 raises (TypeMismatch, InvalidValue);
105 raises (TypeMismatch, InvalidValue);
107 raises (TypeMismatch, InvalidValue);
109 raises (TypeMismatch, InvalidValue);
110 unsigned short get_ushort ()
111 raises (TypeMismatch, InvalidValue);
113 raises (TypeMismatch, InvalidValue);
114 unsigned long get_ulong ()
115 raises (TypeMismatch, InvalidValue);
117 raises (TypeMismatch, InvalidValue);
119 raises (TypeMismatch, InvalidValue);
121 raises (TypeMismatch, InvalidValue);
122 Object get_reference ()
123 raises (TypeMismatch, InvalidValue);
124 CORBA::TypeCode get_typecode ()
125 raises (TypeMismatch, InvalidValue);
126 long long get_longlong ()
127 raises (TypeMismatch, InvalidValue);
128 unsigned long long get_ulonglong ()
129 raises (TypeMismatch, InvalidValue);
130 long double get_longdouble ()
131 raises (TypeMismatch, InvalidValue);
133 raises (TypeMismatch, InvalidValue);
134 wstring get_wstring ()
135 raises (TypeMismatch, InvalidValue);
137 raises (TypeMismatch, InvalidValue);
138 DynAny get_dyn_any ()
139 raises (TypeMismatch, InvalidValue);
141 raises (TypeMismatch, InvalidValue);
143 boolean seek (in long index);
149 unsigned long component_count ();
151 DynAny current_component ()
152 raises (TypeMismatch);
154 void insert_abstract (in CORBA::AbstractBase value)
155 raises (TypeMismatch, InvalidValue);
157 CORBA::AbstractBase get_abstract ()
158 raises (TypeMismatch, InvalidValue);
160 void insert_boolean_seq (in CORBA::BooleanSeq value)
161 raises (TypeMismatch, InvalidValue);
162 void insert_octet_seq (in CORBA::OctetSeq value)
163 raises (TypeMismatch, InvalidValue);
164 void insert_char_seq (in CORBA::CharSeq value)
165 raises (TypeMismatch, InvalidValue);
166 void insert_short_seq (in CORBA::ShortSeq value)
167 raises (TypeMismatch, InvalidValue);
168 void insert_ushort_seq (in CORBA::UShortSeq value)
169 raises (TypeMismatch, InvalidValue);
170 void insert_long_seq (in CORBA::LongSeq value)
171 raises (TypeMismatch, InvalidValue);
172 void insert_ulong_seq (in CORBA::ULongSeq value)
173 raises (TypeMismatch, InvalidValue);
174 void insert_float_seq (in CORBA::FloatSeq value)
175 raises (TypeMismatch, InvalidValue);
176 void insert_double_seq (in CORBA::DoubleSeq value)
177 raises (TypeMismatch, InvalidValue);
178 void insert_longlong_seq (in CORBA::LongLongSeq value)
179 raises (TypeMismatch, InvalidValue);
180 void insert_ulonglong_seq (in CORBA::ULongLongSeq value)
181 raises (TypeMismatch, InvalidValue);
182 void insert_longdouble_seq (in CORBA::LongDoubleSeq value)
183 raises (TypeMismatch, InvalidValue);
184 void insert_wchar_seq (in CORBA::WCharSeq value)
185 raises (TypeMismatch, InvalidValue);
187 CORBA::BooleanSeq get_boolean_seq ()
188 raises (TypeMismatch, InvalidValue);
189 CORBA::OctetSeq get_octet_seq()
190 raises (TypeMismatch, InvalidValue);
191 CORBA::CharSeq get_char_seq ()
192 raises (TypeMismatch, InvalidValue);
193 CORBA::ShortSeq get_short_seq ()
194 raises (TypeMismatch, InvalidValue);
195 CORBA::UShortSeq get_ushort_seq ()
196 raises (TypeMismatch, InvalidValue);
197 CORBA::LongSeq get_long_seq ()
198 raises (TypeMismatch, InvalidValue);
199 CORBA::ULongSeq get_ulong_seq ()
200 raises (TypeMismatch, InvalidValue);
201 CORBA::FloatSeq get_float_seq ()
202 raises (TypeMismatch, InvalidValue);
203 CORBA::DoubleSeq get_double_seq ()
204 raises (TypeMismatch, InvalidValue);
205 CORBA::LongLongSeq get_longlong_seq ()
206 raises (TypeMismatch, InvalidValue);
207 CORBA::ULongLongSeq get_ulonglong_seq ()
208 raises (TypeMismatch, InvalidValue);
209 CORBA::LongDoubleSeq get_longdouble_seq ()
210 raises (TypeMismatch, InvalidValue);
211 CORBA::WCharSeq get_wchar_seq ()
212 raises (TypeMismatch, InvalidValue);
215 local interface DynFixed : DynAny
219 boolean set_value (in string val)
220 raises (TypeMismatch, InvalidValue);
223 local interface DynEnum : DynAny
225 string get_as_string ();
227 void set_as_string (in string value)
228 raises (InvalidValue);
230 unsigned long get_as_ulong ();
232 void set_as_ulong (in unsigned long value)
233 raises (InvalidValue);
236 typedef string FieldName;
244 typedef sequence<NameValuePair> NameValuePairSeq;
246 struct NameDynAnyPair
252 typedef sequence<NameDynAnyPair> NameDynAnyPairSeq;
254 local interface DynStruct : DynAny
256 FieldName current_member_name ()
257 raises (TypeMismatch, InvalidValue);
259 CORBA::TCKind current_member_kind ()
260 raises (TypeMismatch, InvalidValue);
262 NameValuePairSeq get_members ();
264 void set_members (in NameValuePairSeq value)
265 raises (TypeMismatch, InvalidValue);
267 NameDynAnyPairSeq get_members_as_dyn_any ();
269 void set_members_as_dyn_any (in NameDynAnyPairSeq value)
270 raises (TypeMismatch, InvalidValue);
273 local interface DynUnion : DynAny
275 DynAny get_discriminator ();
277 void set_discriminator (in DynAny d)
278 raises (TypeMismatch);
280 void set_to_default_member ()
281 raises (TypeMismatch);
283 void set_to_no_active_member ()
284 raises (TypeMismatch);
286 boolean has_no_active_member ();
288 CORBA::TCKind discriminator_kind ();
290 DynAny member () raises (InvalidValue);
292 FieldName member_name ()
293 raises (InvalidValue);
295 CORBA::TCKind member_kind ()
296 raises (InvalidValue);
299 typedef sequence<any> AnySeq;
300 typedef sequence<DynAny> DynAnySeq;
302 local interface DynSequence : DynAny
304 unsigned long get_length ();
306 void set_length (in unsigned long len)
307 raises (InvalidValue);
309 AnySeq get_elements ();
311 void set_elements (in AnySeq value)
312 raises (TypeMismatch, InvalidValue);
314 DynAnySeq get_elements_as_dyn_any ();
316 void set_elements_as_dyn_any (in DynAnySeq value)
317 raises (TypeMismatch, InvalidValue);
320 local interface DynArray : DynAny
322 AnySeq get_elements ();
324 void set_elements (in AnySeq value)
325 raises (TypeMismatch, InvalidValue);
327 DynAnySeq get_elements_as_dyn_any ();
329 void set_elements_as_dyn_any (in DynAnySeq value)
330 raises (TypeMismatch, InvalidValue);
333 local interface DynValueCommon : DynAny
339 void set_to_value ();
342 local interface DynValue : DynValueCommon
344 FieldName current_member_name ()
345 raises (TypeMismatch, InvalidValue);
347 CORBA::TCKind current_member_kind ()
348 raises (TypeMismatch, InvalidValue);
350 NameValuePairSeq get_members ();
352 void set_members (in NameValuePairSeq value)
353 raises (TypeMismatch, InvalidValue);
355 NameDynAnyPairSeq get_members_as_dyn_any ();
357 void set_members_as_dyn_any (in NameDynAnyPairSeq value)
358 raises (TypeMismatch, InvalidValue);
361 local interface DynValueBox : DynValueCommon
363 any get_boxed_value ()
364 raises (InvalidValue);
366 void set_boxed_value (in any boxed)
367 raises (TypeMismatch, InvalidValue);
369 DynAny get_boxed_value_as_dyn_any ()
370 raises (InvalidValue);
372 void set_boxed_value_as_dyn_any (in DynAny boxed)
373 raises (TypeMismatch);
376 exception MustTruncate {};
378 local interface DynAnyFactory
380 exception InconsistentTypeCode {};
382 DynAny create_dyn_any (in any value)
383 raises (InconsistentTypeCode);
384 DynAny create_dyn_any_from_type_code (in CORBA::TypeCode type)
385 raises (InconsistentTypeCode);
387 DynAny create_dyn_any_without_truncation (in any value)
388 raises (InconsistentTypeCode, MustTruncate);
390 DynAnySeq create_multiple_dyn_anys (in AnySeq values,
391 in boolean allow_truncate)
392 raises (InconsistentTypeCode, MustTruncate);
394 AnySeq create_multiple_anys (in DynAnySeq values);
396 }; // module DynamicAny
398 #endif // _DYNAMIC_ANY_IDL_