Overview | Creates a tk_recursive_sequence TypeCode. |
Original class | CORBA::ORB |
Exceptions | CORBA::SystemException |
Intended Usage
This method is used to create a TypeCode of kind tk_recursive_sequence, representing a recursive IDL sequence. (A recursive sequence is one whose element type matches a type in which the recursive sequence is nested. For example, if IDL struct A contains a sequence of A, then the sequence is a recursive sequence.) The result of this method is used to construct other TypeCodes.
See also the CORBA::ORB::create_sequence_tc method, for creating TypeCodes describing non-recursive IDL sequences.
Syntax
CORBA::TypeCode_ptr create_recursive_sequence_tc ( CORBA::ULong bound, CORBA::ULong offset);
Input parameters
struct foo1 { long value; sequence <foo1> chain; }; struct foo2 { long value1; long value2; sequence <foo2> chain; }; struct foo3 { struct foo4 { sequence <foo4> chain; }; };
while the sequences in the following example has an offset of two:
struct foo4 { struct foo5 { sequence <foo4> chain; }; };
Return values
Example
/* Code to create a tk_recursive_sequence TypeCode corresponding to this IDL definition: struct my_struct { long my_long; sequence my_seq; }; */ /* assume op initialized */ extern CORBA::ORB_ptr op; CORBA::TypeCode_ptr tc = op->create_recursive_sequence_tc (3, 1);