Index

Package: Maps

Description

package Alog.Maps is
Alog maps package. Provides map data types.

Classes

Wildcard_Level_Map

type Wildcard_Level_Map is tagged private;
A map of loglevels with string as key type.

Types

Cursor

type Cursor is private;
Index for a map element.

Constants & Global variables

Wildcard (Character)

Wildcard   : constant Character := '*';
Character used as wildcard indicator in lookups.

Subprograms & Entries

Element

function Element 
(Map: Wildcard_Level_Map;
Key: String) return Log_Level;
Returns the loglevel element for given key.

Element

function Element 
(Position: Cursor) return Log_Level;
Returns the loglevel element at given position.

Find

function Find 
(Map: Wildcard_Level_Map;
Key: String) return Cursor;
Returns the position for an element with specified key. If no element is found No_Element is returned.

Lookup

function Lookup 
(Map: Wildcard_Level_Map;
Key: String) return Cursor;
Returns the position of the element with the closest match to given key. This function considers wildcards when searching for an element. Example: Key | Element ------------------- Foo.* | Debug Foo.Bar | Alert A lookup for "Foo.Foo" has no exact match. The next closest match is "Foo.*" which will return the Debug element. Looking for "Foo" will return Debug since it matches the wildcard "Foo.*". If no exact and wildcard match is found No_Element is returned.

Insert

procedure Insert 
(Map: in out Wildcard_Level_Map;
Key: String;
Item: Log_Level);
Insert given key/item pair into map. If given key is already present the associated item is replaced.

Clear

procedure Clear 
(Map: in out Wildcard_Level_Map);
Clears the wildcard map.

Length

function Length 
(Map: Wildcard_Level_Map) return Natural;
Return the number of elements in the map.