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

⟦70c379128⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package Dynamic_Object, seg_0491c6

Derivation

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

E3 Source Code



with T_Value, Text_Io, Bounded_String, Binary_Trees_Pkg;

-- GESTION DES OBJETS DYNAMIQUES
-- (Utilisation et instanciation d un arbre generique)

package Dynamic_Object is

    Error_Attribute_Store : exception;
    Error_Attribute_Index : exception;

    type Dynamic_Object is private;
    type Attribute_Index is private;

    subtype D_File is Text_Io.File_Type;

    Max_Attribute_String : constant := 32;

--NEW_OBJECT
--Creation d un nouvel objet
    procedure New_Object (D : in out Dynamic_Object);

--HAS_ATTRIBUTE
-- teste si un objet dynamique a un attribut specifie en parametre
    function Has_Attribute
                (D : in Dynamic_Object; Name : in String) return Boolean;

--GET_ATTRIBUTE_BY_NAME
-- renvoie la valeur d un attribut dans un objet
    procedure Get_Attribute_By_Name
                 (D : Dynamic_Object; Name : String; V : in out T_Value.Object);

--DUMP_NUMBER_OF_ATTRIBUTE
-- renvoie le nombre d attribut contenu dans un objet dyn.
    procedure Dump_Number_Of_Attribute (D : in Dynamic_Object);

--DUMP_OBJECT_ATTRIBUTES
--  Affichage de l objet dynamique et de son contenu
    procedure Dump_Object_Attributes (D : in Dynamic_Object);

--OBJECT_IMAGE
-- renvoie une chaine decrivant l objet dynamique et son contenu
    function Object_Image (D : in Dynamic_Object) return String;

-- OBJECT_TO_FILE (non implementee)
    procedure Object_To_File (D : Dynamic_Object; F : D_File);

--EQUAL
-- teste l egalite entre deux objet dynamique.
    function Equal (Left, Right : Dynamic_Object) return Boolean;

--STORE_ATTRIBUTE
-- ajout ou reaffectation d une attribut dans un objet dynamique
    procedure Store_Attribute
                 (D : in out Dynamic_Object; Name : String; V : T_Value.Object);
    procedure Store_Attribute
                 (D : in out Dynamic_Object; Name : String; I : Integer);
    procedure Store_Attribute
                 (D : in out Dynamic_Object; Name : String; S : String);
    procedure Store_Attribute
                 (D : in out Dynamic_Object; Name : String; B : Boolean);

-- DELETE_ATTRIBUTE
-- supression d un attribut dans un objet dynamique
    procedure Delete_Attribute (D : in out Dynamic_Object; Name : String);

-- OBJECT_FROM_FILE (pas implementee)
    procedure Object_From_File (D : in out Dynamic_Object; F : D_File);

-- COPY_OBJECT
-- copie en profondeur d un objet dynamique
    procedure Copy_Object (To_Object : in out Dynamic_Object;
                           The_Object : Dynamic_Object);
-- SURFACE_OBJECT
-- copie en surface d un objet dynamique
    procedure Surface_Copy (To_Object : in out Dynamic_Object;
                            The_Object : Dynamic_Object);

--DISPOSE_OBJECT
--destruction d un objet dynamique
    procedure Dispose_Object (D : in out Dynamic_Object);

--GESTIOn D UN OBJET ITERATEUR SUR OBJET DYNAMIQUE
    procedure Open_Attribute_Indexation
                 (D : Dynamic_Object; I : in out Attribute_Index);
    procedure Next_Attribute_Index (I : in out Attribute_Index);
    function Get_Indexed_Attribute_Name (I : Attribute_Index) return String;
    procedure Get_Indexed_Attribute_Value
                 (I : Attribute_Index; V : in out T_Value.Object);
    function No_More_Attributes (I : Attribute_Index) return Boolean;



private
    type Attribute is
        record
            Name : Bounded_String.Variable_String (Max_Attribute_String);
            Value : T_Value.Object;
        end record;


    function Compare (A, B : Attribute) return Integer;
    package Object_Tree is new Binary_Trees_Pkg (Attribute, Compare);

    type Dynamic_Object is
        record
            Node : Object_Tree.Tree;
        end record;

    type Attribute_Index is
        record
            Node : Object_Tree.Iterator;
        end record;

end Dynamic_Object;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=22 rec1=00 rec2=01 rec3=04a
        [0x01] rec0=19 rec1=00 rec2=02 rec3=056
        [0x02] rec0=1a rec1=00 rec2=03 rec3=014
        [0x03] rec0=1f rec1=00 rec2=04 rec3=000
    tail 0x21546774a865b46957e7e 0x42a00088462060003