From 98a66242abe688d852ec46f4298a364fc0124995 Mon Sep 17 00:00:00 2001 From: Niclas Eklund Date: Tue, 14 Dec 2010 15:46:57 +0100 Subject: Support for recursive unions and structs. Break loop if recursive TypeCode. --- lib/orber/doc/src/ch_idl_to_erlang_mapping.xml | 37 +++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) (limited to 'lib/orber/doc/src/ch_idl_to_erlang_mapping.xml') diff --git a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml index a97ad65f0e..964ae3e92d 100644 --- a/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml +++ b/lib/orber/doc/src/ch_idl_to_erlang_mapping.xml @@ -4,7 +4,7 @@
- 19972009 + 19972010 Ericsson AB. All Rights Reserved. @@ -445,7 +445,19 @@ void op(in myEnum a);
Struct Data Type

A struct may have Basic, Template, Scoped Names and Constructed - types as members.

+ types as members. By using forward declaration we can define a recursive struct:

+ myStructSeq; +struct myStruct { + myStructSeq chain; +}; + +// Deprecated definition (anonymous) not supported by IC +struct myStruct { + sequence chain; +}; + ]]>
@@ -510,6 +522,25 @@ union LongUnion2 switch(long) { default: boolean DefaultValue; }; +

In the same way as structs, unions can be recursive if forward + declaration is used (anonymous types is deprecated and not supported):

+ myUnionSeq; +union myUnion switch (long) { + case 1 : myUnionSeq chain; + default: boolean DefaultValue; +}; + ]]> + + +

Recursive types (union and struct) require Light IFR. I.e. the + IC option {light_ifr, true} is used and that Orber is configured in such a way that + Light IFR is activated. Recursive TypeCode is currently not supported, which is + why these cannot be encapsulated in an any data type.

+
+

Every field in, for example, a struct must be initiated. Otherwise @@ -890,7 +921,7 @@ attribute long RWAttribute; object internal state with its object reference. The object internal state is an Erlang term which has a format defined by the user.

-

It is is not always the case that the internal state will be the first parameter, as stubs can use their own object reference as the first parameter (see the IC documentation).

+

It is not always the case that the internal state will be the first parameter, as stubs can use their own object reference as the first parameter (see the IC documentation).

A function call will invoke an operation. The first parameter of the function should be the object reference and then -- cgit v1.2.3