Ada 编程/库/Ada.Containers.Indefinite Hashed Sets
外观
此语言功能仅从 Ada 2005 开始可用。
Ada.Containers.Indefinite_Hashed_Sets 是自 Ada 2005 以来 预定义语言环境 的一个单元。
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <reznikmm@gmail.com> -- 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 -- -------------------------------------------------------------------------generictypeElement_Type (<>)isprivate;withfunctionHash (Element :inElement_Type)returnHash_Type;withfunctionEquivalent_Elements (Left :inElement_Type; Right :inElement_Type)returnBoolean;withfunction"=" (Left :inElement_Type; Right :inElement_Type)returnBooleanis<>;packageAda.Containers.Indefinite_Hashed_SetsispragmaPreelaborate (Indefinite_Hashed_Sets);typeSetistaggedprivate;pragmaPreelaborable_Initialization (Set);typeCursorisprivate;pragmaPreelaborable_Initialization (Cursor); Empty_Set :constantSet; No_Element :constantCursor;function"=" (Left :inSet; Right :inSet)returnBoolean;functionEquivalent_Sets (Left :inSet; Right :inSet)returnBoolean;functionTo_Set (New_Item :inElement_Type)returnSet;functionCapacity (Container :inSet)returnCount_Type;procedureReserve_Capacity (Container :inoutSet; Capacity :inCount_Type);functionLength (Container :inSet)returnCount_Type;functionIs_Empty (Container :inSet)returnBoolean;procedureClear (Container :inoutSet);functionElement (Position :inCursor)returnElement_Type;procedureReplace_Element (Container :inoutSet; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Element :inElement_Type));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 :inSet; Right :inSet)returnSet;function"or" (Left :inSet; Right :inSet)returnSetrenamesUnion;procedureIntersection (Target :inoutSet; Source :inSet);functionIntersection (Left :inSet; Right :inSet)returnSet;function"and" (Left :inSet; Right :inSet)returnSetrenamesIntersection;procedureDifference (Target :inoutSet; Source :inSet);functionDifference (Left :inSet; Right :inSet)returnSet;function"-" (Left :inSet; Right :inSet)returnSetrenamesDifference;procedureSymmetric_Difference (Target :inoutSet; Source :inSet);functionSymmetric_Difference (Left :inSet; Right :inSet)returnSet;function"xor" (Left :inSet; Right :inSet)returnSetrenamesSymmetric_Difference;functionOverlap (Left :inSet; Right :inSet)returnBoolean;functionIs_Subset (Subset :inSet; Of_Set :inSet)returnBoolean;functionFirst (Container :inSet)returnCursor;functionNext (Position :inCursor)returnCursor;procedureNext (Position :inoutCursor);functionFind (Container :inSet; Item :inElement_Type)returnCursor;functionContains (Container :inSet; Item :inElement_Type)returnBoolean;functionHas_Element (Position :inCursor)returnBoolean;functionEquivalent_Elements (Left :inCursor; Right :inCursor)returnBoolean;functionEquivalent_Elements (Left :inCursor; Right :inElement_Type)returnBoolean;functionEquivalent_Elements (Left :inElement_Type; Right :inCursor)returnBoolean;procedureIterate (Container :inSet; Process :notnullaccessprocedure(Position :inCursor));generictypeKey_Type (<>)isprivate;withfunctionKey (Element :inElement_Type)returnKey_Type;withfunctionHash (Key :inKey_Type)returnHash_Type;withfunctionEquivalent_Keys (Left :inKey_Type; Right :inKey_Type)returnBoolean;packageGeneric_KeysisfunctionKey (Position :inCursor)returnKey_Type;functionElement (Container :inSet; Key :inKey_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 :inSet; Key :inKey_Type)returnCursor;functionContains (Container :inSet; Key :inKey_Type)returnBoolean;procedureUpdate_Element_Preserving_Key (Container :inoutSet; Position :inCursor; Process :notnullaccessprocedure(Element :inoutElement_Type));endGeneric_Keys;privatetypeSetistaggednullrecord; Empty_Set :constantSet := (nullrecord);typeCursorisnullrecord; No_Element :constantCursor := (nullrecord);endAda.Containers.Indefinite_Hashed_Sets;
外部示例
[编辑源代码]- 在以下位置搜索 示例
Ada.Containers.Indefinite_Hashed_Sets:Rosetta Code,GitHub (gists),任何 Alire 包 或 此。 - 在以下位置搜索 帖子 与
Ada.Containers.Indefinite_Hashed_Sets相关:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-cihase.ads
- 主体:a-cihase.adb
drake
