Flesh out library idea some more
This commit is contained in:
parent
a0cd38fb82
commit
c1304e9714
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
lib/
|
||||
obj/
|
||||
|
|
@ -6,6 +6,14 @@ package Argument_Parser is
|
|||
|
||||
function Parse (I : String) return Option is abstract;
|
||||
|
||||
type Argument_Parser is tagged private;
|
||||
|
||||
function Parse (T : Argument_Parser) return Boolean;
|
||||
|
||||
function Find (T : Argument_Parser; Key : String) return Option'Class;
|
||||
|
||||
type Count is range 0 .. 2**31 - 1;
|
||||
|
||||
procedure Add_Positional (
|
||||
Parser : in out Argument_Parser;
|
||||
Input_Type : Option'Class;
|
||||
|
|
@ -37,6 +45,8 @@ package Argument_Parser is
|
|||
overriding
|
||||
function Parse (I : String) return String_Option;
|
||||
|
||||
function Value (O : String_Option) return String;
|
||||
|
||||
type Integer_Option is new Option with
|
||||
record
|
||||
Value : Integer;
|
||||
|
|
@ -45,6 +55,8 @@ package Argument_Parser is
|
|||
overriding
|
||||
function Parse (I : String) return Integer_Option;
|
||||
|
||||
function Value (O : Integer_Option) return Integer;
|
||||
|
||||
type Float_Option is new Option with
|
||||
record
|
||||
Value : Float;
|
||||
|
|
@ -53,6 +65,8 @@ package Argument_Parser is
|
|||
overriding
|
||||
function Parse (I : String) return Float_Option;
|
||||
|
||||
function Value (O : Float_Option) return Float;
|
||||
|
||||
private
|
||||
|
||||
type Argument_Parser is tagged null record;
|
||||
9
argument_parser.gpr
Normal file
9
argument_parser.gpr
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
library project Argument_Parser is
|
||||
|
||||
for Source_Dirs use ("Source/Spec", "Source/Impl");
|
||||
for Object_Dir use "obj";
|
||||
for Library_Name use "Argument_Parser";
|
||||
for Library_Dir use "lib";
|
||||
for Library_Kind use "Static";
|
||||
|
||||
end Argument_Parser;
|
||||
Loading…
Reference in New Issue
Block a user