Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

IDL member of a structure in C++

When a sequence is declared as a member of a structure, the declarator (assuming the name as dcl) is mapped as three members of the C++ struct:

T* dcl; 
int dclLen; 
int dclLenReq; 

The dclLen member specifies the number of elements of the array dcl. The dclLenReq member is populated with the number of elements required to store the contents of the entire result when the structure is used in an inrout or rout argument; when the structure is used in an in argument, the dclLenReq field is unused. For example:

typedef sequence<long> seqlong;

struct Atm
{
  seqlong sums;
};

is mapped as:

// __seq_int details omitted

struct Atm
{
  int* sums;
  int sumsLen;
  int sumsLenReq;
};

However, if a structure member is also an array, it is mapped using the underlying structure for the sequence. See the description in Broken Link.