Last active
December 21, 2015 05:29
-
-
Save flyx/6257649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with Ada.Containers.Vectors; | |
with Ada.Containers.Hashed_Maps; | |
generic | |
type Key_Type is private; | |
with package Element_Vectors is new Ada.Containers.Vectors (<>); | |
with function Hash (Key : Key_Type) return Ada.Containers.Hash_Type; | |
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean; | |
package Multimaps is | |
package Parent is new Ada.Containers.Hashed_Maps | |
(Key_Type, Element_Vectors.Vector, Hash, Equivalent_Keys, Element_Vectors."="); | |
type Multimap is new Parent.Map with private; | |
procedure Insert (Container : in out Multimap; | |
Key : in Key_Type; | |
New_Item : in Element_Vectors.Element_Type); | |
-- import Cursor type and functionality | |
subtype Cursor is Parent.Cursor; | |
use type Cursor; | |
private | |
type Multimap is new Parent.Map with null record; | |
end Multimaps; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment