Next: , Previous: Pragma Convention_Identifier, Up: Implementation Defined Pragmas

Pragma CPP_Class


     pragma CPP_Class ([Entity =>] local_NAME);

The argument denotes an entity in the current declarative region that is declared as a tagged or untagged record type. It indicates that the type corresponds to an externally declared C++ class type, and is to be laid out the same way that C++ would lay out the type.

If (and only if) the type is tagged, at least one component in the record must be of type Interfaces.CPP.Vtable_Ptr, corresponding to the C++ Vtable (or Vtables in the case of multiple inheritance) used for dispatching.

Types for which CPP_Class is specified do not have assignment or equality operators defined (such operations can be imported or declared as subprograms as required). Initialization is allowed only by constructor functions (see pragma CPP_Constructor).

Pragma CPP_Class is intended primarily for automatic generation using an automatic binding generator tool. See Interfacing to C++ for related information.