src/share/classes/org/omg/DynamicAny/DynamicAny.idl

Wed, 27 Apr 2016 01:21:28 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:21:28 +0800
changeset 0
7ef37b2cdcad
child 748
6845b95cba6b
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/corba/
changeset: 765:f46df0af2ca8
tag: jdk8u25-b17

aoqi@0 1 /*
aoqi@0 2 * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 4 *
aoqi@0 5 * This code is free software; you can redistribute it and/or modify it
aoqi@0 6 * under the terms of the GNU General Public License version 2 only, as
aoqi@0 7 * published by the Free Software Foundation. Oracle designates this
aoqi@0 8 * particular file as subject to the "Classpath" exception as provided
aoqi@0 9 * by Oracle in the LICENSE file that accompanied this code.
aoqi@0 10 *
aoqi@0 11 * This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 14 * version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 15 * accompanied this code).
aoqi@0 16 *
aoqi@0 17 * You should have received a copy of the GNU General Public License version
aoqi@0 18 * 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 20 *
aoqi@0 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 22 * or visit www.oracle.com if you need additional information or have any
aoqi@0 23 * questions.
aoqi@0 24 */
aoqi@0 25
aoqi@0 26 // IDL
aoqi@0 27 // File: DynamicAny.idl
aoqi@0 28
aoqi@0 29 #ifndef _DYNAMIC_ANY_IDL_
aoqi@0 30 #define _DYNAMIC_ANY_IDL_
aoqi@0 31
aoqi@0 32 #pragma prefix "omg.org"
aoqi@0 33 #include <orb.idl>
aoqi@0 34
aoqi@0 35 /**
aoqi@0 36 * An any can be passed to a program that doesn't have any static information for the
aoqi@0 37 type of the any (code generated for the type by an IDL compiler has not been
aoqi@0 38 compiled with the object implementation). As a result, the object receiving the any
aoqi@0 39 does not have a portable method of using it.
aoqi@0 40 <P>DynAnys enable traversal of the data value associated with an any at
aoqi@0 41 runtime and extraction of the primitive constituents of the data value. This is especially
aoqi@0 42 helpful for writing powerful generic servers (bridges, event channels supporting
aoqi@0 43 filtering).
aoqi@0 44 <P>Similarly, this facility enables the construction of an any at runtime, without having
aoqi@0 45 static knowledge of its type. This is especially helpful for writing generic clients
aoqi@0 46 (bridges, browsers, debuggers, user interface tools).
aoqi@0 47 */
aoqi@0 48 module DynamicAny {
aoqi@0 49 /**
aoqi@0 50 * Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
aoqi@0 51 * A DynAny object is associated with a data value which corresponds to a copy of the value
aoqi@0 52 * inserted into an any.
aoqi@0 53 * <P>A DynAny object may be viewed as an ordered collection of component DynAnys.
aoqi@0 54 * For DynAnys representing a basic type, such as long, or a type without components,
aoqi@0 55 * such as an empty exception, the ordered collection of components is empty.
aoqi@0 56 * Each DynAny object maintains the notion of a current position into its collection
aoqi@0 57 * of component DynAnys. The current position is identified by an index value that runs
aoqi@0 58 * from 0 to n-1, where n is the number of components.
aoqi@0 59 * The special index value -1 indicates a current position that points nowhere.
aoqi@0 60 * For values that cannot have a current position (such as an empty exception),
aoqi@0 61 * the index value is fixed at -1.
aoqi@0 62 * If a DynAny is initialized with a value that has components, the index is initialized to 0.
aoqi@0 63 * After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode
aoqi@0 64 * that permits components), the current position depends on the type of value represented by
aoqi@0 65 * the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny
aoqi@0 66 * gets default values for its components.)
aoqi@0 67 * <P>The iteration operations rewind, seek, and next can be used to change the current position
aoqi@0 68 * and the current_component operation returns the component at the current position.
aoqi@0 69 * The component_count operation returns the number of components of a DynAny.
aoqi@0 70 * Collectively, these operations enable iteration over the components of a DynAny, for example,
aoqi@0 71 * to (recursively) examine its contents.
aoqi@0 72 * <P>A constructed DynAny object is a DynAny object associated with a constructed type.
aoqi@0 73 * There is a different interface, inheriting from the DynAny interface, associated with
aoqi@0 74 * each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array,
aoqi@0 75 * exception, and value type).
aoqi@0 76 * <P>A constructed DynAny object exports operations that enable the creation of new DynAny objects,
aoqi@0 77 * each of them associated with a component of the constructed data value.
aoqi@0 78 * As an example, a DynStruct is associated with a struct value. This means that the DynStruct
aoqi@0 79 * may be seen as owning an ordered collection of components, one for each structure member.
aoqi@0 80 * The DynStruct object exports operations that enable the creation of new DynAny objects,
aoqi@0 81 * each of them associated with a member of the struct.
aoqi@0 82 * <P>If a DynAny object has been obtained from another (constructed) DynAny object,
aoqi@0 83 * such as a DynAny representing a structure member that was created from a DynStruct,
aoqi@0 84 * the member DynAny is logically contained in the DynStruct.
aoqi@0 85 * Calling an insert or get operation leaves the current position unchanged.
aoqi@0 86 * Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny)
aoqi@0 87 * also destroys any component DynAny objects obtained from it.
aoqi@0 88 * Destroying a non-top level DynAny object does nothing.
aoqi@0 89 * Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST.
aoqi@0 90 * If the programmer wants to destroy a DynAny object but still wants to manipulate some component
aoqi@0 91 * of the data value associated with it, then he or she should first create a DynAny for the component
aoqi@0 92 * and, after that, make a copy of the created DynAny object.
aoqi@0 93 * <P>The behavior of DynAny objects has been defined in order to enable efficient implementations
aoqi@0 94 * in terms of allocated memory space and speed of access. DynAny objects are intended to be used
aoqi@0 95 * for traversing values extracted from anys or constructing values of anys at runtime.
aoqi@0 96 * Their use for other purposes is not recommended.
aoqi@0 97 * <P>Insert and get operations are necessary to handle basic DynAny objects
aoqi@0 98 * but are also helpful to handle constructed DynAny objects.
aoqi@0 99 * Inserting a basic data type value into a constructed DynAny object
aoqi@0 100 * implies initializing the current component of the constructed data value
aoqi@0 101 * associated with the DynAny object. For example, invoking insert_boolean on a
aoqi@0 102 * DynStruct implies inserting a boolean data value at the current position
aoqi@0 103 * of the associated struct data value.
aoqi@0 104 * A type is consistent for inserting or extracting a value if its TypeCode is equivalent to
aoqi@0 105 * the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode
aoqi@0 106 * of the DynAny at the current position.
aoqi@0 107 * <P>DynAny and DynAnyFactory objects are intended to be local to the process in which they are
aoqi@0 108 * created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported
aoqi@0 109 * to other processes, or externalized with ORB.object_to_string().
aoqi@0 110 * If any attempt is made to do so, the offending operation will raise a MARSHAL system exception.
aoqi@0 111 * Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard
aoqi@0 112 * org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object
aoqi@0 113 * interface may raise the standard NO_IMPLEMENT exception.
aoqi@0 114 * An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.
aoqi@0 115 */
aoqi@0 116 interface DynAny {
aoqi@0 117 #pragma sun_localservant DynAny ""
aoqi@0 118 exception InvalidValue {};
aoqi@0 119 exception TypeMismatch {};
aoqi@0 120
aoqi@0 121 /**
aoqi@0 122 * Returns the TypeCode associated with this DynAny object.
aoqi@0 123 * A DynAny object is created with a TypeCode value assigned to it.
aoqi@0 124 * This TypeCode value determines the type of the value handled through the DynAny object.
aoqi@0 125 * Note that the TypeCode associated with a DynAny object is initialized at the time the
aoqi@0 126 * DynAny is created and cannot be changed during lifetime of the DynAny object.
aoqi@0 127 *
aoqi@0 128 * @return The TypeCode associated with this DynAny object
aoqi@0 129 */
aoqi@0 130 CORBA::TypeCode type();
aoqi@0 131
aoqi@0 132 /**
aoqi@0 133 * Initializes the value associated with a DynAny object with the value
aoqi@0 134 * associated with another DynAny object.
aoqi@0 135 * The current position of the target DynAny is set to zero for values that have components
aoqi@0 136 * and to -1 for values that do not have components.
aoqi@0 137 *
aoqi@0 138 * @param dyn_any
aoqi@0 139 * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
aoqi@0 140 */
aoqi@0 141 void assign(in DynAny dyn_any)
aoqi@0 142 raises(TypeMismatch);
aoqi@0 143
aoqi@0 144 /**
aoqi@0 145 * Initializes the value associated with a DynAny object with the value contained in an any.
aoqi@0 146 * The current position of the target DynAny is set to zero for values that have components
aoqi@0 147 * and to -1 for values that do not have components.
aoqi@0 148 *
aoqi@0 149 * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
aoqi@0 150 * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
aoqi@0 151 */
aoqi@0 152 void from_any(in any value)
aoqi@0 153 raises(TypeMismatch, InvalidValue);
aoqi@0 154
aoqi@0 155 /**
aoqi@0 156 * Creates an any value from a DynAny object.
aoqi@0 157 * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
aoqi@0 158 * The value associated with the DynAny object is copied into the any.
aoqi@0 159 *
aoqi@0 160 * @return a new Any object with the same value and TypeCode
aoqi@0 161 */
aoqi@0 162 any to_any();
aoqi@0 163
aoqi@0 164 /**
aoqi@0 165 * Compares two DynAny values for equality.
aoqi@0 166 * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
aoqi@0 167 * have equal values.
aoqi@0 168 * The current position of the two DynAnys being compared has no effect on the result of equal.
aoqi@0 169 *
aoqi@0 170 * @return true of the DynAnys are equal, false otherwise
aoqi@0 171 */
aoqi@0 172 boolean equal(in DynAny dyn_any);
aoqi@0 173
aoqi@0 174 /**
aoqi@0 175 * Destroys a DynAny object.
aoqi@0 176 * This operation frees any resources used to represent the data value associated with a DynAny object.
aoqi@0 177 * It must be invoked on references obtained from one of the creation operations on the ORB interface
aoqi@0 178 * or on a reference returned by DynAny.copy() to avoid resource leaks.
aoqi@0 179 * Invoking destroy on component DynAny objects (for example, on objects returned by the
aoqi@0 180 * current_component operation) does nothing.
aoqi@0 181 * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
aoqi@0 182 * That is, references to components of a destroyed DynAny become invalid.
aoqi@0 183 * Invocations on such references raise OBJECT_NOT_EXIST.
aoqi@0 184 * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
aoqi@0 185 * from which the component was obtained by making a copy of the component with the copy operation
aoqi@0 186 * before destroying the DynAny from which the component was obtained.
aoqi@0 187 */
aoqi@0 188 void destroy();
aoqi@0 189
aoqi@0 190 /**
aoqi@0 191 * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
aoqi@0 192 * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
aoqi@0 193 * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
aoqi@0 194 *
aoqi@0 195 * @return a deep copy of the DynAny object
aoqi@0 196 */
aoqi@0 197 DynAny copy();
aoqi@0 198
aoqi@0 199 /**
aoqi@0 200 * Inserts a boolean value into the DynAny.
aoqi@0 201 *
aoqi@0 202 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 203 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 204 */
aoqi@0 205 void insert_boolean(in boolean value)
aoqi@0 206 raises(TypeMismatch, InvalidValue);
aoqi@0 207
aoqi@0 208 /**
aoqi@0 209 * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
aoqi@0 210 *
aoqi@0 211 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 212 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 213 */
aoqi@0 214 void insert_octet(in octet value)
aoqi@0 215 raises(TypeMismatch, InvalidValue);
aoqi@0 216
aoqi@0 217 /**
aoqi@0 218 * Inserts a char value into the DynAny.
aoqi@0 219 *
aoqi@0 220 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 221 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 222 */
aoqi@0 223 void insert_char(in char value)
aoqi@0 224 raises(TypeMismatch, InvalidValue);
aoqi@0 225
aoqi@0 226 /**
aoqi@0 227 * Inserts a short value into the DynAny.
aoqi@0 228 *
aoqi@0 229 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 230 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 231 */
aoqi@0 232 void insert_short(in short value)
aoqi@0 233 raises(TypeMismatch, InvalidValue);
aoqi@0 234
aoqi@0 235 /**
aoqi@0 236 * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
aoqi@0 237 *
aoqi@0 238 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 239 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 240 */
aoqi@0 241 void insert_ushort(in unsigned short value)
aoqi@0 242 raises(TypeMismatch, InvalidValue);
aoqi@0 243
aoqi@0 244 /**
aoqi@0 245 * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
aoqi@0 246 *
aoqi@0 247 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 248 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 249 */
aoqi@0 250 void insert_long(in long value)
aoqi@0 251 raises(TypeMismatch, InvalidValue);
aoqi@0 252
aoqi@0 253 /**
aoqi@0 254 * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
aoqi@0 255 *
aoqi@0 256 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 257 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 258 */
aoqi@0 259 void insert_ulong(in unsigned long value)
aoqi@0 260 raises(TypeMismatch, InvalidValue);
aoqi@0 261
aoqi@0 262 /**
aoqi@0 263 * Inserts a float value into the DynAny.
aoqi@0 264 *
aoqi@0 265 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 266 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 267 */
aoqi@0 268 void insert_float(in float value)
aoqi@0 269 raises(TypeMismatch, InvalidValue);
aoqi@0 270
aoqi@0 271 /**
aoqi@0 272 * Inserts a double value into the DynAny.
aoqi@0 273 *
aoqi@0 274 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 275 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 276 */
aoqi@0 277 void insert_double(in double value)
aoqi@0 278 raises(TypeMismatch, InvalidValue);
aoqi@0 279
aoqi@0 280 /**
aoqi@0 281 * Inserts a string value into the DynAny.
aoqi@0 282 * Both bounded and unbounded strings are inserted using this method.
aoqi@0 283 *
aoqi@0 284 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 285 * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
aoqi@0 286 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 287 */
aoqi@0 288 void insert_string(in string value)
aoqi@0 289 raises(TypeMismatch, InvalidValue);
aoqi@0 290
aoqi@0 291 /**
aoqi@0 292 * Inserts a reference to a CORBA object into the DynAny.
aoqi@0 293 *
aoqi@0 294 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 295 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 296 */
aoqi@0 297 void insert_reference(in Object value)
aoqi@0 298 raises(TypeMismatch, InvalidValue);
aoqi@0 299
aoqi@0 300 /**
aoqi@0 301 * Inserts a TypeCode object into the DynAny.
aoqi@0 302 *
aoqi@0 303 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 304 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 305 */
aoqi@0 306 void insert_typecode(in CORBA::TypeCode value)
aoqi@0 307 raises(TypeMismatch, InvalidValue);
aoqi@0 308
aoqi@0 309 /**
aoqi@0 310 * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
aoqi@0 311 *
aoqi@0 312 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 313 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 314 */
aoqi@0 315 void insert_longlong(in long long value)
aoqi@0 316 raises(TypeMismatch, InvalidValue);
aoqi@0 317
aoqi@0 318 /**
aoqi@0 319 * Inserts a long value into the DynAny.
aoqi@0 320 * The IDL unsigned long long data type is mapped to the Java long data type.
aoqi@0 321 *
aoqi@0 322 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 323 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 324 */
aoqi@0 325 void insert_ulonglong(in unsigned long long value)
aoqi@0 326 raises(TypeMismatch, InvalidValue);
aoqi@0 327
aoqi@0 328 // void insert_longdouble(in long double value)
aoqi@0 329 // raises(TypeMismatch, InvalidValue);
aoqi@0 330
aoqi@0 331 /**
aoqi@0 332 * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
aoqi@0 333 *
aoqi@0 334 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 335 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 336 */
aoqi@0 337 void insert_wchar(in wchar value)
aoqi@0 338 raises(TypeMismatch, InvalidValue);
aoqi@0 339
aoqi@0 340 /**
aoqi@0 341 * Inserts a string value into the DynAny.
aoqi@0 342 * Both bounded and unbounded strings are inserted using this method.
aoqi@0 343 *
aoqi@0 344 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 345 * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
aoqi@0 346 */
aoqi@0 347 void insert_wstring(in wstring value)
aoqi@0 348 raises(TypeMismatch, InvalidValue);
aoqi@0 349
aoqi@0 350 /**
aoqi@0 351 * Inserts an Any value into the Any represented by this DynAny.
aoqi@0 352 *
aoqi@0 353 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 354 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 355 */
aoqi@0 356 void insert_any(in any value)
aoqi@0 357 raises(TypeMismatch, InvalidValue);
aoqi@0 358
aoqi@0 359 /**
aoqi@0 360 * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
aoqi@0 361 *
aoqi@0 362 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 363 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 364 */
aoqi@0 365 void insert_dyn_any(in DynAny value)
aoqi@0 366 raises(TypeMismatch, InvalidValue);
aoqi@0 367
aoqi@0 368 /**
aoqi@0 369 * Inserts a reference to a Serializable object into this DynAny.
aoqi@0 370 * The IDL ValueBase type is mapped to the Java Serializable type.
aoqi@0 371 *
aoqi@0 372 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 373 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 374 */
aoqi@0 375 void insert_val(in ValueBase value)
aoqi@0 376 raises(TypeMismatch, InvalidValue);
aoqi@0 377
aoqi@0 378 /**
aoqi@0 379 * Extracts the boolean value from this DynAny.
aoqi@0 380 *
aoqi@0 381 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 382 * that is not equivalent to the requested type.
aoqi@0 383 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 384 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 385 */
aoqi@0 386 boolean get_boolean()
aoqi@0 387 raises(TypeMismatch, InvalidValue);
aoqi@0 388
aoqi@0 389 /**
aoqi@0 390 * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
aoqi@0 391 *
aoqi@0 392 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 393 * that is not equivalent to the requested type.
aoqi@0 394 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 395 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 396 */
aoqi@0 397 octet get_octet()
aoqi@0 398 raises(TypeMismatch, InvalidValue);
aoqi@0 399
aoqi@0 400 /**
aoqi@0 401 * Extracts the char value from this DynAny.
aoqi@0 402 *
aoqi@0 403 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 404 * that is not equivalent to the requested type.
aoqi@0 405 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 406 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 407 */
aoqi@0 408 char get_char()
aoqi@0 409 raises(TypeMismatch, InvalidValue);
aoqi@0 410
aoqi@0 411 /**
aoqi@0 412 * Extracts the short value from this DynAny.
aoqi@0 413 *
aoqi@0 414 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 415 * that is not equivalent to the requested type.
aoqi@0 416 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 417 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 418 */
aoqi@0 419 short get_short()
aoqi@0 420 raises(TypeMismatch, InvalidValue);
aoqi@0 421
aoqi@0 422 /**
aoqi@0 423 * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
aoqi@0 424 *
aoqi@0 425 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 426 * that is not equivalent to the requested type.
aoqi@0 427 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 428 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 429 */
aoqi@0 430 unsigned short get_ushort()
aoqi@0 431 raises(TypeMismatch, InvalidValue);
aoqi@0 432
aoqi@0 433 /**
aoqi@0 434 * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
aoqi@0 435 *
aoqi@0 436 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 437 * that is not equivalent to the requested type.
aoqi@0 438 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 439 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 440 */
aoqi@0 441 long get_long()
aoqi@0 442 raises(TypeMismatch, InvalidValue);
aoqi@0 443
aoqi@0 444 /**
aoqi@0 445 * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
aoqi@0 446 *
aoqi@0 447 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 448 * that is not equivalent to the requested type.
aoqi@0 449 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 450 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 451 */
aoqi@0 452 unsigned long get_ulong()
aoqi@0 453 raises(TypeMismatch, InvalidValue);
aoqi@0 454
aoqi@0 455 /**
aoqi@0 456 * Extracts the float value from this DynAny.
aoqi@0 457 *
aoqi@0 458 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 459 * that is not equivalent to the requested type.
aoqi@0 460 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 461 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 462 */
aoqi@0 463 float get_float()
aoqi@0 464 raises(TypeMismatch, InvalidValue);
aoqi@0 465
aoqi@0 466 /**
aoqi@0 467 * Extracts the double value from this DynAny.
aoqi@0 468 *
aoqi@0 469 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 470 * that is not equivalent to the requested type.
aoqi@0 471 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 472 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 473 */
aoqi@0 474 double get_double()
aoqi@0 475 raises(TypeMismatch, InvalidValue);
aoqi@0 476
aoqi@0 477 /**
aoqi@0 478 * Extracts the string value from this DynAny.
aoqi@0 479 * Both bounded and unbounded strings are extracted using this method.
aoqi@0 480 *
aoqi@0 481 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 482 * that is not equivalent to the requested type.
aoqi@0 483 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 484 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 485 */
aoqi@0 486 string get_string()
aoqi@0 487 raises(TypeMismatch, InvalidValue);
aoqi@0 488
aoqi@0 489 /**
aoqi@0 490 * Extracts the reference to a CORBA Object from this DynAny.
aoqi@0 491 *
aoqi@0 492 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 493 * that is not equivalent to the requested type.
aoqi@0 494 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 495 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 496 */
aoqi@0 497 Object get_reference()
aoqi@0 498 raises(TypeMismatch, InvalidValue);
aoqi@0 499
aoqi@0 500 /**
aoqi@0 501 * Extracts the TypeCode object from this DynAny.
aoqi@0 502 *
aoqi@0 503 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 504 * that is not equivalent to the requested type.
aoqi@0 505 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 506 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 507 */
aoqi@0 508 CORBA::TypeCode get_typecode()
aoqi@0 509 raises(TypeMismatch, InvalidValue);
aoqi@0 510
aoqi@0 511 /**
aoqi@0 512 * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
aoqi@0 513 *
aoqi@0 514 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 515 * that is not equivalent to the requested type.
aoqi@0 516 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 517 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 518 */
aoqi@0 519 long long get_longlong()
aoqi@0 520 raises(TypeMismatch, InvalidValue);
aoqi@0 521
aoqi@0 522 /**
aoqi@0 523 * Extracts the long value from this DynAny.
aoqi@0 524 * The IDL unsigned long long data type is mapped to the Java long data type.
aoqi@0 525 *
aoqi@0 526 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 527 * that is not equivalent to the requested type.
aoqi@0 528 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 529 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 530 */
aoqi@0 531 unsigned long long get_ulonglong()
aoqi@0 532 raises(TypeMismatch, InvalidValue);
aoqi@0 533 // long double get_longdouble()
aoqi@0 534 // raises(TypeMismatch, InvalidValue);
aoqi@0 535
aoqi@0 536 /**
aoqi@0 537 * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
aoqi@0 538 *
aoqi@0 539 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 540 * that is not equivalent to the requested type.
aoqi@0 541 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 542 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 543 */
aoqi@0 544 wchar get_wchar()
aoqi@0 545 raises(TypeMismatch, InvalidValue);
aoqi@0 546
aoqi@0 547 /**
aoqi@0 548 * Extracts the string value from this DynAny.
aoqi@0 549 * Both bounded and unbounded strings are extracted using this method.
aoqi@0 550 *
aoqi@0 551 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 552 * that is not equivalent to the requested type.
aoqi@0 553 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 554 */
aoqi@0 555 wstring get_wstring()
aoqi@0 556 raises(TypeMismatch, InvalidValue);
aoqi@0 557
aoqi@0 558 /**
aoqi@0 559 * Extracts an Any value contained in the Any represented by this DynAny.
aoqi@0 560 *
aoqi@0 561 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 562 * that is not equivalent to the requested type.
aoqi@0 563 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 564 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 565 */
aoqi@0 566 any get_any()
aoqi@0 567 raises(TypeMismatch, InvalidValue);
aoqi@0 568
aoqi@0 569 /**
aoqi@0 570 * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
aoqi@0 571 * into a new DynAny.
aoqi@0 572 *
aoqi@0 573 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 574 * that is not equivalent to the requested type.
aoqi@0 575 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 576 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 577 */
aoqi@0 578 DynAny get_dyn_any()
aoqi@0 579 raises(TypeMismatch, InvalidValue);
aoqi@0 580
aoqi@0 581 /**
aoqi@0 582 * Extracts a Serializable object from this DynAny.
aoqi@0 583 * The IDL ValueBase type is mapped to the Java Serializable type.
aoqi@0 584 *
aoqi@0 585 * @exception TypeMismatch if the accessed component in the DynAny is of a type
aoqi@0 586 * that is not equivalent to the requested type.
aoqi@0 587 * @exception TypeMismatch if called on a DynAny whose current component itself has components
aoqi@0 588 * @exception InvalidValue if this DynAny has components but has a current position of -1
aoqi@0 589 */
aoqi@0 590 ValueBase get_val()
aoqi@0 591 raises(TypeMismatch, InvalidValue);
aoqi@0 592
aoqi@0 593 /**
aoqi@0 594 * Sets the current position to index. The current position is indexed 0 to n-1, that is,
aoqi@0 595 * index zero corresponds to the first component. The operation returns true if the resulting
aoqi@0 596 * current position indicates a component of the DynAny and false if index indicates
aoqi@0 597 * a position that does not correspond to a component.
aoqi@0 598 * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
aoqi@0 599 * no component and returns false. Passing a non-negative index value for a DynAny that does not
aoqi@0 600 * have a component at the corresponding position sets the current position to -1 and returns false.
aoqi@0 601 */
aoqi@0 602 boolean seek(in long index);
aoqi@0 603
aoqi@0 604 /**
aoqi@0 605 * Is equivalent to seek(0).
aoqi@0 606 */
aoqi@0 607 void rewind();
aoqi@0 608
aoqi@0 609 /**
aoqi@0 610 * Advances the current position to the next component.
aoqi@0 611 * The operation returns true while the resulting current position indicates a component, false otherwise.
aoqi@0 612 * A false return value leaves the current position at -1.
aoqi@0 613 * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
aoqi@0 614 */
aoqi@0 615 boolean next();
aoqi@0 616
aoqi@0 617 /**
aoqi@0 618 * Returns the number of components of a DynAny.
aoqi@0 619 * For a DynAny without components, it returns zero.
aoqi@0 620 * The operation only counts the components at the top level.
aoqi@0 621 * For example, if component_count is invoked on a DynStruct with a single member,
aoqi@0 622 * the return value is 1, irrespective of the type of the member.
aoqi@0 623 * <UL>
aoqi@0 624 * <LI>For sequences, the operation returns the current number of elements.
aoqi@0 625 * <LI>For structures, exceptions, and value types, the operation returns the number of members.
aoqi@0 626 * <LI>For arrays, the operation returns the number of elements.
aoqi@0 627 * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
aoqi@0 628 * otherwise, it returns 1.
aoqi@0 629 * <LI>For DynFixed and DynEnum, the operation returns zero.
aoqi@0 630 * </UL>
aoqi@0 631 */
aoqi@0 632 unsigned long component_count();
aoqi@0 633
aoqi@0 634 /**
aoqi@0 635 * Returns the DynAny for the component at the current position.
aoqi@0 636 * It does not advance the current position, so repeated calls to current_component
aoqi@0 637 * without an intervening call to rewind, next, or seek return the same component.
aoqi@0 638 * The returned DynAny object reference can be used to get/set the value of the current component.
aoqi@0 639 * If the current component represents a complex type, the returned reference can be narrowed
aoqi@0 640 * based on the TypeCode to get the interface corresponding to the to the complex type.
aoqi@0 641 * Calling current_component on a DynAny that cannot have components,
aoqi@0 642 * such as a DynEnum or an empty exception, raises TypeMismatch.
aoqi@0 643 * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
aoqi@0 644 * The iteration operations, together with current_component, can be used
aoqi@0 645 * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
aoqi@0 646 * current_component and next can be used to initialize all the components of the value.
aoqi@0 647 * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
aoqi@0 648 *
aoqi@0 649 * @exception TypeMismatch If called on a DynAny that cannot have components,
aoqi@0 650 * such as a DynEnum or an empty exception
aoqi@0 651 */
aoqi@0 652 DynAny current_component()
aoqi@0 653 raises(TypeMismatch);
aoqi@0 654 };
aoqi@0 655
aoqi@0 656 /**
aoqi@0 657 * DynFixed objects support the manipulation of IDL fixed values.
aoqi@0 658 * Because IDL does not have a generic type that can represent fixed types with arbitrary
aoqi@0 659 * number of digits and arbitrary scale, the operations use the IDL string type.
aoqi@0 660 */
aoqi@0 661 interface DynFixed : DynAny {
aoqi@0 662 #pragma sun_localservant DynFixed ""
aoqi@0 663
aoqi@0 664 /**
aoqi@0 665 * Returns the value of a DynFixed.
aoqi@0 666 */
aoqi@0 667 string get_value();
aoqi@0 668
aoqi@0 669 /**
aoqi@0 670 * Sets the value of the DynFixed.
aoqi@0 671 * The val string must contain a fixed string constant in the same format as used for IDL fixed-point literals.
aoqi@0 672 * However, the trailing d or D is optional. The return value is true if val can be represented as the DynFixed
aoqi@0 673 * without loss of precision. If val has more fractional digits than can be represented in the DynFixed,
aoqi@0 674 * fractional digits are truncated and the return value is false.
aoqi@0 675 *
aoqi@0 676 * @exception TypeMismatch If val does not contain a valid fixed-point literal or contains extraneous
aoqi@0 677 * characters other than leading or trailing white space
aoqi@0 678 * @exception InvalidValue If val contains a value whose scale exceeds that of the DynFixed
aoqi@0 679 * or is not initialized
aoqi@0 680 */
aoqi@0 681 boolean set_value(in string val)
aoqi@0 682 raises(TypeMismatch, InvalidValue);
aoqi@0 683 };
aoqi@0 684
aoqi@0 685 /**
aoqi@0 686 * DynEnum objects support the manipulation of IDL enumerated values.
aoqi@0 687 * The current position of a DynEnum is always -1.
aoqi@0 688 */
aoqi@0 689 interface DynEnum : DynAny {
aoqi@0 690 #pragma sun_localservant DynEnum ""
aoqi@0 691
aoqi@0 692 /**
aoqi@0 693 * Returns the value of the DynEnum as an IDL identifier.
aoqi@0 694 */
aoqi@0 695 string get_as_string();
aoqi@0 696
aoqi@0 697 /**
aoqi@0 698 * Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
aoqi@0 699 *
aoqi@0 700 * @exception InvalidValue If value contains a string that is not a valid IDL identifier
aoqi@0 701 * for the corresponding enumerated type
aoqi@0 702 */
aoqi@0 703 void set_as_string(in string value)
aoqi@0 704 raises(InvalidValue);
aoqi@0 705
aoqi@0 706 /**
aoqi@0 707 * Returns the value of the DynEnum as the enumerated value's ordinal value.
aoqi@0 708 * Enumerators have ordinal values 0 to n-1, as they appear from left to right
aoqi@0 709 * in the corresponding IDL definition.
aoqi@0 710 */
aoqi@0 711 unsigned long get_as_ulong();
aoqi@0 712
aoqi@0 713 /**
aoqi@0 714 * Sets the value of the DynEnum as the enumerated value's ordinal value.
aoqi@0 715 *
aoqi@0 716 * @exception InvalidValue If value contains a value that is outside the range of ordinal values
aoqi@0 717 * for the corresponding enumerated type
aoqi@0 718 */
aoqi@0 719 void set_as_ulong(in unsigned long value)
aoqi@0 720 raises(InvalidValue);
aoqi@0 721 };
aoqi@0 722
aoqi@0 723 typedef string FieldName;
aoqi@0 724
aoqi@0 725 /**
aoqi@0 726 * NameValuePairs associate a name with an Any object.
aoqi@0 727 */
aoqi@0 728 struct NameValuePair {
aoqi@0 729 /**
aoqi@0 730 * The name associated with the Any.
aoqi@0 731 */
aoqi@0 732 FieldName id;
aoqi@0 733 /**
aoqi@0 734 * The Any value associated with the name.
aoqi@0 735 */
aoqi@0 736 any value;
aoqi@0 737 };
aoqi@0 738 typedef sequence<NameValuePair> NameValuePairSeq;
aoqi@0 739
aoqi@0 740 /**
aoqi@0 741 * NameDynAnyPairs associate a name with an DynAny object.
aoqi@0 742 */
aoqi@0 743 struct NameDynAnyPair {
aoqi@0 744 /**
aoqi@0 745 * The name associated with the DynAny.
aoqi@0 746 */
aoqi@0 747 FieldName id;
aoqi@0 748 /**
aoqi@0 749 * The DynAny value associated with the name.
aoqi@0 750 */
aoqi@0 751 DynAny value;
aoqi@0 752 };
aoqi@0 753 typedef sequence<NameDynAnyPair> NameDynAnyPairSeq;
aoqi@0 754
aoqi@0 755 /**
aoqi@0 756 * DynStruct objects support the manipulation of IDL struct and exception values.
aoqi@0 757 * Members of the exceptions are handled in the same way as members of a struct.
aoqi@0 758 */
aoqi@0 759 interface DynStruct : DynAny {
aoqi@0 760 #pragma sun_localservant DynStruct ""
aoqi@0 761
aoqi@0 762 /**
aoqi@0 763 * Returns the name of the member at the current position.
aoqi@0 764 * This operation may return an empty string since the TypeCode of the value being
aoqi@0 765 * manipulated may not contain the names of members.
aoqi@0 766 *
aoqi@0 767 * @exception TypeMismatch if the DynStruct represents an empty exception.
aoqi@0 768 * @exception InvalidValue if the current position does not indicate a member
aoqi@0 769 */
aoqi@0 770 FieldName current_member_name()
aoqi@0 771 raises(TypeMismatch, InvalidValue);
aoqi@0 772
aoqi@0 773 /**
aoqi@0 774 * Returns the TCKind associated with the member at the current position.
aoqi@0 775 *
aoqi@0 776 * @exception TypeMismatch if the DynStruct represents an empty exception.
aoqi@0 777 * @exception InvalidValue if the current position does not indicate a member
aoqi@0 778 */
aoqi@0 779 CORBA::TCKind current_member_kind()
aoqi@0 780 raises(TypeMismatch, InvalidValue);
aoqi@0 781
aoqi@0 782 /**
aoqi@0 783 * Returns a sequence of NameValuePairs describing the name and the value of each member
aoqi@0 784 * in the struct associated with a DynStruct object.
aoqi@0 785 * The sequence contains members in the same order as the declaration order of members
aoqi@0 786 * as indicated by the DynStruct's TypeCode. The current position is not affected.
aoqi@0 787 * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
aoqi@0 788 * does not contain member names.
aoqi@0 789 */
aoqi@0 790 NameValuePairSeq get_members();
aoqi@0 791
aoqi@0 792 /**
aoqi@0 793 * Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
aoqi@0 794 * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
aoqi@0 795 * if an empty sequence is passed, the current position is set to -1.
aoqi@0 796 * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
aoqi@0 797 * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
aoqi@0 798 * The operation makes no attempt to assign member values based on member names.
aoqi@0 799 *
aoqi@0 800 * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
aoqi@0 801 * corresponding member name in the DynStruct's TypeCode and they are not empty strings
aoqi@0 802 * @exception InvalidValue if the passed sequence has a number of elements that disagrees
aoqi@0 803 * with the number of members as indicated by the DynStruct's TypeCode
aoqi@0 804 */
aoqi@0 805 void set_members(in NameValuePairSeq value)
aoqi@0 806 raises(TypeMismatch, InvalidValue);
aoqi@0 807
aoqi@0 808 /**
aoqi@0 809 * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
aoqi@0 810 * in the struct associated with a DynStruct object.
aoqi@0 811 * The sequence contains members in the same order as the declaration order of members
aoqi@0 812 * as indicated by the DynStruct's TypeCode. The current position is not affected.
aoqi@0 813 * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
aoqi@0 814 * does not contain member names.
aoqi@0 815 */
aoqi@0 816 NameDynAnyPairSeq get_members_as_dyn_any();
aoqi@0 817
aoqi@0 818 /**
aoqi@0 819 * Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
aoqi@0 820 * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
aoqi@0 821 * if an empty sequence is passed, the current position is set to -1.
aoqi@0 822 * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
aoqi@0 823 * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
aoqi@0 824 * The operation makes no attempt to assign member values based on member names.
aoqi@0 825 *
aoqi@0 826 * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
aoqi@0 827 * corresponding member name in the DynStruct's TypeCode and they are not empty strings
aoqi@0 828 * @exception InvalidValue if the passed sequence has a number of elements that disagrees
aoqi@0 829 * with the number of members as indicated by the DynStruct's TypeCode
aoqi@0 830 */
aoqi@0 831 void set_members_as_dyn_any(in NameDynAnyPairSeq value)
aoqi@0 832 raises(TypeMismatch, InvalidValue);
aoqi@0 833 };
aoqi@0 834
aoqi@0 835 /**
aoqi@0 836 * DynUnion objects support the manipulation of IDL unions.
aoqi@0 837 * A union can have only two valid current positions:
aoqi@0 838 * <UL>
aoqi@0 839 * <LI>zero, which denotes the discriminator
aoqi@0 840 * <LI>one, which denotes the active member
aoqi@0 841 * </UL>
aoqi@0 842 * The component_count value for a union depends on the current discriminator:
aoqi@0 843 * it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.
aoqi@0 844 */
aoqi@0 845 interface DynUnion : DynAny {
aoqi@0 846 #pragma sun_localservant DynUnion ""
aoqi@0 847
aoqi@0 848 /**
aoqi@0 849 * Returns the current discriminator value.
aoqi@0 850 */
aoqi@0 851 DynAny get_discriminator();
aoqi@0 852
aoqi@0 853 /**
aoqi@0 854 * Sets the discriminator of the DynUnion to the specified value.
aoqi@0 855 * Setting the discriminator to a value that is consistent with the currently active union member
aoqi@0 856 * does not affect the currently active member. Setting the discriminator to a value that is inconsistent
aoqi@0 857 * with the currently active member deactivates the member and activates the member that is consistent
aoqi@0 858 * with the new discriminator value (if there is a member for that value) by initializing the member
aoqi@0 859 * to its default value.
aoqi@0 860 * Setting the discriminator of a union sets the current position to 0 if the discriminator value
aoqi@0 861 * indicates a non-existent union member (has_no_active_member returns true in this case).
aoqi@0 862 * Otherwise, if the discriminator value indicates a named union member, the current position is set to 1
aoqi@0 863 * (has_no_active_member returns false and component_count returns 2 in this case).
aoqi@0 864 *
aoqi@0 865 * @exception TypeMismatch if the TypeCode of the parameter is not equivalent to the TypeCode
aoqi@0 866 * of the union's discriminator
aoqi@0 867 */
aoqi@0 868 void set_discriminator(in DynAny d)
aoqi@0 869 raises(TypeMismatch);
aoqi@0 870
aoqi@0 871 /**
aoqi@0 872 * Sets the discriminator to a value that is consistent with the value of the default case of a union.
aoqi@0 873 * It sets the current position to zero and causes component_count to return 2.
aoqi@0 874 *
aoqi@0 875 * @exception TypeMismatch if the union does not have an explicit default case
aoqi@0 876 */
aoqi@0 877 void set_to_default_member()
aoqi@0 878 raises(TypeMismatch);
aoqi@0 879
aoqi@0 880 /**
aoqi@0 881 * Sets the discriminator to a value that does not correspond to any of the unions case labels.
aoqi@0 882 * It sets the current position to zero and causes component_count to return 1.
aoqi@0 883 *
aoqi@0 884 * @exception TypeMismatch if the union has an explicit default case or if it uses the entire range
aoqi@0 885 * of discriminator values for explicit case labels
aoqi@0 886 */
aoqi@0 887 void set_to_no_active_member()
aoqi@0 888 raises(TypeMismatch);
aoqi@0 889
aoqi@0 890 /**
aoqi@0 891 * Returns true if the union has no active member, that is, the unions value consists solely
aoqi@0 892 * of its discriminator because the discriminator has a value that is not listed as an explicit case label.
aoqi@0 893 * Calling this operation on a union that has a default case returns false.
aoqi@0 894 * Calling this operation on a union that uses the entire range of discriminator values
aoqi@0 895 * for explicit case labels returns false.
aoqi@0 896 */
aoqi@0 897 boolean has_no_active_member();
aoqi@0 898
aoqi@0 899 /**
aoqi@0 900 * Returns the TCKind value of the discriminators TypeCode.
aoqi@0 901 */
aoqi@0 902 CORBA::TCKind discriminator_kind();
aoqi@0 903
aoqi@0 904 /**
aoqi@0 905 * Returns the TCKind value of the currently active members TypeCode.
aoqi@0 906 *
aoqi@0 907 * @exception InvalidValue if the union does not have a currently active member
aoqi@0 908 */
aoqi@0 909 CORBA::TCKind member_kind()
aoqi@0 910 raises(InvalidValue);
aoqi@0 911
aoqi@0 912 /**
aoqi@0 913 * Returns the currently active member. Note that the returned reference remains valid only
aoqi@0 914 * for as long as the currently active member does not change. Using the returned reference
aoqi@0 915 * beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
aoqi@0 916 *
aoqi@0 917 * @exception InvalidValue if the union has no active member
aoqi@0 918 */
aoqi@0 919 DynAny member()
aoqi@0 920 raises(InvalidValue);
aoqi@0 921
aoqi@0 922 /**
aoqi@0 923 * Returns the name of the currently active member. If the unions TypeCode does not contain
aoqi@0 924 * a member name for the currently active member, the operation returns an empty string.
aoqi@0 925 *
aoqi@0 926 * @exception InvalidValue if the union has no active member
aoqi@0 927 */
aoqi@0 928 FieldName member_name()
aoqi@0 929 raises(InvalidValue);
aoqi@0 930 };
aoqi@0 931
aoqi@0 932 typedef sequence<any> AnySeq;
aoqi@0 933 typedef sequence<DynAny> DynAnySeq;
aoqi@0 934
aoqi@0 935 /**
aoqi@0 936 * DynSequence objects support the manipulation of IDL sequences.
aoqi@0 937 */
aoqi@0 938 interface DynSequence : DynAny {
aoqi@0 939 #pragma sun_localservant DynSequence ""
aoqi@0 940
aoqi@0 941 /**
aoqi@0 942 * Returns the current length of the sequence.
aoqi@0 943 */
aoqi@0 944 unsigned long get_length();
aoqi@0 945
aoqi@0 946 /**
aoqi@0 947 * Sets the length of the sequence.
aoqi@0 948 * Increasing the length of a sequence adds new elements at the tail without affecting the values
aoqi@0 949 * of already existing elements. Newly added elements are default-initialized.
aoqi@0 950 * Increasing the length of a sequence sets the current position to the first newly-added element
aoqi@0 951 * if the previous current position was -1. Otherwise, if the previous current position was not -1,
aoqi@0 952 * the current position is not affected.
aoqi@0 953 * Decreasing the length of a sequence removes elements from the tail without affecting the value
aoqi@0 954 * of those elements that remain. The new current position after decreasing the length of a sequence
aoqi@0 955 * is determined as follows:
aoqi@0 956 * <UL>
aoqi@0 957 * <LI>If the length of the sequence is set to zero, the current position is set to -1.
aoqi@0 958 * <LI>If the current position is -1 before decreasing the length, it remains at -1.
aoqi@0 959 * <LI>If the current position indicates a valid element and that element is not removed when the length
aoqi@0 960 * is decreased, the current position remains unaffected.
aoqi@0 961 * <LI>If the current position indicates a valid element and that element is removed,
aoqi@0 962 * the current position is set to -1.
aoqi@0 963 * </UL>
aoqi@0 964 *
aoqi@0 965 * @exception InvalidValue if this is a bounded sequence and len is larger than the bound
aoqi@0 966 */
aoqi@0 967 void set_length(in unsigned long len)
aoqi@0 968 raises(InvalidValue);
aoqi@0 969
aoqi@0 970 /**
aoqi@0 971 * Returns the elements of the sequence.
aoqi@0 972 */
aoqi@0 973 AnySeq get_elements();
aoqi@0 974
aoqi@0 975 /**
aoqi@0 976 * Sets the elements of a sequence.
aoqi@0 977 * The length of the DynSequence is set to the length of value. The current position is set to zero
aoqi@0 978 * if value has non-zero length and to -1 if value is a zero-length sequence.
aoqi@0 979 *
aoqi@0 980 * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
aoqi@0 981 * to the element TypeCode of the DynSequence
aoqi@0 982 * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
aoqi@0 983 */
aoqi@0 984 void set_elements(in AnySeq value)
aoqi@0 985 raises(TypeMismatch, InvalidValue);
aoqi@0 986
aoqi@0 987 /**
aoqi@0 988 * Returns the DynAnys representing the elements of the sequence.
aoqi@0 989 */
aoqi@0 990 DynAnySeq get_elements_as_dyn_any();
aoqi@0 991
aoqi@0 992 /**
aoqi@0 993 * Sets the elements of a sequence using DynAnys.
aoqi@0 994 * The length of the DynSequence is set to the length of value. The current position is set to zero
aoqi@0 995 * if value has non-zero length and to -1 if value is a zero-length sequence.
aoqi@0 996 *
aoqi@0 997 * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
aoqi@0 998 * to the element TypeCode of the DynSequence
aoqi@0 999 * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
aoqi@0 1000 */
aoqi@0 1001 void set_elements_as_dyn_any(in DynAnySeq value)
aoqi@0 1002 raises(TypeMismatch, InvalidValue);
aoqi@0 1003 };
aoqi@0 1004
aoqi@0 1005 /**
aoqi@0 1006 * DynArray objects support the manipulation of IDL arrays.
aoqi@0 1007 * Note that the dimension of the array is contained in the TypeCode which is accessible
aoqi@0 1008 * through the type attribute. It can also be obtained by calling the component_count operation.
aoqi@0 1009 */
aoqi@0 1010 interface DynArray : DynAny {
aoqi@0 1011 #pragma sun_localservant DynArray ""
aoqi@0 1012
aoqi@0 1013 /**
aoqi@0 1014 * Returns the elements of the DynArray.
aoqi@0 1015 */
aoqi@0 1016 AnySeq get_elements();
aoqi@0 1017
aoqi@0 1018 /**
aoqi@0 1019 * Sets the DynArray to contain the passed elements.
aoqi@0 1020 *
aoqi@0 1021 * @exception TypeMismatch if one or more elements have a type that is inconsistent with the DynArrays TypeCode
aoqi@0 1022 * @exception InvalidValue if the sequence does not contain the same number of elements as the array dimension
aoqi@0 1023 */
aoqi@0 1024 void set_elements(in AnySeq value)
aoqi@0 1025 raises(TypeMismatch, InvalidValue);
aoqi@0 1026
aoqi@0 1027 /**
aoqi@0 1028 * Returns the elements of the DynArray as DynAnys.
aoqi@0 1029 */
aoqi@0 1030 DynAnySeq get_elements_as_dyn_any();
aoqi@0 1031
aoqi@0 1032 /**
aoqi@0 1033 * Sets the DynArray to contain the passed elements.
aoqi@0 1034 *
aoqi@0 1035 * @exception TypeMismatch if one or more elements have a type that is inconsistent with the DynArrays TypeCode
aoqi@0 1036 * @exception InvalidValue if the sequence does not contain the same number of elements as the array dimension
aoqi@0 1037 */
aoqi@0 1038 void set_elements_as_dyn_any(in DynAnySeq value)
aoqi@0 1039 raises(TypeMismatch, InvalidValue);
aoqi@0 1040 };
aoqi@0 1041
aoqi@0 1042 /**
aoqi@0 1043 * DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
aoqi@0 1044 */
aoqi@0 1045 interface DynValueCommon : DynAny {
aoqi@0 1046 /**
aoqi@0 1047 * Returns true if the DynValueCommon represents a null value type.
aoqi@0 1048 */
aoqi@0 1049 boolean is_null();
aoqi@0 1050
aoqi@0 1051 /**
aoqi@0 1052 * Changes the representation of a DynValueCommon to a null value type.
aoqi@0 1053 */
aoqi@0 1054 void set_to_null();
aoqi@0 1055
aoqi@0 1056 /**
aoqi@0 1057 * Replaces a null value type with a newly constructed value. Its components are initialized
aoqi@0 1058 * to default values as in DynAnyFactory.create_dyn_any_from_type_code.
aoqi@0 1059 * If the DynValueCommon represents a non-null value type, then this operation has no effect.
aoqi@0 1060 */
aoqi@0 1061 void set_to_value();
aoqi@0 1062 };
aoqi@0 1063
aoqi@0 1064 /**
aoqi@0 1065 * DynValue objects support the manipulation of IDL non-boxed value types.
aoqi@0 1066 * The DynValue interface can represent both null and non-null value types.
aoqi@0 1067 * For a DynValue representing a non-null value type, the DynValue's components comprise
aoqi@0 1068 * the public and private members of the value type, including those inherited from concrete base value types,
aoqi@0 1069 * in the order of definition. A DynValue representing a null value type has no components
aoqi@0 1070 * and a current position of -1.
aoqi@0 1071 * <P>Warning: Indiscriminantly changing the contents of private value type members can cause the value type
aoqi@0 1072 * implementation to break by violating internal constraints. Access to private members is provided to support
aoqi@0 1073 * such activities as ORB bridging and debugging and should not be used to arbitrarily violate
aoqi@0 1074 * the encapsulation of the value type.
aoqi@0 1075 */
aoqi@0 1076 interface DynValue : DynValueCommon {
aoqi@0 1077 #pragma sun_localservant DynValue ""
aoqi@0 1078
aoqi@0 1079 /**
aoqi@0 1080 * Returns the name of the member at the current position.
aoqi@0 1081 * This operation may return an empty string since the TypeCode of the value being
aoqi@0 1082 * manipulated may not contain the names of members.
aoqi@0 1083 *
aoqi@0 1084 * @exception TypeMismatch if the DynValue represents a null value type.
aoqi@0 1085 * @exception InvalidValue if the current position does not indicate a member
aoqi@0 1086 */
aoqi@0 1087 FieldName current_member_name()
aoqi@0 1088 raises(TypeMismatch, InvalidValue);
aoqi@0 1089
aoqi@0 1090 /**
aoqi@0 1091 * Returns the TCKind associated with the member at the current position.
aoqi@0 1092 *
aoqi@0 1093 * @exception TypeMismatch if the DynValue represents a null value type.
aoqi@0 1094 * @exception InvalidValue if the current position does not indicate a member
aoqi@0 1095 */
aoqi@0 1096 CORBA::TCKind current_member_kind()
aoqi@0 1097 raises(TypeMismatch, InvalidValue);
aoqi@0 1098
aoqi@0 1099 /**
aoqi@0 1100 * Returns a sequence of NameValuePairs describing the name and the value of each member
aoqi@0 1101 * in the value type.
aoqi@0 1102 * The sequence contains members in the same order as the declaration order of members
aoqi@0 1103 * as indicated by the DynValue's TypeCode. The current position is not affected.
aoqi@0 1104 * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
aoqi@0 1105 * does not contain member names.
aoqi@0 1106 *
aoqi@0 1107 * @exception InvalidValue if this object represents a null value type
aoqi@0 1108 */
aoqi@0 1109 NameValuePairSeq get_members()
aoqi@0 1110 raises(InvalidValue);
aoqi@0 1111
aoqi@0 1112 /**
aoqi@0 1113 * Initializes the value type's members from a sequence of NameValuePairs.
aoqi@0 1114 * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
aoqi@0 1115 * if an empty sequence is passed, the current position is set to -1.
aoqi@0 1116 * A null value type can be initialized to a non-null value type using this method.
aoqi@0 1117 * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
aoqi@0 1118 * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
aoqi@0 1119 * The operation makes no attempt to assign member values based on member names.
aoqi@0 1120 *
aoqi@0 1121 * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
aoqi@0 1122 * corresponding member name in the DynValue's TypeCode and they are not empty strings
aoqi@0 1123 * @exception InvalidValue if the passed sequence has a number of elements that disagrees
aoqi@0 1124 * with the number of members as indicated by the DynValue's TypeCode
aoqi@0 1125 */
aoqi@0 1126 void set_members(in NameValuePairSeq value)
aoqi@0 1127 raises(TypeMismatch, InvalidValue);
aoqi@0 1128
aoqi@0 1129 /**
aoqi@0 1130 * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
aoqi@0 1131 * in the value type.
aoqi@0 1132 * The sequence contains members in the same order as the declaration order of members
aoqi@0 1133 * as indicated by the DynValue's TypeCode. The current position is not affected.
aoqi@0 1134 * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
aoqi@0 1135 * does not contain member names.
aoqi@0 1136 *
aoqi@0 1137 * @exception InvalidValue if this object represents a null value type
aoqi@0 1138 */
aoqi@0 1139 NameDynAnyPairSeq get_members_as_dyn_any()
aoqi@0 1140 raises(InvalidValue);
aoqi@0 1141
aoqi@0 1142 /**
aoqi@0 1143 * Initializes the value type's members from a sequence of NameDynAnyPairs.
aoqi@0 1144 * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
aoqi@0 1145 * if an empty sequence is passed, the current position is set to -1.
aoqi@0 1146 * A null value type can be initialized to a non-null value type using this method.
aoqi@0 1147 * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
aoqi@0 1148 * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
aoqi@0 1149 * The operation makes no attempt to assign member values based on member names.
aoqi@0 1150 *
aoqi@0 1151 * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
aoqi@0 1152 * corresponding member name in the DynValue's TypeCode and they are not empty strings
aoqi@0 1153 * @exception InvalidValue if the passed sequence has a number of elements that disagrees
aoqi@0 1154 * with the number of members as indicated by the DynValue's TypeCode
aoqi@0 1155 */
aoqi@0 1156 void set_members_as_dyn_any(in NameDynAnyPairSeq value)
aoqi@0 1157 raises(TypeMismatch, InvalidValue);
aoqi@0 1158 };
aoqi@0 1159
aoqi@0 1160 /**
aoqi@0 1161 * DynValueBox objects support the manipulation of IDL boxed value types.
aoqi@0 1162 * The DynValueBox interface can represent both null and non-null value types.
aoqi@0 1163 * For a DynValueBox representing a non-null value type, the DynValueBox has a single component
aoqi@0 1164 * of the boxed type. A DynValueBox representing a null value type has no components
aoqi@0 1165 * and a current position of -1.
aoqi@0 1166 */
aoqi@0 1167 interface DynValueBox : DynValueCommon {
aoqi@0 1168
aoqi@0 1169 /**
aoqi@0 1170 * Returns the boxed value as an Any.
aoqi@0 1171 *
aoqi@0 1172 * @exception InvalidValue if this object represents a null value box type
aoqi@0 1173 */
aoqi@0 1174 any get_boxed_value()
aoqi@0 1175 raises(InvalidValue);
aoqi@0 1176
aoqi@0 1177 /**
aoqi@0 1178 * Replaces the boxed value with the specified value.
aoqi@0 1179 * If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
aoqi@0 1180 *
aoqi@0 1181 * @exception TypeMismatch if this object represents a non-null value box type and the type
aoqi@0 1182 * of the parameter is not matching the current boxed value type.
aoqi@0 1183 */
aoqi@0 1184 void set_boxed_value(in any boxed)
aoqi@0 1185 raises(TypeMismatch);
aoqi@0 1186
aoqi@0 1187 /**
aoqi@0 1188 * Returns the boxed value as a DynAny.
aoqi@0 1189 *
aoqi@0 1190 * @exception InvalidValue if this object represents a null value box type
aoqi@0 1191 */
aoqi@0 1192 DynAny get_boxed_value_as_dyn_any()
aoqi@0 1193 raises(InvalidValue);
aoqi@0 1194
aoqi@0 1195 /**
aoqi@0 1196 * Replaces the boxed value with the value contained in the parameter.
aoqi@0 1197 * If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
aoqi@0 1198 *
aoqi@0 1199 * @exception TypeMismatch if this object represents a non-null value box type and the type
aoqi@0 1200 * of the parameter is not matching the current boxed value type.
aoqi@0 1201 */
aoqi@0 1202 void set_boxed_value_as_dyn_any(in DynAny boxed)
aoqi@0 1203 raises(TypeMismatch);
aoqi@0 1204 };
aoqi@0 1205
aoqi@0 1206 /**
aoqi@0 1207 * DynAny objects can be created by invoking operations on the DynAnyFactory object.
aoqi@0 1208 * Generally there are only two ways to create a DynAny object:
aoqi@0 1209 * <UL>
aoqi@0 1210 * <LI>invoking an operation on an existing DynAny object
aoqi@0 1211 * <LI>invoking an operation on a DynAnyFactory object
aoqi@0 1212 * </UL>
aoqi@0 1213 * A constructed DynAny object supports operations that enable the creation of new DynAny
aoqi@0 1214 * objects encapsulating access to the value of some constituent.
aoqi@0 1215 * DynAny objects also support the copy operation for creating new DynAny objects.
aoqi@0 1216 * A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references()
aoqi@0 1217 * with the identifier parameter set to the string constant "DynAnyFactory".
aoqi@0 1218 * <P>Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any()
aoqi@0 1219 * as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed
aoqi@0 1220 * to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.
aoqi@0 1221 * <P>Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(),
aoqi@0 1222 * passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of
aoqi@0 1223 * the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of
aoqi@0 1224 * invoking operations on the resulting object. Finally, the to_any operation can be invoked
aoqi@0 1225 * to create an any value from the constructed DynAny.
aoqi@0 1226 */
aoqi@0 1227 interface DynAnyFactory {
aoqi@0 1228 #pragma sun_localservant DynAnyFactory ""
aoqi@0 1229 exception InconsistentTypeCode {};
aoqi@0 1230
aoqi@0 1231 /**
aoqi@0 1232 * Creates a new DynAny object from an any value.
aoqi@0 1233 * A copy of the TypeCode associated with the any value is assigned to the resulting DynAny object.
aoqi@0 1234 * The value associated with the DynAny object is a copy of the value in the original any.
aoqi@0 1235 * The current position of the created DynAny is set to zero if the passed value has components,
aoqi@0 1236 * to -1 otherwise
aoqi@0 1237 *
aoqi@0 1238 * @exception InconsistentTypeCode if value has a TypeCode with a TCKind of tk_Principal,
aoqi@0 1239 * tk_native, or tk_abstract_interface
aoqi@0 1240 */
aoqi@0 1241 DynAny create_dyn_any(in any value)
aoqi@0 1242 raises(InconsistentTypeCode);
aoqi@0 1243
aoqi@0 1244 /**
aoqi@0 1245 * Creates a DynAny from a TypeCode. Depending on the TypeCode, the created object may be of type DynAny,
aoqi@0 1246 * or one of its derived types, such as DynStruct. The returned reference can be narrowed to the derived type.
aoqi@0 1247 * In all cases, a DynAny constructed from a TypeCode has an initial default value.
aoqi@0 1248 * The default values of basic types are:
aoqi@0 1249 * <UL>
aoqi@0 1250 * <LI>false for boolean
aoqi@0 1251 * <LI>zero for numeric types
aoqi@0 1252 * <LI>zero for types octet, char, and wchar
aoqi@0 1253 * <LI>the empty string for string and wstring
aoqi@0 1254 * <LI>null for object references
aoqi@0 1255 * <LI>a type code with a TCKind value of tk_null for type codes
aoqi@0 1256 * <LI>for any values, an any containing a type code with a TCKind value of tk_null type and no value
aoqi@0 1257 * </UL>
aoqi@0 1258 * For complex types, creation of the corresponding DynAny assigns a default value as follows:
aoqi@0 1259 * <UL>
aoqi@0 1260 * <LI>For DynSequence it sets the current position to -1 and creates an empty sequence.
aoqi@0 1261 * <LI>For DynEnum it sets the current position to -1 and sets the value of the enumerator
aoqi@0 1262 * to the first enumerator value indicated by the TypeCode.
aoqi@0 1263 * <LI>For DynFixed it sets the current position to -1 and sets the value zero.
aoqi@0 1264 * <LI>For DynStruct it sets the current position to -1 for empty exceptions
aoqi@0 1265 * and to zero for all other TypeCodes. The members (if any) are (recursively) initialized
aoqi@0 1266 * to their default values.
aoqi@0 1267 * <LI>For DynArray sets the current position to zero and (recursively) initializes elements
aoqi@0 1268 * to their default value.
aoqi@0 1269 * <LI>For DynUnion sets the current position to zero. The discriminator value is set
aoqi@0 1270 * to a value consistent with the first named member of the union. That member is activated and (recursively)
aoqi@0 1271 * initialized to its default value.
aoqi@0 1272 * <LI>For DynValue and DynValueBox it initializes to a null value.
aoqi@0 1273 * </UL>
aoqi@0 1274 */
aoqi@0 1275 DynAny create_dyn_any_from_type_code(in CORBA::TypeCode type)
aoqi@0 1276 raises(InconsistentTypeCode);
aoqi@0 1277 };
aoqi@0 1278 }; // module DynamicAny
aoqi@0 1279
aoqi@0 1280 #endif // _DYNAMIC_ANY_IDL_

mercurial