#include <list.h>
Inheritance diagram for List< Type >:


Public Types | |
| typedef List_iterator< Type > | Iterator |
Public Member Functions | |
| List () | |
| void | clear () |
| void | free_and_clear () |
| Type * | front () |
| Type * | back () |
| Iterator | begin () |
| Iterator | end () |
| bool | is_empty () const |
| unsigned | size () const |
| Iterator | insert (Iterator position, Type *element) |
| Iterator | insert_front (Type *element) |
| Iterator | insert_back (Type *element) |
| Type * | remove (Iterator position) |
| Type * | remove (Type *element) |
| Type * | remove_front () |
| Type * | remove_back () |
| void | print () |
Protected Attributes | |
| List_node | sentinel |
|
|||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
Clear the list of all nodes.
|
|
|||||||||
|
|
|
|||||||||
|
Free each node in the list, and then clear() the list. This function assumes that the list nodes were initially allocated from virtual memory and that nothing else is going to free them. |
|
|||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||
|
|
|
||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
Print a list as its address, the addresses of its elements, and a newline.
|
|
||||||||||
|
|
|
||||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||||||
|
|
|
|||||
|
|
Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman