Creates a recursive TypeCode object. The parameter passed to create_recursive_tc
specifies the repository id of the recursive type. Any TypeCode that contains a
recursion always requires a corresponding enclosing TypeCode to be a valid.
Otherwise a BAD_TYPECODE exception is thrown.
Example:
struct GraphNode
{
sequence<GraphNode> nodes;
};
The following code sample demonstrates the creation of a TypeCode for struct GraphNode:
string node_id = "IDL:GraphNode:1.0";
Ics.CORBA.TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(node_id));
Ics.CORBA.StructMember[] members = { new Ics.CORBA.StructMember("nodes", recursiveSeqTC, null) };
Ics.CORBA.TypeCode structGraphNodeTC = orb.create_struct_tc(node_id, "GraphNode", members);
The following recursion is illegal:
Struct GraphNode
{
GraphNode next;
};
Recursive types can only appear within sequences.
the newly-created TypeCode object describing a recursive type.
ORB Interface | ORB Members | Ics Namespace