DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦0815f1eb1⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Models, seg_0491e3, seg_049376

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Fields, Text_Io, Bounded_String, Binary_Trees_Pkg;

-- OBJET Gestion de la table des types (STRUCTURE  ou ENUMERE)
-- (Utilisation et instanciation d un arbre generique)

package Models is
    Error_Model_Store : exception;
    Error_Model_Index : exception;
    Error_Model_Search : exception;

    type Object is limited private;
    type Model_Index is limited private;

    Max_Model_String : constant := 32;

--CREATE
--Creation d un objet table des types
    procedure Create (D : in out Object);

--HAS_MODEL
--teste si un type donnee en parametre existe dans l objet table
    function Has_Model (D : in Object; Name : in String) return Boolean;

--HAS_FIELD_IN_MODEL
--teste si un champs (en param.) existe dans une structure donnee en param.
-- dans l objet table
    function Has_Field_In_Model
                (D : in Object; Model_Name : String; Field_Name : String)
                return Boolean;

--GET_MODEL_TYPE_BY_NAME
-- retourne le type du modele en parametre (STRUCTURE ou ENUMERE)
    function Get_Model_Type_By_Name (D : Object; Name : String) return String;

--GET_FIELD_TYPE_BY_NAME
-- retourne le type d un champs donne en param d une structure dans l objet
    function Get_Field_Type_By_Name
                (D : Object; Model_Name : String; Attribute_Name : String)
                return String;

--GET_MODEL_FIELDS_BY_NAME
-- affecte la variable "F" ,avec la liste des champs contenus dans une
-- structure de la table passee en param
    procedure Get_Model_Fields_By_Name
                 (D : Object; Name : String; F : in out Fields.Object);

--ENUM_IMAGE
-- renvoie un chaine image d une valeur enumeree passee en param. par son
-- nom et sa valeur entiere proportionnelle a sa position dans la liste.
    function Enum_Image (D : Object; Enum_Type : String; Enum_Value : Integer)
                        return String;

--DUMP_MODELS
--Affichage de la table des types.
    procedure Dump_Models (D : in Object);

--DUMP_NUMBER_OF_MODEL
--renvoie le nombre de types definis dans la table
    procedure Dump_Number_Of_Model (D : in Object);

--STORE_MODEL
-- Ajout d un modele de type de donnees dans la table.
    procedure Store_Model (D : in out Object;
                           Aname : String;
                           Atype : String;
                           F : Fields.Object);

--DISPOSE_OBJECT
--Destruction de l objet table de type
    procedure Dispose_Object (D : in out Object);

--Gestion d un OBJET ITERARTEUR de l OBJET TABLE DE TYPE
    procedure Open_Model_Indexation (D : Object; I : in out Model_Index);
    procedure Next_Model_Index (I : in out Model_Index);
    function Get_Indexed_Model_Name (I : Model_Index) return String;
    function Get_Indexed_Model_Type (I : Model_Index) return String;
    procedure Get_Indexed_Model_Fields
                 (I : Model_Index; F : in out Fields.Object);
    function No_More_Models (I : Model_Index) return Boolean;


private
    type Model is
        record
            Model_Name : Bounded_String.Variable_String (Max_Model_String);
            Model_Type : Bounded_String.Variable_String (Max_Model_String);
            Model_Fields : Fields.Object;
        end record;


    function Compare (A, B : Model) return Integer;
    package Models_Tree is new Binary_Trees_Pkg (Model, Compare);

    type Object is
        record
            Node : Models_Tree.Tree;
        end record;

    type Model_Index is
        record
            Node : Models_Tree.Iterator;
        end record;

end Models;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=21 rec1=00 rec2=01 rec3=012
        [0x01] rec0=17 rec1=00 rec2=02 rec3=016
        [0x02] rec0=18 rec1=00 rec2=03 rec3=034
        [0x03] rec0=1a rec1=00 rec2=04 rec3=000
    tail 0x2174d6ea6865b4849cfa3 0x42a00088462060003