Ada 编程/库/Ada.Containers.Bounded_Hashed_Sets
外观
此语言特性是在 Ada 2012 中引入的。
Ada.Containers.Bounded_Hashed_Sets 是自 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;generictypeElement_Typeisprivate;withfunctionHash (Element : Element_Type)returnHash_Type;withfunctionEquivalent_Elements (Left, Right : Element_Type)returnBoolean;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Hashed_SetsispragmaPreelaborate(Bounded_Hashed_Sets);pragmaRemote_Types(Bounded_Hashed_Sets);typeSet (Capacity : Count_Type; Modulus : Hash_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Set);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Set :constantSet; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageSet_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);function"=" (Left, Right : Set)returnBoolean;functionEquivalent_Sets (Left, Right : Set)returnBoolean;functionTo_Set (New_Item : Element_Type)returnSet;functionCapacity (Container : Set)returnCount_Type;procedureReserve_Capacity (Container :inoutSet; Capacity :inCount_Type);functionDefault_Modulus (Capacity : Count_Type)returnHash_Type;functionLength (Container : Set)returnCount_Type;functionIs_Empty (Container : Set)returnBoolean;procedureClear (Container :inoutSet);functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutSet; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Element :inElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinSet; Position :inCursor)returnConstant_Reference_Type;procedureAssign (Target :inoutSet; Source :inSet);functionCopy (Source : Set; Capacity : Count_Type := 0; Modulus : Hash_Type := 0)returnSet;procedureMove (Target :inoutSet; Source :inoutSet);procedureInsert (Container :inoutSet; New_Item :inElement_Type; Position :outCursor; Inserted :outBoolean);procedureInsert (Container :inoutSet; New_Item :inElement_Type);procedureInclude (Container :inoutSet; New_Item :inElement_Type);procedureReplace (Container :inoutSet; New_Item :inElement_Type);procedureExclude (Container :inoutSet; Item :inElement_Type);procedureDelete (Container :inoutSet; Item :inElement_Type);procedureDelete (Container :inoutSet; Position :inoutCursor);procedureUnion (Target :inoutSet; Source :inSet);functionUnion (Left, Right : Set)returnSet;function"or" (Left, Right : Set)returnSetrenamesUnion;procedureIntersection (Target :inoutSet; Source :inSet);functionIntersection (Left, Right : Set)returnSet;function"and" (Left, Right : Set)returnSetrenamesIntersection;procedureDifference (Target :inoutSet; Source :inSet);functionDifference (Left, Right : Set)returnSet;function"-" (Left, Right : Set)returnSetrenamesDifference;procedureSymmetric_Difference (Target :inoutSet; Source :inSet);functionSymmetric_Difference (Left, Right : Set)returnSet;function"xor" (Left, Right : Set)returnSetrenamesSymmetric_Difference;functionOverlap (Left, Right : Set)returnBoolean;functionIs_Subset (Subset : Set; Of_Set : Set)returnBoolean;functionFirst (Container : Set)returnCursor;functionNext (Position : Cursor)returnCursor;procedureNext (Position :inoutCursor);functionFind (Container : Set; Item : Element_Type)returnCursor;functionContains (Container : Set; Item : Element_Type)returnBoolean;functionEquivalent_Elements (Left, Right : Cursor)returnBoolean;functionEquivalent_Elements (Left : Cursor; Right : Element_Type)returnBoolean;functionEquivalent_Elements (Left : Element_Type; Right : Cursor)returnBoolean;procedureIterate (Container :inSet; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inSet)returnSet_Iterator_Interfaces.Forward_Iterator'Class;generictypeKey_Type (<>)isprivate;withfunctionKey (Element : Element_Type)returnKey_Type;withfunctionHash (Key : Key_Type)returnHash_Type;withfunctionEquivalent_Keys (Left, Right : Key_Type)returnBoolean;packageGeneric_KeysisfunctionKey (Position : Cursor)returnKey_Type;functionElement (Container : Set; Key : Key_Type)returnElement_Type;procedureReplace (Container :inoutSet; Key :inKey_Type; New_Item :inElement_Type);procedureExclude (Container :inoutSet; Key :inKey_Type);procedureDelete (Container :inoutSet; Key :inKey_Type);functionFind (Container : Set; Key : Key_Type)returnCursor;functionContains (Container : Set; Key : Key_Type)returnBoolean;procedureUpdate_Element_Preserving_Key (Container :inoutSet; Position :inCursor; Process :notnullaccessprocedure(Element :inoutElement_Type));typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionReference_Preserving_Key (Container :aliasedinoutSet; Position :inCursor)returnReference_Type;functionConstant_Reference (Container :aliasedinSet; Key :inKey_Type)returnConstant_Reference_Type;functionReference_Preserving_Key (Container :aliasedinoutSet; Key :inKey_Type)returnReference_Type;endGeneric_Keys;private-- not specified by the languageendAda.Containers.Bounded_Hashed_Sets;
外部示例
[编辑源代码]- 在以下位置搜索
Ada.Containers.Bounded_Hashed_Sets的 示例:Rosetta Code,GitHub (gists),任何 Alire crate 或 本。 - 在以下位置搜索与
Ada.Containers.Bounded_Hashed_Sets相关的 帖子:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-cbhase.ads
- 主体:a-cbhase.adb
