ORB::create_recursive_sequence_tc

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

bound
The bound of the IDL sequence. Zero designates an unbounded sequence.
offset
Indicates which enclosing TypeCode describes the elements of the recursive sequence. It is the level of nesting of the sequence in the type that matches the sequence's elements. For example, the sequences in the following examples all have an offset of one:
  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

CORBA::TypeCode_ptr
The newly-created TypeCode. The caller assumes ownership of this TypeCode., and should subsequently release it using CORBA::release(TypeCode_ptr).

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);

Related reference
CORBA module



Searchable topic ID:   rcor_modo17
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/ref/rcor_modo17.html

Library | Support | Terms of Use | Feedback