Skip to main content

Module dynany

Module dynany 

Source
Expand description

DynamicAny: building and taking apart values of types known only by their TypeCode.

A DynAny is a tree of components that follows the TypeCode: a struct, an exception, a sequence, an array, a union, a valuetype or a value box has components, which are DynAnys themselves and share their state with it; the other types have none and hold their value. Every constructed DynAny has a current position, which the insert_* and get_* operations work on.

DynAnyFactory makes DynAnys from an Any or a TypeCode. The operations of the derived interfaces of the IDL (DynStruct, DynUnion…) are all on DynAny; on a DynAny of another kind they are BAD_OPERATION, as a failed narrow would be in a language mapping. DynAny::kind tells which apply.

Valuetype instances that are shared in the value, or refer to each other in cycles, are one DynAny each, reached from every place the instance is; DynAny::to_any gives them back as shared instances. Such cycles keep the DynAnys alive until DynAny::destroy.

Structs§

DynAny
DynamicAny::DynAny and the interfaces derived from it. Clones are the same object, as references are.
DynAnyFactory
DynamicAny::DynAnyFactory, the initial reference DynAnyFactory. It keeps no state.

Enums§

DynAnyError
Why a DynAny operation failed: the exceptions of DynamicAny, or a system exception (OBJECT_NOT_EXIST after DynAny::destroy, BAD_OPERATION for an operation of another kind of DynAny, NO_IMPLEMENT for abstract interfaces).