summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-04-30 11:45:05 +1000
committerJed Barber <jjbarber@y7mail.com>2020-04-30 11:45:05 +1000
commitf9bc26ce709fcd83288fb6298741dd10bda66a8b (patch)
treee329246e83cc924fb045de3d20d9ff3034cad461 /src
parentf499d6f1e4d4ac73a4b9fcc42d3ab9281e4f5265 (diff)
Preelaborate and related Pragmas
Diffstat (limited to 'src')
-rw-r--r--src/directed_graphs.adb13
-rw-r--r--src/directed_graphs.ads20
2 files changed, 20 insertions, 13 deletions
diff --git a/src/directed_graphs.adb b/src/directed_graphs.adb
index 7641d75..3446247 100644
--- a/src/directed_graphs.adb
+++ b/src/directed_graphs.adb
@@ -10,19 +10,6 @@ package body Directed_Graphs is
- generic
- type Base_Type is private;
- type Array_Type is array (Positive range <>) of Base_Type;
- with package Type_Vectors is new Ada.Containers.Vectors
- (Index_Type => Positive,
- Element_Type => Base_Type);
- function Vector_To_Array
- (Input : in Type_Vectors.Vector)
- return Array_Type;
-
-
-
-
---------
-- "<" --
---------
diff --git a/src/directed_graphs.ads b/src/directed_graphs.ads
index 826455a..db32902 100644
--- a/src/directed_graphs.ads
+++ b/src/directed_graphs.ads
@@ -34,6 +34,12 @@ generic
package Directed_Graphs is
+ pragma Preelaborate;
+ pragma Remote_Types;
+
+
+
+
subtype Extended_Node_Type is Node_Type'Base
range Node_Type'Pred (Node_Type'First) .. Node_Type'Succ
(Node_Type'Min (Node_Type'Base'Pred (Node_Type'Base'Last), Node_Type'Last));
@@ -64,6 +70,7 @@ package Directed_Graphs is
type Graph is tagged private;
type Cursor is private;
+ pragma Preelaborable_Initialization (Cursor);
No_Element : constant Cursor;
@@ -841,6 +848,19 @@ private
return Cursor;
+
+
+ generic
+ type Base_Type is private;
+ type Array_Type is array (Positive range <>) of Base_Type;
+ with package Type_Vectors is new Ada.Containers.Vectors
+ (Index_Type => Positive,
+ Element_Type => Base_Type);
+ function Vector_To_Array
+ (Input : in Type_Vectors.Vector)
+ return Array_Type;
+
+
end Directed_Graphs;