Ada 编程/库/Ada.Containers.Bounded_Hashed_Maps
外观
此语言特性在 Ada 2012 中引入。
Ada.Containers.Bounded_Hashed_Maps 是自 Ada 2012 以来 预定义语言环境 的一个单元。
-- Standard Ada library specification -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------withAda.Iterator_Interfaces;generictypeKey_Typeisprivate;typeElement_Typeisprivate;withfunctionHash (Key : Key_Type)returnHash_Type;withfunctionEquivalent_Keys (Left, Right : Key_Type)returnBoolean;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Hashed_MapsispragmaPreelaborate(Bounded_Hashed_Maps);pragmaRemote_Types(Bounded_Hashed_Maps);typeMap (Capacity : Count_Type; Modulus : Hash_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Map);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Map :constantMap; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageMap_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : Map)returnBoolean;functionCapacity (Container : Map)returnCount_Type;procedureReserve_Capacity (Container :inoutMap; Capacity :inCount_Type);functionDefault_Modulus (Capacity : Count_Type)returnHash_Type;functionLength (Container : Map)returnCount_Type;functionIs_Empty (Container : Map)returnBoolean;procedureClear (Container :inoutMap);functionKey (Position : Cursor)returnKey_Type;functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutMap; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inElement_Type));procedureUpdate_Element (Container :inoutMap; Position :inCursor; Process :notnullaccessprocedure(Key :inKey_Type; Element :inoutElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinMap; Position :inCursor)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Position :inCursor)returnReference_Type;functionConstant_Reference (Container :aliasedinMap; Key :inKey_Type)returnConstant_Reference_Type;functionReference (Container :aliasedinoutMap; Key :inKey_Type)returnReference_Type;procedureAssign (Target :inoutMap; Source :inMap);functionCopy (Source : Map; Capacity : Count_Type := 0; Modulus : Hash_Type := 0)returnMap;procedureMove (Target :inoutMap; Source :inoutMap);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureInclude (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureReplace (Container :inoutMap; Key :inKey_Type; New_Item :inElement_Type);procedureExclude (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Key :inKey_Type);procedureDelete (Container :inoutMap; Position :inoutCursor);functionFirst (Container : Map)returnCursor;functionNext (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);functionFind (Container : Map; Key : Key_Type)returnCursor;functionElement (Container : Map; Key : Key_Type)returnElement_Type;functionContains (Container : Map; Key : Key_Type)returnBoolean;functionEquivalent_Keys (Left, Right : Cursor)returnBoolean;functionEquivalent_Keys (Left : Cursor; Right : Key_Type)returnBoolean;functionEquivalent_Keys (Left : Key_Type; Right : Cursor)returnBoolean;procedureIterate (Container :inMap; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inMap)returnMap_Iterator_Interfaces.Forward_Iterator'Class;private-- not specified by the languageendAda.Containers.Bounded_Hashed_Maps;
外部示例
[编辑源代码]- 在以下位置搜索
Ada.Containers.Bounded_Hashed_Maps的 **示例**:Rosetta Code,GitHub (gists),任何 Alire 包 或 本 Wikibook。 - 在以下位置搜索与
Ada.Containers.Bounded_Hashed_Maps相关的 **帖子**:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-cbhama.ads
- 主体:a-cbhama.adb
