0N/A/*
157N/A * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/A
0N/A// IDL
0N/A// File: DynamicAny.idl
0N/A
0N/A#ifndef _DYNAMIC_ANY_IDL_
0N/A#define _DYNAMIC_ANY_IDL_
0N/A
0N/A#pragma prefix "omg.org"
0N/A#include <orb.idl>
0N/A
0N/A/**
0N/A* An any can be passed to a program that doesn't have any static information for the
0N/Atype of the any (code generated for the type by an IDL compiler has not been
0N/Acompiled with the object implementation). As a result, the object receiving the any
0N/Adoes not have a portable method of using it.
0N/A<P>DynAnys enable traversal of the data value associated with an any at
0N/Aruntime and extraction of the primitive constituents of the data value. This is especially
0N/Ahelpful for writing powerful generic servers (bridges, event channels supporting
0N/Afiltering).
0N/A<P>Similarly, this facility enables the construction of an any at runtime, without having
0N/Astatic knowledge of its type. This is especially helpful for writing generic clients
0N/A(bridges, browsers, debuggers, user interface tools).
0N/A*/
0N/Amodule DynamicAny {
0N/A /**
0N/A * Any values can be dynamically interpreted (traversed) and constructed through DynAny objects.
0N/A * A DynAny object is associated with a data value which corresponds to a copy of the value
0N/A * inserted into an any.
0N/A * <P>A DynAny object may be viewed as an ordered collection of component DynAnys.
0N/A * For DynAnys representing a basic type, such as long, or a type without components,
0N/A * such as an empty exception, the ordered collection of components is empty.
0N/A * Each DynAny object maintains the notion of a current position into its collection
0N/A * of component DynAnys. The current position is identified by an index value that runs
0N/A * from 0 to n-1, where n is the number of components.
0N/A * The special index value -1 indicates a current position that points nowhere.
0N/A * For values that cannot have a current position (such as an empty exception),
0N/A * the index value is fixed at -1.
0N/A * If a DynAny is initialized with a value that has components, the index is initialized to 0.
0N/A * After creation of an uninitialized DynAny (that is, a DynAny that has no value but a TypeCode
0N/A * that permits components), the current position depends on the type of value represented by
0N/A * the DynAny. (The current position is set to 0 or -1, depending on whether the new DynAny
0N/A * gets default values for its components.)
0N/A * <P>The iteration operations rewind, seek, and next can be used to change the current position
0N/A * and the current_component operation returns the component at the current position.
0N/A * The component_count operation returns the number of components of a DynAny.
0N/A * Collectively, these operations enable iteration over the components of a DynAny, for example,
0N/A * to (recursively) examine its contents.
0N/A * <P>A constructed DynAny object is a DynAny object associated with a constructed type.
0N/A * There is a different interface, inheriting from the DynAny interface, associated with
0N/A * each kind of constructed type in IDL (fixed, enum, struct, sequence, union, array,
0N/A * exception, and value type).
0N/A * <P>A constructed DynAny object exports operations that enable the creation of new DynAny objects,
0N/A * each of them associated with a component of the constructed data value.
0N/A * As an example, a DynStruct is associated with a struct value. This means that the DynStruct
0N/A * may be seen as owning an ordered collection of components, one for each structure member.
0N/A * The DynStruct object exports operations that enable the creation of new DynAny objects,
0N/A * each of them associated with a member of the struct.
0N/A * <P>If a DynAny object has been obtained from another (constructed) DynAny object,
0N/A * such as a DynAny representing a structure member that was created from a DynStruct,
0N/A * the member DynAny is logically contained in the DynStruct.
0N/A * Calling an insert or get operation leaves the current position unchanged.
0N/A * Destroying a top-level DynAny object (one that was not obtained as a component of another DynAny)
0N/A * also destroys any component DynAny objects obtained from it.
0N/A * Destroying a non-top level DynAny object does nothing.
0N/A * Invoking operations on a destroyed top-level DynAny or any of its descendants raises OBJECT_NOT_EXIST.
0N/A * If the programmer wants to destroy a DynAny object but still wants to manipulate some component
0N/A * of the data value associated with it, then he or she should first create a DynAny for the component
0N/A * and, after that, make a copy of the created DynAny object.
0N/A * <P>The behavior of DynAny objects has been defined in order to enable efficient implementations
0N/A * in terms of allocated memory space and speed of access. DynAny objects are intended to be used
0N/A * for traversing values extracted from anys or constructing values of anys at runtime.
0N/A * Their use for other purposes is not recommended.
0N/A * <P>Insert and get operations are necessary to handle basic DynAny objects
0N/A * but are also helpful to handle constructed DynAny objects.
0N/A * Inserting a basic data type value into a constructed DynAny object
0N/A * implies initializing the current component of the constructed data value
0N/A * associated with the DynAny object. For example, invoking insert_boolean on a
0N/A * DynStruct implies inserting a boolean data value at the current position
0N/A * of the associated struct data value.
0N/A * A type is consistent for inserting or extracting a value if its TypeCode is equivalent to
0N/A * the TypeCode contained in the DynAny or, if the DynAny has components, is equivalent to the TypeCode
0N/A * of the DynAny at the current position.
0N/A * <P>DynAny and DynAnyFactory objects are intended to be local to the process in which they are
0N/A * created and used. This means that references to DynAny and DynAnyFactory objects cannot be exported
0N/A * to other processes, or externalized with ORB.object_to_string().
0N/A * If any attempt is made to do so, the offending operation will raise a MARSHAL system exception.
0N/A * Since their interfaces are specified in IDL, DynAny objects export operations defined in the standard
0N/A * org.omg.CORBA.Object interface. However, any attempt to invoke operations exported through the Object
0N/A * interface may raise the standard NO_IMPLEMENT exception.
0N/A * An attempt to use a DynAny object with the DII may raise the NO_IMPLEMENT exception.
0N/A */
0N/A interface DynAny {
0N/A #pragma sun_localservant DynAny ""
0N/A exception InvalidValue {};
0N/A exception TypeMismatch {};
0N/A
0N/A /**
0N/A * Returns the TypeCode associated with this DynAny object.
0N/A * A DynAny object is created with a TypeCode value assigned to it.
0N/A * This TypeCode value determines the type of the value handled through the DynAny object.
0N/A * Note that the TypeCode associated with a DynAny object is initialized at the time the
0N/A * DynAny is created and cannot be changed during lifetime of the DynAny object.
0N/A *
0N/A * @return The TypeCode associated with this DynAny object
0N/A */
0N/A CORBA::TypeCode type();
0N/A
0N/A /**
0N/A * Initializes the value associated with a DynAny object with the value
0N/A * associated with another DynAny object.
0N/A * The current position of the target DynAny is set to zero for values that have components
0N/A * and to -1 for values that do not have components.
0N/A *
0N/A * @param dyn_any
0N/A * @exception TypeMismatch if the type of the passed DynAny is not equivalent to the type of target DynAny
0N/A */
0N/A void assign(in DynAny dyn_any)
0N/A raises(TypeMismatch);
0N/A
0N/A /**
0N/A * Initializes the value associated with a DynAny object with the value contained in an any.
0N/A * The current position of the target DynAny is set to zero for values that have components
0N/A * and to -1 for values that do not have components.
0N/A *
0N/A * @exception TypeMismatch if the type of the passed Any is not equivalent to the type of target DynAny
0N/A * @exception InvalidValue if the passed Any does not contain a legal value (such as a null string)
0N/A */
0N/A void from_any(in any value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Creates an any value from a DynAny object.
0N/A * A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
0N/A * The value associated with the DynAny object is copied into the any.
0N/A *
0N/A * @return a new Any object with the same value and TypeCode
0N/A */
0N/A any to_any();
0N/A
0N/A /**
0N/A * Compares two DynAny values for equality.
0N/A * Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
0N/A * have equal values.
0N/A * The current position of the two DynAnys being compared has no effect on the result of equal.
0N/A *
0N/A * @return true of the DynAnys are equal, false otherwise
0N/A */
0N/A boolean equal(in DynAny dyn_any);
0N/A
0N/A /**
0N/A * Destroys a DynAny object.
0N/A * This operation frees any resources used to represent the data value associated with a DynAny object.
0N/A * It must be invoked on references obtained from one of the creation operations on the ORB interface
0N/A * or on a reference returned by DynAny.copy() to avoid resource leaks.
0N/A * Invoking destroy on component DynAny objects (for example, on objects returned by the
0N/A * current_component operation) does nothing.
0N/A * Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
0N/A * That is, references to components of a destroyed DynAny become invalid.
0N/A * Invocations on such references raise OBJECT_NOT_EXIST.
0N/A * It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
0N/A * from which the component was obtained by making a copy of the component with the copy operation
0N/A * before destroying the DynAny from which the component was obtained.
0N/A */
0N/A void destroy();
0N/A
0N/A /**
0N/A * Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
0N/A * The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
0N/A * such as DynStruct, creates the derived type but returns its reference as the DynAny base type.
0N/A *
0N/A * @return a deep copy of the DynAny object
0N/A */
0N/A DynAny copy();
0N/A
0N/A /**
0N/A * Inserts a boolean value into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_boolean(in boolean value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a byte value into the DynAny. The IDL octet data type is mapped to the Java byte data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_octet(in octet value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a char value into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_char(in char value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a short value into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_short(in short value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a short value into the DynAny. The IDL ushort data type is mapped to the Java short data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_ushort(in unsigned short value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts an integer value into the DynAny. The IDL long data type is mapped to the Java int data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_long(in long value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts an integer value into the DynAny. The IDL ulong data type is mapped to the Java int data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_ulong(in unsigned long value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a float value into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_float(in float value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a double value into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_double(in double value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a string value into the DynAny.
0N/A * Both bounded and unbounded strings are inserted using this method.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_string(in string value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a reference to a CORBA object into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_reference(in Object value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a TypeCode object into the DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_typecode(in CORBA::TypeCode value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a long value into the DynAny. The IDL long long data type is mapped to the Java long data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_longlong(in long long value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a long value into the DynAny.
0N/A * The IDL unsigned long long data type is mapped to the Java long data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_ulonglong(in unsigned long long value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A// void insert_longdouble(in long double value)
0N/A// raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a char value into the DynAny. The IDL wchar data type is mapped to the Java char data type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_wchar(in wchar value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a string value into the DynAny.
0N/A * Both bounded and unbounded strings are inserted using this method.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception InvalidValue if the string inserted is longer than the bound of a bounded string
0N/A */
0N/A void insert_wstring(in wstring value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts an Any value into the Any represented by this DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_any(in any value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts the Any value contained in the parameter DynAny into the Any represented by this DynAny.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_dyn_any(in DynAny value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Inserts a reference to a Serializable object into this DynAny.
0N/A * The IDL ValueBase type is mapped to the Java Serializable type.
0N/A *
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A void insert_val(in ValueBase value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the boolean value from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A boolean get_boolean()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the byte value from this DynAny. The IDL octet data type is mapped to the Java byte data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A octet get_octet()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the char value from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A char get_char()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the short value from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A short get_short()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the short value from this DynAny. The IDL ushort data type is mapped to the Java short data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A unsigned short get_ushort()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the integer value from this DynAny. The IDL long data type is mapped to the Java int data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A long get_long()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the integer value from this DynAny. The IDL ulong data type is mapped to the Java int data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A unsigned long get_ulong()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the float value from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A float get_float()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the double value from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A double get_double()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the string value from this DynAny.
0N/A * Both bounded and unbounded strings are extracted using this method.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A string get_string()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the reference to a CORBA Object from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A Object get_reference()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the TypeCode object from this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A CORBA::TypeCode get_typecode()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the long value from this DynAny. The IDL long long data type is mapped to the Java long data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A long long get_longlong()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the long value from this DynAny.
0N/A * The IDL unsigned long long data type is mapped to the Java long data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A unsigned long long get_ulonglong()
0N/A raises(TypeMismatch, InvalidValue);
0N/A// long double get_longdouble()
0N/A// raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the long value from this DynAny. The IDL wchar data type is mapped to the Java char data type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A wchar get_wchar()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the string value from this DynAny.
0N/A * Both bounded and unbounded strings are extracted using this method.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A */
0N/A wstring get_wstring()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts an Any value contained in the Any represented by this DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A any get_any()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts the Any value contained in the Any represented by this DynAny and returns it wrapped
0N/A * into a new DynAny.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A DynAny get_dyn_any()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Extracts a Serializable object from this DynAny.
0N/A * The IDL ValueBase type is mapped to the Java Serializable type.
0N/A *
0N/A * @exception TypeMismatch if the accessed component in the DynAny is of a type
0N/A * that is not equivalent to the requested type.
0N/A * @exception TypeMismatch if called on a DynAny whose current component itself has components
0N/A * @exception InvalidValue if this DynAny has components but has a current position of -1
0N/A */
0N/A ValueBase get_val()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Sets the current position to index. The current position is indexed 0 to n-1, that is,
0N/A * index zero corresponds to the first component. The operation returns true if the resulting
0N/A * current position indicates a component of the DynAny and false if index indicates
0N/A * a position that does not correspond to a component.
0N/A * Calling seek with a negative index is legal. It sets the current position to -1 to indicate
0N/A * no component and returns false. Passing a non-negative index value for a DynAny that does not
0N/A * have a component at the corresponding position sets the current position to -1 and returns false.
0N/A */
0N/A boolean seek(in long index);
0N/A
0N/A /**
0N/A * Is equivalent to seek(0).
0N/A */
0N/A void rewind();
0N/A
0N/A /**
0N/A * Advances the current position to the next component.
0N/A * The operation returns true while the resulting current position indicates a component, false otherwise.
0N/A * A false return value leaves the current position at -1.
0N/A * Invoking next on a DynAny without components leaves the current position at -1 and returns false.
0N/A */
0N/A boolean next();
0N/A
0N/A /**
0N/A * Returns the number of components of a DynAny.
0N/A * For a DynAny without components, it returns zero.
0N/A * The operation only counts the components at the top level.
0N/A * For example, if component_count is invoked on a DynStruct with a single member,
0N/A * the return value is 1, irrespective of the type of the member.
0N/A * <UL>
0N/A * <LI>For sequences, the operation returns the current number of elements.
0N/A * <LI>For structures, exceptions, and value types, the operation returns the number of members.
0N/A * <LI>For arrays, the operation returns the number of elements.
0N/A * <LI>For unions, the operation returns 2 if the discriminator indicates that a named member is active,
0N/A * otherwise, it returns 1.
0N/A * <LI>For DynFixed and DynEnum, the operation returns zero.
0N/A * </UL>
0N/A */
0N/A unsigned long component_count();
0N/A
0N/A /**
0N/A * Returns the DynAny for the component at the current position.
0N/A * It does not advance the current position, so repeated calls to current_component
0N/A * without an intervening call to rewind, next, or seek return the same component.
0N/A * The returned DynAny object reference can be used to get/set the value of the current component.
0N/A * If the current component represents a complex type, the returned reference can be narrowed
0N/A * based on the TypeCode to get the interface corresponding to the to the complex type.
0N/A * Calling current_component on a DynAny that cannot have components,
0N/A * such as a DynEnum or an empty exception, raises TypeMismatch.
0N/A * Calling current_component on a DynAny whose current position is -1 returns a nil reference.
0N/A * The iteration operations, together with current_component, can be used
0N/A * to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
0N/A * current_component and next can be used to initialize all the components of the value.
0N/A * Once the dynamic value is completely initialized, to_any creates the corresponding any value.
0N/A *
0N/A * @exception TypeMismatch If called on a DynAny that cannot have components,
0N/A * such as a DynEnum or an empty exception
0N/A */
0N/A DynAny current_component()
0N/A raises(TypeMismatch);
0N/A };
0N/A
0N/A /**
0N/A * DynFixed objects support the manipulation of IDL fixed values.
0N/A * Because IDL does not have a generic type that can represent fixed types with arbitrary
0N/A * number of digits and arbitrary scale, the operations use the IDL string type.
0N/A */
0N/A interface DynFixed : DynAny {
0N/A #pragma sun_localservant DynFixed ""
0N/A
0N/A /**
0N/A * Returns the value of a DynFixed.
0N/A */
0N/A string get_value();
0N/A
0N/A /**
0N/A * Sets the value of the DynFixed.
0N/A * The val string must contain a fixed string constant in the same format as used for IDL fixed-point literals.
0N/A * However, the trailing d or D is optional. The return value is true if val can be represented as the DynFixed
0N/A * without loss of precision. If val has more fractional digits than can be represented in the DynFixed,
0N/A * fractional digits are truncated and the return value is false.
0N/A *
0N/A * @exception TypeMismatch If val does not contain a valid fixed-point literal or contains extraneous
0N/A * characters other than leading or trailing white space
0N/A * @exception InvalidValue If val contains a value whose scale exceeds that of the DynFixed
0N/A * or is not initialized
0N/A */
0N/A boolean set_value(in string val)
0N/A raises(TypeMismatch, InvalidValue);
0N/A };
0N/A
0N/A /**
0N/A * DynEnum objects support the manipulation of IDL enumerated values.
0N/A * The current position of a DynEnum is always -1.
0N/A */
0N/A interface DynEnum : DynAny {
0N/A #pragma sun_localservant DynEnum ""
0N/A
0N/A /**
0N/A * Returns the value of the DynEnum as an IDL identifier.
0N/A */
0N/A string get_as_string();
0N/A
0N/A /**
0N/A * Sets the value of the DynEnum to the enumerated value whose IDL identifier is passed in the value parameter.
0N/A *
0N/A * @exception InvalidValue If value contains a string that is not a valid IDL identifier
0N/A * for the corresponding enumerated type
0N/A */
0N/A void set_as_string(in string value)
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Returns the value of the DynEnum as the enumerated value's ordinal value.
0N/A * Enumerators have ordinal values 0 to n-1, as they appear from left to right
0N/A * in the corresponding IDL definition.
0N/A */
0N/A unsigned long get_as_ulong();
0N/A
0N/A /**
0N/A * Sets the value of the DynEnum as the enumerated value's ordinal value.
0N/A *
0N/A * @exception InvalidValue If value contains a value that is outside the range of ordinal values
0N/A * for the corresponding enumerated type
0N/A */
0N/A void set_as_ulong(in unsigned long value)
0N/A raises(InvalidValue);
0N/A };
0N/A
0N/A typedef string FieldName;
0N/A
0N/A /**
0N/A * NameValuePairs associate a name with an Any object.
0N/A */
0N/A struct NameValuePair {
0N/A /**
0N/A * The name associated with the Any.
0N/A */
0N/A FieldName id;
0N/A /**
0N/A * The Any value associated with the name.
0N/A */
0N/A any value;
0N/A };
0N/A typedef sequence<NameValuePair> NameValuePairSeq;
0N/A
0N/A /**
0N/A * NameDynAnyPairs associate a name with an DynAny object.
0N/A */
0N/A struct NameDynAnyPair {
0N/A /**
0N/A * The name associated with the DynAny.
0N/A */
0N/A FieldName id;
0N/A /**
0N/A * The DynAny value associated with the name.
0N/A */
0N/A DynAny value;
0N/A };
0N/A typedef sequence<NameDynAnyPair> NameDynAnyPairSeq;
0N/A
0N/A /**
0N/A * DynStruct objects support the manipulation of IDL struct and exception values.
0N/A * Members of the exceptions are handled in the same way as members of a struct.
0N/A */
0N/A interface DynStruct : DynAny {
0N/A #pragma sun_localservant DynStruct ""
0N/A
0N/A /**
0N/A * Returns the name of the member at the current position.
0N/A * This operation may return an empty string since the TypeCode of the value being
0N/A * manipulated may not contain the names of members.
0N/A *
0N/A * @exception TypeMismatch if the DynStruct represents an empty exception.
0N/A * @exception InvalidValue if the current position does not indicate a member
0N/A */
0N/A FieldName current_member_name()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns the TCKind associated with the member at the current position.
0N/A *
0N/A * @exception TypeMismatch if the DynStruct represents an empty exception.
0N/A * @exception InvalidValue if the current position does not indicate a member
0N/A */
0N/A CORBA::TCKind current_member_kind()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns a sequence of NameValuePairs describing the name and the value of each member
0N/A * in the struct associated with a DynStruct object.
0N/A * The sequence contains members in the same order as the declaration order of members
0N/A * as indicated by the DynStruct's TypeCode. The current position is not affected.
0N/A * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
0N/A * does not contain member names.
0N/A */
0N/A NameValuePairSeq get_members();
0N/A
0N/A /**
0N/A * Initializes the struct data value associated with a DynStruct object from a sequence of NameValuePairs.
0N/A * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
0N/A * if an empty sequence is passed, the current position is set to -1.
0N/A * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
0N/A * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
0N/A * The operation makes no attempt to assign member values based on member names.
0N/A *
0N/A * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
0N/A * corresponding member name in the DynStruct's TypeCode and they are not empty strings
0N/A * @exception InvalidValue if the passed sequence has a number of elements that disagrees
0N/A * with the number of members as indicated by the DynStruct's TypeCode
0N/A */
0N/A void set_members(in NameValuePairSeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
0N/A * in the struct associated with a DynStruct object.
0N/A * The sequence contains members in the same order as the declaration order of members
0N/A * as indicated by the DynStruct's TypeCode. The current position is not affected.
0N/A * The member names in the returned sequence will be empty strings if the DynStruct's TypeCode
0N/A * does not contain member names.
0N/A */
0N/A NameDynAnyPairSeq get_members_as_dyn_any();
0N/A
0N/A /**
0N/A * Initializes the struct data value associated with a DynStruct object from a sequence of NameDynAnyPairs.
0N/A * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
0N/A * if an empty sequence is passed, the current position is set to -1.
0N/A * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
0N/A * of the struct as indicated by the DynStruct's TypeCode or they must be empty strings.
0N/A * The operation makes no attempt to assign member values based on member names.
0N/A *
0N/A * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
0N/A * corresponding member name in the DynStruct's TypeCode and they are not empty strings
0N/A * @exception InvalidValue if the passed sequence has a number of elements that disagrees
0N/A * with the number of members as indicated by the DynStruct's TypeCode
0N/A */
0N/A void set_members_as_dyn_any(in NameDynAnyPairSeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A };
0N/A
0N/A /**
0N/A * DynUnion objects support the manipulation of IDL unions.
0N/A * A union can have only two valid current positions:
0N/A * <UL>
0N/A * <LI>zero, which denotes the discriminator
0N/A * <LI>one, which denotes the active member
0N/A * </UL>
0N/A * The component_count value for a union depends on the current discriminator:
0N/A * it is 2 for a union whose discriminator indicates a named member, and 1 otherwise.
0N/A */
0N/A interface DynUnion : DynAny {
0N/A #pragma sun_localservant DynUnion ""
0N/A
0N/A /**
0N/A * Returns the current discriminator value.
0N/A */
0N/A DynAny get_discriminator();
0N/A
0N/A /**
0N/A * Sets the discriminator of the DynUnion to the specified value.
0N/A * Setting the discriminator to a value that is consistent with the currently active union member
0N/A * does not affect the currently active member. Setting the discriminator to a value that is inconsistent
0N/A * with the currently active member deactivates the member and activates the member that is consistent
0N/A * with the new discriminator value (if there is a member for that value) by initializing the member
0N/A * to its default value.
0N/A * Setting the discriminator of a union sets the current position to 0 if the discriminator value
0N/A * indicates a non-existent union member (has_no_active_member returns true in this case).
0N/A * Otherwise, if the discriminator value indicates a named union member, the current position is set to 1
0N/A * (has_no_active_member returns false and component_count returns 2 in this case).
0N/A *
0N/A * @exception TypeMismatch if the TypeCode of the parameter is not equivalent to the TypeCode
0N/A * of the union's discriminator
0N/A */
0N/A void set_discriminator(in DynAny d)
0N/A raises(TypeMismatch);
0N/A
0N/A /**
0N/A * Sets the discriminator to a value that is consistent with the value of the default case of a union.
0N/A * It sets the current position to zero and causes component_count to return 2.
0N/A *
0N/A * @exception TypeMismatch if the union does not have an explicit default case
0N/A */
0N/A void set_to_default_member()
0N/A raises(TypeMismatch);
0N/A
0N/A /**
0N/A * Sets the discriminator to a value that does not correspond to any of the unions case labels.
0N/A * It sets the current position to zero and causes component_count to return 1.
0N/A *
0N/A * @exception TypeMismatch if the union has an explicit default case or if it uses the entire range
0N/A * of discriminator values for explicit case labels
0N/A */
0N/A void set_to_no_active_member()
0N/A raises(TypeMismatch);
0N/A
0N/A /**
0N/A * Returns true if the union has no active member, that is, the unions value consists solely
0N/A * of its discriminator because the discriminator has a value that is not listed as an explicit case label.
0N/A * Calling this operation on a union that has a default case returns false.
0N/A * Calling this operation on a union that uses the entire range of discriminator values
0N/A * for explicit case labels returns false.
0N/A */
0N/A boolean has_no_active_member();
0N/A
0N/A /**
0N/A * Returns the TCKind value of the discriminators TypeCode.
0N/A */
0N/A CORBA::TCKind discriminator_kind();
0N/A
0N/A /**
0N/A * Returns the TCKind value of the currently active members TypeCode.
0N/A *
0N/A * @exception InvalidValue if the union does not have a currently active member
0N/A */
0N/A CORBA::TCKind member_kind()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Returns the currently active member. Note that the returned reference remains valid only
0N/A * for as long as the currently active member does not change. Using the returned reference
0N/A * beyond the life time of the currently active member raises OBJECT_NOT_EXIST.
0N/A *
0N/A * @exception InvalidValue if the union has no active member
0N/A */
0N/A DynAny member()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Returns the name of the currently active member. If the unions TypeCode does not contain
0N/A * a member name for the currently active member, the operation returns an empty string.
0N/A *
0N/A * @exception InvalidValue if the union has no active member
0N/A */
0N/A FieldName member_name()
0N/A raises(InvalidValue);
0N/A };
0N/A
0N/A typedef sequence<any> AnySeq;
0N/A typedef sequence<DynAny> DynAnySeq;
0N/A
0N/A /**
0N/A * DynSequence objects support the manipulation of IDL sequences.
0N/A */
0N/A interface DynSequence : DynAny {
0N/A #pragma sun_localservant DynSequence ""
0N/A
0N/A /**
0N/A * Returns the current length of the sequence.
0N/A */
0N/A unsigned long get_length();
0N/A
0N/A /**
0N/A * Sets the length of the sequence.
0N/A * Increasing the length of a sequence adds new elements at the tail without affecting the values
0N/A * of already existing elements. Newly added elements are default-initialized.
0N/A * Increasing the length of a sequence sets the current position to the first newly-added element
0N/A * if the previous current position was -1. Otherwise, if the previous current position was not -1,
0N/A * the current position is not affected.
0N/A * Decreasing the length of a sequence removes elements from the tail without affecting the value
0N/A * of those elements that remain. The new current position after decreasing the length of a sequence
0N/A * is determined as follows:
0N/A * <UL>
0N/A * <LI>If the length of the sequence is set to zero, the current position is set to -1.
0N/A * <LI>If the current position is -1 before decreasing the length, it remains at -1.
0N/A * <LI>If the current position indicates a valid element and that element is not removed when the length
0N/A * is decreased, the current position remains unaffected.
0N/A * <LI>If the current position indicates a valid element and that element is removed,
0N/A * the current position is set to -1.
0N/A * </UL>
0N/A *
0N/A * @exception InvalidValue if this is a bounded sequence and len is larger than the bound
0N/A */
0N/A void set_length(in unsigned long len)
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Returns the elements of the sequence.
0N/A */
0N/A AnySeq get_elements();
0N/A
0N/A /**
0N/A * Sets the elements of a sequence.
0N/A * The length of the DynSequence is set to the length of value. The current position is set to zero
0N/A * if value has non-zero length and to -1 if value is a zero-length sequence.
0N/A *
0N/A * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
0N/A * to the element TypeCode of the DynSequence
0N/A * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
0N/A */
0N/A void set_elements(in AnySeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns the DynAnys representing the elements of the sequence.
0N/A */
0N/A DynAnySeq get_elements_as_dyn_any();
0N/A
0N/A /**
0N/A * Sets the elements of a sequence using DynAnys.
0N/A * The length of the DynSequence is set to the length of value. The current position is set to zero
0N/A * if value has non-zero length and to -1 if value is a zero-length sequence.
0N/A *
0N/A * @exception TypeMismatch if value contains one or more elements whose TypeCode is not equivalent
0N/A * to the element TypeCode of the DynSequence
0N/A * @exception InvalidValue if the length of value exceeds the bound of a bounded sequence
0N/A */
0N/A void set_elements_as_dyn_any(in DynAnySeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A };
0N/A
0N/A /**
0N/A * DynArray objects support the manipulation of IDL arrays.
0N/A * Note that the dimension of the array is contained in the TypeCode which is accessible
0N/A * through the type attribute. It can also be obtained by calling the component_count operation.
0N/A */
0N/A interface DynArray : DynAny {
0N/A #pragma sun_localservant DynArray ""
0N/A
0N/A /**
0N/A * Returns the elements of the DynArray.
0N/A */
0N/A AnySeq get_elements();
0N/A
0N/A /**
0N/A * Sets the DynArray to contain the passed elements.
0N/A *
0N/A * @exception TypeMismatch if one or more elements have a type that is inconsistent with the DynArrays TypeCode
0N/A * @exception InvalidValue if the sequence does not contain the same number of elements as the array dimension
0N/A */
0N/A void set_elements(in AnySeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns the elements of the DynArray as DynAnys.
0N/A */
0N/A DynAnySeq get_elements_as_dyn_any();
0N/A
0N/A /**
0N/A * Sets the DynArray to contain the passed elements.
0N/A *
0N/A * @exception TypeMismatch if one or more elements have a type that is inconsistent with the DynArrays TypeCode
0N/A * @exception InvalidValue if the sequence does not contain the same number of elements as the array dimension
0N/A */
0N/A void set_elements_as_dyn_any(in DynAnySeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A };
0N/A
0N/A /**
0N/A * DynValueCommon provides operations supported by both the DynValue and DynValueBox interfaces.
0N/A */
4N/A interface DynValueCommon : DynAny {
0N/A /**
0N/A * Returns true if the DynValueCommon represents a null value type.
0N/A */
4N/A boolean is_null();
0N/A
0N/A /**
0N/A * Changes the representation of a DynValueCommon to a null value type.
0N/A */
4N/A void set_to_null();
0N/A
0N/A /**
0N/A * Replaces a null value type with a newly constructed value. Its components are initialized
0N/A * to default values as in DynAnyFactory.create_dyn_any_from_type_code.
0N/A * If the DynValueCommon represents a non-null value type, then this operation has no effect.
0N/A */
4N/A void set_to_value();
4N/A };
0N/A
0N/A /**
0N/A * DynValue objects support the manipulation of IDL non-boxed value types.
0N/A * The DynValue interface can represent both null and non-null value types.
0N/A * For a DynValue representing a non-null value type, the DynValue's components comprise
0N/A * the public and private members of the value type, including those inherited from concrete base value types,
0N/A * in the order of definition. A DynValue representing a null value type has no components
0N/A * and a current position of -1.
0N/A * <P>Warning: Indiscriminantly changing the contents of private value type members can cause the value type
0N/A * implementation to break by violating internal constraints. Access to private members is provided to support
0N/A * such activities as ORB bridging and debugging and should not be used to arbitrarily violate
0N/A * the encapsulation of the value type.
0N/A */
0N/A interface DynValue : DynValueCommon {
0N/A #pragma sun_localservant DynValue ""
0N/A
0N/A /**
0N/A * Returns the name of the member at the current position.
0N/A * This operation may return an empty string since the TypeCode of the value being
0N/A * manipulated may not contain the names of members.
0N/A *
0N/A * @exception TypeMismatch if the DynValue represents a null value type.
0N/A * @exception InvalidValue if the current position does not indicate a member
0N/A */
0N/A FieldName current_member_name()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns the TCKind associated with the member at the current position.
0N/A *
0N/A * @exception TypeMismatch if the DynValue represents a null value type.
0N/A * @exception InvalidValue if the current position does not indicate a member
0N/A */
0N/A CORBA::TCKind current_member_kind()
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns a sequence of NameValuePairs describing the name and the value of each member
0N/A * in the value type.
0N/A * The sequence contains members in the same order as the declaration order of members
0N/A * as indicated by the DynValue's TypeCode. The current position is not affected.
0N/A * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
0N/A * does not contain member names.
0N/A *
0N/A * @exception InvalidValue if this object represents a null value type
0N/A */
0N/A NameValuePairSeq get_members()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Initializes the value type's members from a sequence of NameValuePairs.
0N/A * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
0N/A * if an empty sequence is passed, the current position is set to -1.
0N/A * A null value type can be initialized to a non-null value type using this method.
0N/A * <P>Members must appear in the NameValuePairs in the order in which they appear in the IDL specification
0N/A * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
0N/A * The operation makes no attempt to assign member values based on member names.
0N/A *
0N/A * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
0N/A * corresponding member name in the DynValue's TypeCode and they are not empty strings
0N/A * @exception InvalidValue if the passed sequence has a number of elements that disagrees
0N/A * with the number of members as indicated by the DynValue's TypeCode
0N/A */
0N/A void set_members(in NameValuePairSeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A
0N/A /**
0N/A * Returns a sequence of NameDynAnyPairs describing the name and the value of each member
0N/A * in the value type.
0N/A * The sequence contains members in the same order as the declaration order of members
0N/A * as indicated by the DynValue's TypeCode. The current position is not affected.
0N/A * The member names in the returned sequence will be empty strings if the DynValue's TypeCode
0N/A * does not contain member names.
0N/A *
0N/A * @exception InvalidValue if this object represents a null value type
0N/A */
0N/A NameDynAnyPairSeq get_members_as_dyn_any()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Initializes the value type's members from a sequence of NameDynAnyPairs.
0N/A * The operation sets the current position to zero if the passed sequences has non-zero length. Otherwise,
0N/A * if an empty sequence is passed, the current position is set to -1.
0N/A * A null value type can be initialized to a non-null value type using this method.
0N/A * <P>Members must appear in the NameDynAnyPairs in the order in which they appear in the IDL specification
0N/A * of the value type as indicated by the DynValue's TypeCode or they must be empty strings.
0N/A * The operation makes no attempt to assign member values based on member names.
0N/A *
0N/A * @exception TypeMismatch if the member names supplied in the passed sequence do not match the
0N/A * corresponding member name in the DynValue's TypeCode and they are not empty strings
0N/A * @exception InvalidValue if the passed sequence has a number of elements that disagrees
0N/A * with the number of members as indicated by the DynValue's TypeCode
0N/A */
0N/A void set_members_as_dyn_any(in NameDynAnyPairSeq value)
0N/A raises(TypeMismatch, InvalidValue);
0N/A };
0N/A
0N/A /**
0N/A * DynValueBox objects support the manipulation of IDL boxed value types.
0N/A * The DynValueBox interface can represent both null and non-null value types.
0N/A * For a DynValueBox representing a non-null value type, the DynValueBox has a single component
0N/A * of the boxed type. A DynValueBox representing a null value type has no components
0N/A * and a current position of -1.
0N/A */
4N/A interface DynValueBox : DynValueCommon {
0N/A
0N/A /**
0N/A * Returns the boxed value as an Any.
0N/A *
0N/A * @exception InvalidValue if this object represents a null value box type
0N/A */
4N/A any get_boxed_value()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Replaces the boxed value with the specified value.
0N/A * If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
0N/A *
0N/A * @exception TypeMismatch if this object represents a non-null value box type and the type
0N/A * of the parameter is not matching the current boxed value type.
0N/A */
0N/A void set_boxed_value(in any boxed)
0N/A raises(TypeMismatch);
0N/A
0N/A /**
0N/A * Returns the boxed value as a DynAny.
0N/A *
0N/A * @exception InvalidValue if this object represents a null value box type
0N/A */
4N/A DynAny get_boxed_value_as_dyn_any()
0N/A raises(InvalidValue);
0N/A
0N/A /**
0N/A * Replaces the boxed value with the value contained in the parameter.
0N/A * If the DynBoxedValue represents a null valuetype, it is converted to a non-null value.
0N/A *
0N/A * @exception TypeMismatch if this object represents a non-null value box type and the type
0N/A * of the parameter is not matching the current boxed value type.
0N/A */
4N/A void set_boxed_value_as_dyn_any(in DynAny boxed)
0N/A raises(TypeMismatch);
0N/A };
0N/A
0N/A /**
0N/A * DynAny objects can be created by invoking operations on the DynAnyFactory object.
0N/A * Generally there are only two ways to create a DynAny object:
0N/A * <UL>
0N/A * <LI>invoking an operation on an existing DynAny object
0N/A * <LI>invoking an operation on a DynAnyFactory object
0N/A * </UL>
0N/A * A constructed DynAny object supports operations that enable the creation of new DynAny
0N/A * objects encapsulating access to the value of some constituent.
0N/A * DynAny objects also support the copy operation for creating new DynAny objects.
0N/A * A reference to the DynAnyFactory object is obtained by calling ORB.resolve_initial_references()
0N/A * with the identifier parameter set to the string constant "DynAnyFactory".
0N/A * <P>Dynamic interpretation of an any usually involves creating a DynAny object using create_dyn_any()
0N/A * as the first step. Depending on the type of the any, the resulting DynAny object reference can be narrowed
0N/A * to a DynFixed, DynStruct, DynSequence, DynArray, DynUnion, DynEnum, or DynValue object reference.
0N/A * <P>Dynamic creation of an any involves creating a DynAny object using create_dyn_any_from_type_code(),
0N/A * passing the TypeCode associated with the value to be created. The returned reference is narrowed to one of
0N/A * the complex types, such as DynStruct, if appropriate. Then, the value can be initialized by means of
0N/A * invoking operations on the resulting object. Finally, the to_any operation can be invoked
0N/A * to create an any value from the constructed DynAny.
0N/A */
0N/A interface DynAnyFactory {
0N/A #pragma sun_localservant DynAnyFactory ""
0N/A exception InconsistentTypeCode {};
0N/A
0N/A /**
0N/A * Creates a new DynAny object from an any value.
0N/A * A copy of the TypeCode associated with the any value is assigned to the resulting DynAny object.
0N/A * The value associated with the DynAny object is a copy of the value in the original any.
0N/A * The current position of the created DynAny is set to zero if the passed value has components,
0N/A * to -1 otherwise
0N/A *
0N/A * @exception InconsistentTypeCode if value has a TypeCode with a TCKind of tk_Principal,
0N/A * tk_native, or tk_abstract_interface
0N/A */
0N/A DynAny create_dyn_any(in any value)
0N/A raises(InconsistentTypeCode);
0N/A
0N/A /**
0N/A * Creates a DynAny from a TypeCode. Depending on the TypeCode, the created object may be of type DynAny,
0N/A * or one of its derived types, such as DynStruct. The returned reference can be narrowed to the derived type.
0N/A * In all cases, a DynAny constructed from a TypeCode has an initial default value.
0N/A * The default values of basic types are:
0N/A * <UL>
0N/A * <LI>false for boolean
0N/A * <LI>zero for numeric types
0N/A * <LI>zero for types octet, char, and wchar
0N/A * <LI>the empty string for string and wstring
0N/A * <LI>null for object references
0N/A * <LI>a type code with a TCKind value of tk_null for type codes
0N/A * <LI>for any values, an any containing a type code with a TCKind value of tk_null type and no value
0N/A * </UL>
0N/A * For complex types, creation of the corresponding DynAny assigns a default value as follows:
0N/A * <UL>
0N/A * <LI>For DynSequence it sets the current position to -1 and creates an empty sequence.
0N/A * <LI>For DynEnum it sets the current position to -1 and sets the value of the enumerator
0N/A * to the first enumerator value indicated by the TypeCode.
0N/A * <LI>For DynFixed it sets the current position to -1 and sets the value zero.
0N/A * <LI>For DynStruct it sets the current position to -1 for empty exceptions
0N/A * and to zero for all other TypeCodes. The members (if any) are (recursively) initialized
0N/A * to their default values.
0N/A * <LI>For DynArray sets the current position to zero and (recursively) initializes elements
0N/A * to their default value.
0N/A * <LI>For DynUnion sets the current position to zero. The discriminator value is set
0N/A * to a value consistent with the first named member of the union. That member is activated and (recursively)
0N/A * initialized to its default value.
0N/A * <LI>For DynValue and DynValueBox it initializes to a null value.
0N/A * </UL>
0N/A */
0N/A DynAny create_dyn_any_from_type_code(in CORBA::TypeCode type)
0N/A raises(InconsistentTypeCode);
0N/A };
0N/A}; // module DynamicAny
0N/A
0N/A#endif // _DYNAMIC_ANY_IDL_