Exceptions
|
Type Summary
Iterator |
| Primitive Operations: |
Data,
First,
Is_Valid,
Last,
Next,
Prev,
Remove
|
List derived from Controlled |
| New Operations: |
Append,
Empty,
First,
Last,
Move,
Prepend,
Remove,
Remove_All,
Remove_First,
Remove_Last,
Size
|
| Inherited Operations: |
Adjust,
Finalize,
Initialize
|
|
Constants and Named Numbers
Empty_List : constant List;
|
|
A list with zero elements.
For example, can be used for initialization.
|
|
Other Items:
|
|
type List is new Ada.Finalization.Controlled with private;
|
|
List is a Controlled type. You can safely copy it.
Although, notice that if you have a list of pointers (access types),
only the pointers are copied, not the objects they point at.
|
|
procedure Append (This_List : in out List; Node_Data : Data_Type);
|
|
Append an element at the end of the list.
|
|
procedure Prepend (This_List : in out List; Node_Data : Data_Type);
|
|
Prepend an element at the beginning of the list.
|
|
procedure Remove (This_List : in out List; Iter : Iterator);
|
|
Remove an elemenent pointed by the iterator.
|
|
procedure Remove_All (This_List : in out List);
|
|
Remove all elements from the list.
|
|
procedure Remove_First (This_List : in out List);
|
|
Remove the first element from the list.
|
|
procedure Remove_Last (This_List : in out List);
|
|
Remove the last element from the list.
|
|
function Empty (This_List : List) return Boolean;
|
|
Is the list empty?
|
|
function First (This_List : List) return Iterator;
|
|
Return an iterator to the first element of the list.
|
|
function Last (This_List : List) return Iterator;
|
|
Return an iterator to the last element of the list.
|
|
function Next (Iter : Iterator) return Iterator;
|
|
Move the iterator to point to the next element on the list.
|
|
function Prev (Iter : Iterator) return Iterator;
|
|
Move the iterator to point to the previous element on the list.
|
|
|
function Size (This_List : List) return Natural;
|
|
Return the size of the list.
|
|
procedure Move (Target : in out List; Source : in out List);
|
|
Move all elements from the Source list to the Target list.
|
|
function Is_Valid (Iter : Iterator) return Boolean;
|
|
Is Iterator still valid or out of range?
|
|
|
private
|