Appendices

Appendix A: Generic Formal Types

The following tables contain examples of available formal types for generics:

Formal type Actual type

Incomplete type

Format: type T;

Any type

Discrete type

Format: type T is (<>);

Any integer, modular or enumeration type

Range type

Format: type T is range <>;

Any signed integer type

Modular type

Format: type T is mod <>;

Any modular type

Floating-point type

Format: type T is digits <>;

Any floating-point type

Binary fixed-point type

Format: type T is delta <>;

Any binary fixed-point type

Decimal fixed-point type

Format: type T is delta <> digits <>;

Any decimal fixed-point type

Definite nonlimited private type

Format: type T is private;

Any nonlimited, definite type

Nonlimited Private type with discriminant

Format: type T (D : DT) is private;

Any nonlimited type with discriminant

Access type

Format: type A is access T;

Any access type for type T

Definite derived type

Format: type T is new B;

Any concrete type derived from base type B

Limited private type

Format: type T is limited private;

Any definite type, limited or not

Incomplete tagged type

Format: type T is tagged;

Any concrete, definite, tagged type

Definite tagged private type

Format: type T is tagged private;

Any concrete, definite, tagged type

Definite tagged limited private type

Format: type T is tagged limited private;

Any concrete definite tagged type, limited or not

Definite abstract tagged private type

Format: type T is abstract tagged private;

Any nonlimited, definite tagged type, abstract or concrete

Definite abstract tagged limited private type

Format: type T is abstract tagged limited private;

Any definite tagged type, limited or not, abstract or concrete

Definite derived tagged type

Format: type T is new B with private;

Any concrete tagged type derived from base type B

Definite abstract derived tagged type

Format: type T is abstract new B with private;

Any tagged type derived from base type B abstract or concrete

Array type

Format: type A is array (R) of T;

Any array type with range R containing elements of type T

Interface type

Format: type T is interface;

Any interface type T

Limited interface type

Format: type T is limited interface;

Any limited interface type T

Task interface type

Format: type T is task interface;

Any task interface type T

Synchronized interface type

Format: type T is synchronized interface;

Any synchronized interface type T

Protected interface type

Format: type T is protected interface;

Any protected interface type T

Derived interface type

Format: type T is new B and I with private;

Any type T derived from base type B and interface I

Derived type with multiple interfaces

Format: type T is new B and I1 and I2 with private;

Any type T derived from base type B and interfaces I1 and I2

Abstract derived interface type

Format: type T is abstract new B and I with private;

Any type T derived from abstract base type B and interface I

Limited derived interface type

Format: type T is limited new B and I with private;

Any type T derived from limited base type B and limited interface I

Abstract limited derived interface type

Format: type T is abstract limited new B and I with private;

Any type T derived from abstract limited base type B and limited interface I

Synchronized interface type

Format: type T is synchronized new SI with private;

Any type T derived from synchronized interface SI

Abstract synchronized interface type

Format: type T is abstract synchronized new SI with private;

Any type T derived from synchronized interface SI

Indefinite version

Many of the examples above can be used for formal indefinite types:

Formal type Actual type

Indefinite incomplete type

Format: type T (<>);

Any type

Indefinite nonlimited private type

Format: type T (<>) is private;

Any nonlimited type indefinite or definite

Indefinite limited private type

Format: type T (<>) is limited private;

Any type, limited or not, indefinite or definite

Incomplete indefinite tagged private type

Format: type T (<>) is tagged;

Any concrete tagged type, indefinite or definite

Indefinite tagged private type

Format: type T (<>) is tagged private;

Any concrete, limited tagged type, indefinite or definite

Indefinite tagged limited private type

Format: type T (<>) is tagged limited private;

Any concrete tagged type, limited or not, indefinite or definite

Indefinite abstract tagged private type

Format: type T (<>) is abstract tagged private;

Any nonlimited tagged type, indefinite or definite, abstract or concrete

Indefinite abstract tagged limited private type

Format: type T (<>) is abstract tagged limited private;

Any tagged type, limited or not, indefinite or definite abstract or concrete

Indefinite derived tagged type

Format: type T (<>) is new B with private;

Any tagged type derived from base type B, indefinite or definite

Indefinite abstract derived tagged type

Format: type T (<>) is abstract new B with private;

Any tagged type derived from base type B, indefinite or definite abstract or concrete

The same examples could also contain discriminants. In this case, (<>) is replaced by a list of discriminants, e.g.: (D: DT).

Appendix B: Containers

The following table shows all containers available in Ada, including their versions (standard, bounded, unbounded, indefinite):

Category Container Std Bounded Unbounded Indefinite
Vector Vectors Y Y   Y
List Doubly_Linked_Lists Y Y   Y
Map Hashed_Maps Y Y   Y
Map Ordered_Maps Y Y   Y
Set Hashed_Sets Y Y   Y
Set Ordered_Sets Y Y   Y
Tree Multiway_Trees Y Y   Y
Generic Holders       Y
Queue Synchronized_Queue_Interfaces Y      
Queue Synchronized_Queues   Y Y  
Queue Priority_Queues   Y Y  

The following table presents the prefixing applied to the container name that depends on its version. As indicated in the table, the standard version does not have a prefix associated with it.

Version Naming prefix
Std  
Bounded Bounded_
Unbounded Unbounded_
Indefinite Indefinite_