Previous | Table of Contents | Next |
CORBA structures are mapped to a Pseudo-Struct, which is a Pseudo-Automation Interface containing properties corresponding
to the members of the struct. The names of a Pseudo-Struct’s properties are identical to the names of the corresponding CORBA
struct members.
A Pseudo-Struct derives from DICORBAStruct which, in turn, derives from DIForeignComplexType:
[odl, dual, uuid(...)] interface DICORBAStruct: DIForeignComplexType {}
The GUID for DICORBAStruct is:
{A8B553C1-3B72-11cf-BBFC-444553540000}
This interface can also be implemented as generic (nondual) Automation Interface, in which case it is named DCORBAStruct and
its UUID is:
{E977F901-3B75-11cf-BBFC-444553540000}
The purpose of the methodless DICORBAStruct interface is to mark the interface as having its origin in the mapping of a CORBA
struct. This information, which can be stored in a type library, is essential for the task of mapping the type back to CORBA
in the event of an inverse mapping.
An example of mapping a CORBA struct to a Pseudo-Struct follows. The struct
struct S// IDL
{long l;double d;float f;
};
maps to Automation as follows, except that the mapped Automation Dual Interface derives from DICORBAStruct.
// IDLinterface S{
attribute long l;
attribute double d;
attribute float f;};