aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-hooks.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-09-14 21:25:01 +0200
committerTristan Gingold <tgingold@free.fr>2015-09-14 21:25:01 +0200
commit2851e70ffac0e2074a8fc3111410e42c16999bb2 (patch)
tree537e3195dca56834cdaac820d2dfd2b9c7271193 /src/grt/grt-hooks.ads
parent0af83126cae63e9bd71deb924ca1b81c57e590d3 (diff)
downloadghdl-2851e70ffac0e2074a8fc3111410e42c16999bb2.tar.gz
ghdl-2851e70ffac0e2074a8fc3111410e42c16999bb2.tar.bz2
ghdl-2851e70ffac0e2074a8fc3111410e42c16999bb2.zip
grt: add --list-features, and --has-feature
Diffstat (limited to 'src/grt/grt-hooks.ads')
-rw-r--r--src/grt/grt-hooks.ads14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/grt/grt-hooks.ads b/src/grt/grt-hooks.ads
index 20846c7f8..12439088d 100644
--- a/src/grt/grt-hooks.ads
+++ b/src/grt/grt-hooks.ads
@@ -28,7 +28,15 @@ package Grt.Hooks is
type Option_Hook_Type is access function (Opt : String) return Boolean;
type Proc_Hook_Type is access procedure;
+ type Cst_String_Acc is access constant String;
+
type Hooks_Type is record
+ -- A one-line description of the hook. The format is:
+ -- "NAME: description". NAME should be uniq and is tested by the
+ -- switch --has-feature=NAME.
+ -- DESC can be null if there is no interesting feature added.
+ Desc : Cst_String_Acc;
+
-- Called for every unknown command line argument.
-- Return TRUE if handled.
Option : Option_Hook_Type;
@@ -54,6 +62,12 @@ package Grt.Hooks is
-- Register an hook which will call PROC after every non-delta cycles.
procedure Register_Cycle_Hook (Proc : Proc_Hook_Type);
+ -- Display the description of the hooks.
+ procedure Display_Hooks_Desc;
+
+ -- Return True if NAME is present in the list of modules.
+ function Has_Feature (Name : String) return Boolean;
+
-- Call hooks.
function Call_Option_Hooks (Opt : String) return Boolean;
procedure Call_Help_Hooks;