type

Returns the TypeCode associated with this DynAny object.
A DynAny object is created with a TypeCode value assigned to it.
This TypeCode value determines the type of the value handled through the DynAny object.
Note that the TypeCode associated with a DynAny object is initialized at the time the
DynAny is created and cannot be changed during lifetime of the DynAny object.

assign

Initializes the value associated with a DynAny object with the value
associated with another DynAny object.
The current position of the target DynAny is set to zero for values that have components
and to -1 for values that do not have components.

from_any

Initializes the value associated with a DynAny object with the value contained in an any.
The current position of the target DynAny is set to zero for values that have components
and to -1 for values that do not have components.

to_any

Creates an any value from a DynAny object.
A copy of the TypeCode associated with the DynAny object is assigned to the resulting any.
The value associated with the DynAny object is copied into the any.

equal

Compares two DynAny values for equality.
Two DynAny values are equal if their TypeCodes are equivalent and, recursively, all component DynAnys
have equal values.
The current position of the two DynAnys being compared has no effect on the result of equal.

destroy

public void destroy()

Destroys a DynAny object.
This operation frees any resources used to represent the data value associated with a DynAny object.
It must be invoked on references obtained from one of the creation operations on the ORB interface
or on a reference returned by DynAny.copy() to avoid resource leaks.
Invoking destroy on component DynAny objects (for example, on objects returned by the
current_component operation) does nothing.
Destruction of a DynAny object implies destruction of all DynAny objects obtained from it.
That is, references to components of a destroyed DynAny become invalid.
Invocations on such references raise OBJECT_NOT_EXIST.
It is possible to manipulate a component of a DynAny beyond the life time of the DynAny
from which the component was obtained by making a copy of the component with the copy operation
before destroying the DynAny from which the component was obtained.

copy

Creates a new DynAny object whose value is a deep copy of the DynAny on which it is invoked.
The operation is polymorphic, that is, invoking it on one of the types derived from DynAny,
such as DynStruct, creates the derived type but returns its reference as the DynAny base type.

TypeMismatch - if the accessed component in the DynAny is of a type
that is not equivalent to the requested type.

TypeMismatch - if called on a DynAny whose current component itself has components

InvalidValue - if this DynAny has components but has a current position of -1

seek

public boolean seek(int index)

Sets the current position to index. The current position is indexed 0 to n-1, that is,
index zero corresponds to the first component. The operation returns true if the resulting
current position indicates a component of the DynAny and false if index indicates
a position that does not correspond to a component.
Calling seek with a negative index is legal. It sets the current position to -1 to indicate
no component and returns false. Passing a non-negative index value for a DynAny that does not
have a component at the corresponding position sets the current position to -1 and returns false.

rewind

next

public boolean next()

Advances the current position to the next component.
The operation returns true while the resulting current position indicates a component, false otherwise.
A false return value leaves the current position at -1.
Invoking next on a DynAny without components leaves the current position at -1 and returns false.

component_count

public int component_count()

Returns the number of components of a DynAny.
For a DynAny without components, it returns zero.
The operation only counts the components at the top level.
For example, if component_count is invoked on a DynStruct with a single member,
the return value is 1, irrespective of the type of the member.

For sequences, the operation returns the current number of elements.

For structures, exceptions, and value types, the operation returns the number of members.

For arrays, the operation returns the number of elements.

For unions, the operation returns 2 if the discriminator indicates that a named member is active,
otherwise, it returns 1.

current_component

Returns the DynAny for the component at the current position.
It does not advance the current position, so repeated calls to current_component
without an intervening call to rewind, next, or seek return the same component.
The returned DynAny object reference can be used to get/set the value of the current component.
If the current component represents a complex type, the returned reference can be narrowed
based on the TypeCode to get the interface corresponding to the to the complex type.
Calling current_component on a DynAny that cannot have components,
such as a DynEnum or an empty exception, raises TypeMismatch.
Calling current_component on a DynAny whose current position is -1 returns a nil reference.
The iteration operations, together with current_component, can be used
to dynamically compose an any value. After creating a dynamic any, such as a DynStruct,
current_component and next can be used to initialize all the components of the value.
Once the dynamic value is completely initialized, to_any creates the corresponding any value.

_ids

Retrieves a string array containing the repository identifiers
supported by this ObjectImpl object. For example,
for a stub, this method returns information about all the
interfaces supported by the stub.