Ada 编程/库/Ada.Containers.Bounded_Multiway_Trees
外观
此语言功能已在 Ada 2012 中引入。
Ada.Containers.Bounded_Multiway_Trees 是自 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;withfunction"=" (Left, Right : Element_Type)returnBooleanis<>;packageAda.Containers.Bounded_Multiway_TreesispragmaPure(Bounded_Multiway_Trees);pragmaRemote_Types(Bounded_Multiway_Trees);typeTree (Capacity : Count_Type)istaggedprivatewithConstant_Indexing => Constant_Reference, Variable_Indexing => Reference, Default_Iterator => Iterate, Iterator_Element => Element_Type;pragmaPreelaborable_Initialization(Tree);typeCursorisprivate;pragmaPreelaborable_Initialization(Cursor); Empty_Tree :constantTree; No_Element :constantCursor;functionHas_Element (Position : Cursor)returnBoolean;packageTree_Iterator_InterfacesisnewAda.Iterator_Interfaces (Cursor, Has_Element);functionEqual_Subtree (Left_Position : Cursor; Right_Position: Cursor)returnBoolean;function"=" (Left, Right : Tree)returnBoolean;functionIs_Empty (Container : Tree)returnBoolean;functionNode_Count (Container : Tree)returnCount_Type;functionSubtree_Node_Count (Position : Cursor)returnCount_Type;functionDepth (Position : Cursor)returnCount_Type;functionIs_Root (Position : Cursor[[Ada Programming|]]returnBoolean;functionIs_Leaf (Position : Cursor)returnBoolean;functionRoot (Container : Tree)returnCursor;procedureClear (Container :inoutTree);functionElement (Position : Cursor)returnElement_Type;procedureReplace_Element (Container :inoutTree; Position :inCursor; New_Item :inElement_Type);procedureQuery_Element (Position :inCursor; Process :notnullaccessprocedure(Element :inElement_Type));procedureUpdate_Element (Container :inoutTree; Position :inCursor; Process :notnullaccessprocedure(Element :inoutElement_Type));typeConstant_Reference_Type (Element :notnullaccessconstantElement_Type)isprivatewithImplicit_Dereference => Element;typeReference_Type (Element :notnullaccessElement_Type)isprivatewithImplicit_Dereference => Element;functionConstant_Reference (Container :aliasedinTree; Position :inCursor)returnConstant_Reference_Type;functionReference (Container :aliasedinoutTree; Position :inCursor)returnReference_Type;procedureAssign (Target :inoutTree; Source :inTree);functionCopy (Source : Tree; Capacity : Count_Type := 0)returnTree;procedureMove (Target :inoutTree; Source :inoutTree);procedureDelete_Leaf (Container :inoutTree; Position :inoutCursor);procedureDelete_Subtree (Container :inoutTree; Position :inoutCursor);procedureSwap (Container :inoutTree; I, J :inCursor);functionFind (Container : Tree; Item : Element_Type)returnCursor;functionFind_In_Subtree (Position : Cursor; Item : Element_Type)returnCursor;functionAncestor_Find (Position : Cursor; Item : Element_Type)returnCursor;functionContains (Container : Tree; Item : Element_Type)returnBoolean;procedureIterate (Container :inTree; Process :notnullaccessprocedure(Position :inCursor));procedureIterate_Subtree (Position :inCursor; Process :notnullaccessprocedure(Position :inCursor));functionIterate (Container :inTree)returnTree_Iterator_Interfaces.Forward_Iterator'Class;functionIterate_Subtree (Position :inCursor)returnTree_Iterator_Interfaces.Forward_Iterator'Class;functionChild_Count (Parent : Cursor)returnCount_Type;functionChild_Depth (Parent, Child : Cursor)returnCount_Type;procedureInsert_Child (Container :inoutTree; Parent :inCursor; Before :inCursor; New_Item :inElement_Type; Count :inCount_Type := 1);procedureInsert_Child (Container :inoutTree; Parent :inCursor; Before :inCursor; New_Item :inElement_Type; Position :outCursor; Count :inCount_Type := 1);procedureInsert_Child (Container :inoutTree; Parent :inCursor; Before :inCursor; Position :outCursor; Count :inCount_Type := 1);procedurePrepend_Child (Container :inoutTree; Parent :inCursor; New_Item :inElement_Type; Count :inCount_Type := 1);procedureAppend_Child (Container :inoutTree; Parent :inCursor; New_Item :inElement_Type; Count :inCount_Type := 1);procedureDelete_Children (Container :inoutTree; Parent :inCursor);procedureCopy_Subtree (Target :inoutTree; Parent :inCursor; Before :inCursor; Source :inCursor);procedureSplice_Subtree (Target :inoutTree; Parent :inCursor; Before :inCursor; Source :inoutTree; Position :inoutCursor);procedureSplice_Subtree (Container:inoutTree; Parent :inCursor; Before :inCursor; Position :inCursor);procedureSplice_Children (Target :inoutTree; Target_Parent :inCursor; Before :inCursor; Source :inoutTree; Source_Parent :inCursor);procedureSplice_Children (Container :inoutTree; Target_Parent :inCursor; Before :inCursor; Source_Parent :inCursor);functionParent (Position : Cursor)returnCursor;functionFirst_Child (Parent : Cursor)returnCursor;functionFirst_Child_Element (Parent : Cursor)returnElement_Type;functionLast_Child (Parent : Cursor)returnCursor;functionLast_Child_Element (Parent : Cursor)returnElement_Type;functionNext_Sibling (Position : Cursor)returnCursor;functionPrevious_Sibling (Position : Cursor)returnCursor;procedureNext_Sibling (Position :inoutCursor);procedurePrevious_Sibling (Position :inoutCursor);procedureIterate_Children (Parent :inCursor; Process :notnullaccessprocedure(Position :inCursor));procedureReverse_Iterate_Children (Parent :inCursor; Process :notnullaccessprocedure(Position :inCursor));functionIterate_Children (Container :inTree; Parent :inCursor)returnTree_Iterator_Interfaces.Reversible_Iterator'Class;private-- not specified by the languageendAda.Containers.Bounded_Multiway_Trees;
外部示例
[编辑源代码]- 在以下位置搜索 示例:
Ada.Containers.Bounded_Multiway_Trees:Rosetta Code,GitHub (gists),任何 Alire 包 或 此。 - 在以下位置搜索 帖子:
Ada.Containers.Bounded_Multiway_Trees:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-cbmutr.ads
- 主体:a-cbmutr.adb
