Skip to content

Instantly share code, notes, and snippets.

@flyx
Last active December 21, 2015 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyx/6257649 to your computer and use it in GitHub Desktop.
Save flyx/6257649 to your computer and use it in GitHub Desktop.
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