Package Dict_TDA
Author
Julien Burdy &Vincent Decorges
Date
22.4.02
Description
A dictionary abstract data type implemantation
File name
dict_tda.ads
Clauses
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Context clauses
Ada.Text_IO
Use clauses
Ada.Text_IO
Basic Objects
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Basic Objects
Name
Type
Default
Empty_Dict
Dict_Type
constant
An empty dictionary
Definitions
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Types
Name
Declaration
Dict_Type
private
Exceptions
Key_Error
The key doesn't exist
Subprograms
Quick access :
Clauses
-
Generics
-
Definitions
-
Subprograms
Insert
procedure
Name : Insert
Purpose : Insert an entry in the dictonary
in out : L : A dictionary
in : Key : Name of a key
in : Value : Value asociate with the key
Parameter name
Type
Mode
Default
L
Dict_Type
in out
Value
String
in
Key
String
in
Delete
procedure
Name : Delete
Purpose : Delete a key and its value of the dictionary
Raise Key_Error, if the key does not exist
in out : L : A dictionary
in : Key : Name of a key
Parameter name
Type
Mode
Default
L
Dict_Type
in out
Key
String
in
Update
procedure
Name : Update
Purpose : Update the value of a key
if the key does not exist, insert the key
in the dictionary
in out : L : A dictionary
in : Key : Name of a key
in : Value : A value
Parameter name
Type
Mode
Default
L
Dict_Type
in out
Value
String
in
Key
String
in
Empty
procedure
Name : Empty
Purpose : Empty the dictionary
in out : L : A dictionary
return : Dict_Type
Parameter name
Type
Mode
Default
L
Dict_Type
in out
Is_Empty
function
Return
Boolean
Name : Is_Empty
Purpose : Return true if the dictionary is empty
in out : L : A dictionary
return : Boolean
Parameter name
Type
Mode
Default
L
Dict_Type
in
Exist
function
Return
Boolean
Name : Exist
Purpose : Return true if a key exist in the dictionary
in : L : A dictionary
in : Key : Name of a key
return : Boolean
Parameter name
Type
Mode
Default
L
Dict_Type
in
Key
String
in
Value_Of
function
Return
String
Name : Exist
Purpose : Return the value of a key
If the key don't exist return a null string ("")
in : L : A dictionary
in : Key : Name of a key
return : String
Parameter name
Type
Mode
Default
L
Dict_Type
in
Key
String
in
Copy_Of
function
Return
Dict_Type
Name : Copy_Of
Purpose : Return a copy of L
in : L : A dictionary
return : Dict_Type
Parameter name
Type
Mode
Default
L
Dict_Type
in
Put
procedure
Name : Put
Purpose : Put the dictionary
in : L : A dictionary
Parameter name
Type
Mode
Default
L
Dict_Type
in
Target
File_Type
in
Standard_Output
Run_Through
procedure
Name : Run_Through
Purpose : Run through the dict and call treat for each Key
in : L : A dictionary
Generic parameters
with procedure Treat (Key : in String; Value : in String)
Operation to do for each key
Parameter name
Type
Mode
Default
L
Dict_Type
in