Create and manipulate dynamic arrays
Date/Time of Processing: Tuesday 24 May 1994 12:55:23Pm Overall Assessment of System: OK Classification of System: A Basis of Classification -- Syntax Errors PASS Completeness PASS Independence from External Libraries PASS Independence from a Specific Ada Compiler PASS Number of ... Files 2 Library Units 2 Lines 846 Statements 214 Comments 310
languages/ada/asr/abstractions/darray: File Name Size --------- ---- darray.zip 7,046 Totals ============== ============== 1 Files 7,046
This generic package provides a dynamic array (DARRAY) abstract data type. A DARRAY has completely dynamic bounds, which change during runtime as elements are added to and removed from the darray. DARRAYs are similar to DEQUEs, differing only in that operations for indexing into the DARRAY structure are also provided. A DARRAY is indexed by integers that fall within the current bounds. The component type, ELEM_TYPE, of a DARRAY is a generic formal along with a function, EQUAL, that is assumed to form an equality relation over ELEM_TYPE. The following is a list of operations: Constructors: Create Create a new DARRAY object Array_to_Darry Create a DARRAY from an array Set_First Select an elements as the first Add_Low, Add_High Add elements to a DARRAY Remove_Low, Remove_High Remove elements from a DARRAY Store Replace a particular DARRAY element Copy, Copy_Deep Create a copy of a DARRAY object Query Operations: Fetch Obtain an element from a DARRAY object Low, High Get indices of first or last DARRAY elements First, Last Obtain first or last element of a DARRAY Is_Empty Return TRUE if a DARRAY is empty Length Return number of elements in a DARRAY Equal Return TRUE if two DARRAYs are equal Iterators: Make_Elements_Iter Create an iterator for a DARRAY More, Next Iteration functions Heap Management: Destroy Return space consumed by a DARRAY object ABSTRACTIONS is used by NOSC/WIS tools 5.1.1, 5.1.2, 6.1.2, and 6.2. See also NEW_ABSTRACTIONS.
DATE VERSION AUTHOR HISTORY 03/85 1.0 Bill Toscano Initial Release
This prologue must be included in all copies of this software. This software is copyright by the author. This software is released to the Ada community. This software is released to the Public Domain (note: software released to the Public Domain is not subject to copyright protection). Restrictions on use or distribution: NONE
This software and its documentation are provided "AS IS" and without any expressed or implied warranties whatsoever. No warranties as to performance, merchantability, or fitness for a particular purpose exist. The user is advised to test the software thoroughly before relying on it. The user must assume the entire risk and liability of using this software. In no event shall any person or organization of people be held responsible for any direct, indirect, consequential or inconsequential damages or lost profits.