Package: Interfaces.CPP

Dependencies

with System;
with System.Storage_Elements;

Description

Definitions for interfacing to C++ classes

Header

package Interfaces.CPP is
 

Type Summary

Vtable_Ptr
Primitive Operations:  Expanded_Name, External_Tag

Other Items:

package S   renames System;

package SSE renames System.Storage_Elements;
This package corresponds to Ada.Tags but applied to tagged types which are 'imported' from C++ and correspond to exactly to a C++ Class. GNAT doesn't know about the structure od the C++ dispatch table (Vtable) but always access it through the procedural interface defined below, thus the implementation of this package (the body) can be customized to another C++ compiler without any change in the compiler code itself as long as this procedural interface is respected. Note that Ada.Tags defines a very similar procedural interface to the regular Ada Dispatch Table.

type Vtable_Ptr is private;

function Expanded_Name (T : Vtable_Ptr) return String;

function External_Tag  (T : Vtable_Ptr) return String;

private

   --  Implementation-defined ...
end Interfaces.CPP;