org.omg.DynamicAny
Interface DynAnyFactoryOperations

All Known Subinterfaces:
DynAnyFactory
All Known Implementing Classes:
_DynAnyFactoryStub

public interface DynAnyFactoryOperations

Defines the operations, applicable for DynAnyFactory. These operations produce new DynAny's either from Any, serving as a template and value provider, or from the given typecode.


Method Summary
 DynAny create_dyn_any_from_type_code(TypeCode type)
          Create DynAny for holding the data of the given type.
 DynAny create_dyn_any(Any value)
          Create DynAny using the given Any as template.
 

Method Detail

create_dyn_any_from_type_code

DynAny create_dyn_any_from_type_code(TypeCode type)
                                     throws InconsistentTypeCode
Create DynAny for holding the data of the given type. The returned DynAny is initialised to its agreed default value. The agreed default values are:
Type Value Creates
boolean false DynAny
numeric types, octet, fixed 0 DynAny
char, wchar (char) 0 DynAny
string, wstring empty string ("", not null) DynAny
Any Any with no value and typecode of kind TCKind.tk_null DynAny
Sequence Empty (zero size) sequence DynSequence
Array All members of array are recursively initialised to default values. DynArray
Structure, exception All fields of the structure (if any) are recursively initialised to default values. DynStruct
Enumeration Default value, indicated by typecode. DynEnum
Union Default variant (indicated by typecode), recursively initialised to its default value. DynUnion
Value, ValueBox null DynValue, DynValueBox
TypeCode Typecode of kind TCKind.tk_null DynValue, DynValueBox

Parameters:
type - the type of the data being stored.
Returns:
the created DynAny, having the passed type.
Throws:
InconsistentTypeCode - if type.kind() is tk_Principal, tk_native or tk_abstract_interface. These types cannot be stored in DynAny.

create_dyn_any

DynAny create_dyn_any(Any value)
                      throws InconsistentTypeCode
Create DynAny using the given Any as template.

Parameters:
value - the Any, providing type and value for the DynAny being created.
Returns:
the created DynAny, having the same type and storing the same value as the passed Any.
Throws:
InconsistentTypeCode - if value.type().kind() is tk_Principal, tk_native or tk_abstract_interface. These types cannot be stored in DynAny.