Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

uarray(3u) [debian man page]

UArray(3U)						    InterViews Reference Manual 						UArray(3U)

NAME
UArray - dynamic array class SYNOPSIS
#include <Unidraw/uarray.h> DESCRIPTION
UArray implements a dynamic array, that is, one that grows as elements are added. It can also act as a linked list, allowing insertion and removal of objects, though the overhead for such operations is generally greater than that for conventional doubly-linked list implementa- tions. However, the overhead per stored object is potentially much less for a UArray, and objects can be accessed by index in constant time. PUBLIC OPERATIONS
UArray(int = 16) Create a new UArray instance, optionally providing an estimate of its maximum size. While specifying the size is not required, sup- plying an accurate estimate will improve performance. void*& operator[](int index) Overloading the brackets operator allows access to the UArray's elements with the standard array notation. Note that type informa- tion is lost when retrieving objects from the UArray, requiring casting. void Insert(void*, int index) void Remove(int index) Insert and remove an object at a particular index, moving the succeeding objects up or down one position as required. int Index(void*) Return the given object's index in the UArray, returning -1 if the object does not appear in the UArray. int Count() Return the number of objects inserted in the UArray. void Clear() Clear the UArray, reducing the number of object it contains to zero. Unidraw 6 August 1990 UArray(3U)

Check Out this Related Man Page

UList(3U)						    InterViews Reference Manual 						 UList(3U)

NAME
UList - circular, doubly-linked list class SYNOPSIS
#include <Unidraw/ulist.h> DESCRIPTION
UList implements a circular, doubly-linked list. The sentinel and each entry in the list are instances of the UList class, each containing a void pointer to the data they contain as well as pointers to the next and previous UList instance in the list. The sentinel UList instance is considered to represent the list. PUBLIC OPERATIONS
UList(void* = nil) Create a new UList instance, optionally supplying the value for the void pointer it stores. virtual ~UList() Delete the entire list. Normally the sentinel, which represents the list, is the entry that is deleted explicitly. Note that the data on the list, stored as void*'s, cannot be deleted in this manner. void Append(UList*) void Prepend(UList*) When performed on the sentinel, Append appends an element to the end of the list and Prepend prepends it to the beginning of the list. When performed on a UList instance other than the sentinel, Append has the effect of inserting its argument before the instance, while Prepend has the effect of inserting it after the instance. void Remove(UList*) Unlink the specified UList instance from the list it is in. The object on which this operation is called is irrelevant. void Delete(void*) Find the UList instance in this list containing the given void pointer, remove it from the list it is in, and delete it. UList* Find(void*) Return the UList instance in this list containing the given void pointer. UList* First() UList* Last() UList* End() UList* Next() UList* Prev() Return various UList instance in the list relative to this, i.e., as if it were the sentinel. End returns the sentinel (this) and is useful for detecting the end of an iteration through the list; the other operations are self-explanatory. boolean IsEmpty() Return whether or not the list has any elements. void* operator()() Return the void pointer that the UList stores. UList* operator[](int i) Return the ith UList in the list, where the next element is the first, etc. Unidraw 3 October 1990 UList(3U)
Man Page