summaryrefslogtreecommitdiff
path: root/src/ada-containers-directed_graphs.ads
blob: 6d0a2b0e53f0474044587134bedc90003a60809e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69


with

    Ada.Iterator_Interfaces;

private with

    Ada.Containers.Helpers,
    Ada.Finalization,
    Ada.Streams;
    --  maps? sets?


generic
    with Node_Type is (<>);
    with Node_Array_Type is array (Positive) of Node_Type;

    with Node_Label_Type is private;
    with Edge_Label_Type is private;

package Ada.Containers.Directed_Graphs is


    subtype Extended_Node_Type is Node_Type'Base
        range Node_Type'First - 1 ..
              Node_Type'Min (Node_Type'Base'Last - 1, Node_Type'Last) + 1;

    subtype Path is Node_Array_Type;

    type Edge_Type is record
        From : Node_Type;
        To   : Node_Type;
    end record;

    type Edge_Array_Type is array (Positive) of Edge_Type;

    type Graph is tagged private;

    type Cursor is private;




    type Node_Label_Constant_Reference_Type
        (Element : not null access constant Node_Label_Type) is private
    with
        Implicit_Dereference => Element;

    type Node_Label_Reference_Type (Element : not null access Node_Label_Type) is private
    with
        Implicit_Dereference => Element;

    type Edge_Label_Constant_Reference_Type
        (Element : not null access constant Edge_Label_Type) is private
    with
        Implicit_Dereference => Element;

    type Edge_Label_Reference_Type (Element : not null access Edge_Label_Type) is private
    with
        Implicit_Dereference => Element;


private


end Ada.Containers.Directed_Graphs;