OBJECT random_generic IS

 GENERIC PASSIVE

pragmas

PRAGMA inside_op
        (operation_name => --|*|--)
PRAGMA apse
        (APSE => aonix,
         options => --| |--)
PRAGMA init_bloc
        (init_op => initialize)
PRAGMA line_feed
        (option => 1)
PRAGMA line_feed
        (option => 2)

DESCRIPTION

REAL_TIME_ATTRIBUTES

OPERATION Random_Value IS

operation declaration (hood)

Random_Value return Result_Subtype;

OPERATION Initialize IS

operation declaration (hood)

Initialize;

PROVIDED_INTERFACE

OPERATIONS

Random_Value

operation declaration (hood)

Random_Value return Result_Subtype;

REQUIRED_INTERFACE

FORMAL_PARAMETERS
        TYPES
                Result_Subtype;
        CONSTANTS
                NONE
        OPERATION_SETS
                NONE
        OPERATIONS
                NONE

INTERNALS

OPERATIONS

Initialize

operation declaration (hood)

Initialize;

DATA

G

data declaration (ada)

package Ada95_Random is new discrete_random
        (Result_Subtype => Result_Subtype);
G : Ada95_Random.Generator;

data access from pseudo_code

(da) random_generic.G IS USED BY NONE

data access from Ada code

(da) random_generic.G IS USED BY 
        (ob) random_generic [R]
        (op) random_generic.Initialize [R]
        (op) random_generic.Random_Value [R]

data access from C code

(da) random_generic.G IS USED BY NONE

data access from C++ code

(da) random_generic.G IS USED BY NONE

OPERATION_CONTROL_STRUCTURES

OPERATION Random_Value IS

operation body description (text)

Uses Ada95 random generator; hides generator parameters.

operation code (ada)

begin
        return Ada95_Random.Random(Gen => G);

call tree from Ada code

END Random_Value

OPERATION Initialize IS

operation body description (text)

Time dependent initialization

operation code (ada)

begin
        Ada95_Random.Reset(Gen => G);

call tree from Ada code

END Initialize

END random_generic