Dillo
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lout::container::untyped::List Class Reference

A single-linked list. More...

#include <container.hh>

Classes

class  ListIterator
 
struct  Node
 

Public Member Functions

 List (bool ownerOfObjects)
 
 ~List ()
 
bool equals (Object *other)
 Returns, whether two objects are equal. More...
 
int hashValue ()
 Return a hash value for the object. More...
 
int size ()
 
void clear ()
 
void append (object::Object *element)
 
bool insertBefore (object::Object *beforeThis, object::Object *neew)
 
bool removeRef (object::Object *element)
 
bool remove (object::Object *element)
 
bool detachRef (object::Object *element)
 
int size () const
 
bool isEmpty () const
 
object::ObjectgetFirst () const
 
object::ObjectgetLast () const
 
- Public Member Functions inherited from lout::container::untyped::Collection
void intoStringBuffer (misc::StringBuffer *sb)
 Store a textual representation of the object in a misc::StringBuffer. More...
 
Iterator iterator ()
 
- Public Member Functions inherited from lout::object::Object
virtual ~Object ()
 The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More...
 
virtual Objectclone ()
 Return an exact copy of the object. More...
 
const char * toString ()
 Use object::Object::intoStringBuffer to return a textual representation of the object. More...
 
virtual size_t sizeOf ()
 Return the number of bytes, this object totally uses. More...
 

Protected Member Functions

AbstractIteratorcreateIterator ()
 

Private Member Functions

bool remove0 (object::Object *element, bool compare, bool doNotDeleteAtAll)
 

Private Attributes

Nodefirst
 
Nodelast
 
bool ownerOfObjects
 
int numElements
 

Friends

class ListIterator
 

Detailed Description

A single-linked list.

Constructor & Destructor Documentation

lout::container::untyped::List::List ( bool  ownerOfObjects)
lout::container::untyped::List::~List ( )

Member Function Documentation

void lout::container::untyped::List::append ( object::Object element)
void lout::container::untyped::List::clear ( )
Collection0::AbstractIterator * lout::container::untyped::List::createIterator ( )
protectedvirtual
bool lout::container::untyped::List::detachRef ( object::Object element)
inline

References remove0().

bool lout::container::untyped::List::equals ( Object other)
virtual

Returns, whether two objects are equal.

The caller should ensure, that this and the object have the same class; this makes casting of "other" safe. Typically, an implementation should check this == other first, the caller can assume a fast implementation.

Reimplemented from lout::object::Object.

References lout::object::Object::equals(), first, lout::container::untyped::List::Node::next, and lout::container::untyped::List::Node::object.

object::Object* lout::container::untyped::List::getFirst ( ) const
inline
object::Object* lout::container::untyped::List::getLast ( ) const
inline
int lout::container::untyped::List::hashValue ( )
virtual
bool lout::container::untyped::List::insertBefore ( object::Object beforeThis,
object::Object neew 
)
bool lout::container::untyped::List::isEmpty ( ) const
inline
bool lout::container::untyped::List::remove ( object::Object element)
inline

References remove0().

bool lout::container::untyped::List::remove0 ( object::Object element,
bool  compare,
bool  doNotDeleteAtAll 
)
private
bool lout::container::untyped::List::removeRef ( object::Object element)
inline

References remove0().

int lout::container::untyped::List::size ( )
virtual
int lout::container::untyped::List::size ( ) const
inline

References numElements.

Friends And Related Function Documentation

friend class ListIterator
friend

Member Data Documentation

Node* lout::container::untyped::List::first
private

Referenced by equals().

Node * lout::container::untyped::List::last
private
int lout::container::untyped::List::numElements
private

Referenced by size().

bool lout::container::untyped::List::ownerOfObjects
private

The documentation for this class was generated from the following files: