DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T V

⟦d3a88e34f⟧ TextFile

    Length: 3632 (0xe30)
    Types: TextFile
    Names: »V«

Derivation

└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 

TextFile

with Instance;
with Constant_String;
package Slot_Bak is
    type Kinds is (Integer_Value, Boolean_Value, Float_Value,
                   Character_Value, String_Value, Checked_Enumeration_Value,
                   Unchecked_Enumeration_Value, Class_Value);

    type Object (Kind : Kinds := Integer_Value) is private;   -- record variant

    function Value (I : Integer) return Object;
    function Value (F : Float) return Object;
    function Value (B : Boolean) return Object;
    function Value (C : Character) return Object;
    function Value (S : String) return Object;
    function Value (O : Instance.Reference) return Object;


    function Get (O : Object) return Integer;
    function Get (O : Object) return Boolean;
    function Get (O : Object) return Float;
    function Get (O : Object) return Character;
    function Get (O : Object) return String;
    function Get (O : Object) return Instance.Reference;

    procedure Set (O : in out Object;
                   To : Integer;
                   Changed_Kind : Boolean := False);
    procedure Set (O : in out Object;
                   To : Boolean;
                   Changed_Kind : Boolean := False);
    procedure Set (O : in out Object;
                   To : Float;
                   Changed_Kind : Boolean := False);
    procedure Set (O : in out Object;
                   To : Character;
                   Changed_Kind : Boolean := False);
    procedure Set (O : in out Object;
                   To : String;
                   Changed_Kind : Boolean := False);
    procedure Set (O : in out Object;
                   To : Instance.Reference;
                   Changed_Kind : Boolean := False);


    package Operators is

        function "=" (Left, Right : Object) return Boolean renames Slot."=";
        function Is_Same_Type (Left, Right : Object) return Boolean;
        function "<" (Left, Right : Object) return Boolean;
        function "<=" (Left, Right : Object) return Boolean;
        function ">" (Left, Right : Object) return Boolean;
        function ">=" (Left, Right : Object) return Boolean;

    end Operators;

    function Image (O : Object) return String;

    generic
        Checked : in Boolean := False;
        type Values is (<>);
    package Enumeration_Facilities is
        function Value (E : Values) return Object;
        function Get (O : Object) return Values;
        function Image (O : Object) return String;
        procedure Set (O : in out Object;
                       To : Values;
                       Changed_Kind : Boolean := False);
    end Enumeration_Facilities;

private
    type Object (Kind : Kinds := Integer_Value) is
        record
            case Kind is
                when Integer_Value =>
                    I_Val : Integer := 0;
                when Float_Value =>
                    F_Val : Float := 0.0;
                when Boolean_Value =>
                    B_Val : Boolean := False;
                when Character_Value =>
                    C_Val : Character := Ascii.Nul;
                when String_Value =>
                    S_Val : Constant_String.Object :=
                       Constant_String.Null_Object;
                when Class_Value =>
                    O_Val : Instance.Reference := Instance.Null_Reference;
                when Unchecked_Enumeration_Value =>
                    Ue_Val : Integer := 0;              --'pos
                when Checked_Enumeration_Value =>
                    Ce_Val : Constant_String.Object :=
                       Constant_String.Null_Object;    --'image

            end case;
        end record;
end Slot_Bak;