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


Pragma CPP_Vtable

Syntax:

     pragma CPP_Vtable (
       [Entity      =>] ENTITY,
       [Vtable_Ptr  =>] vtable_ENTITY,
       [Entry_Count =>] static_integer_EXPRESSION);

Given a record to which the pragma CPP_Class applies, this pragma can be specified for each component of type CPP.Interfaces.Vtable_Ptr. Entity is the tagged type, Vtable_Ptr is the record field of type Vtable_Ptr, and Entry_Count is the number of virtual functions on the C++ side. Not all of these functions need to be imported on the Ada side.

You may omit the CPP_Vtable pragma if there is only one Vtable_Ptr component in the record and all virtual functions are imported on the Ada side (the default value for the entry count in this case is simply the total number of virtual functions).

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