Index: orxonox/trunk/src/util/common/list.h
===================================================================
--- orxonox/trunk/src/util/common/list.h	(revision 4496)
+++ orxonox/trunk/src/util/common/list.h	(revision 4497)
@@ -91,4 +91,9 @@
 
 
+/**
+   \brief the list template class
+
+   you will use this as a generic list for all type of objects
+*/
 template<class T> class tList 
 {
@@ -99,5 +104,5 @@
   void add(T* entity);
   void remove(T* entity);
-  void destroy();
+  void flush();
   T* firstElement();
   T* lastElement();
@@ -112,11 +117,14 @@
 
  private:
-  unsigned int size;
-  listElement<T>* first;
-  listElement<T>* last;
-  listElement<T>* currentEl;
+  unsigned int       size;             //!< the size (lenght) of the list
+  listElement<T>*    first;            //!< pointer to the first element
+  listElement<T>*    last;             //!< pointer to the last element
+  listElement<T>*    currentEl;        //!< pointer to the current element
 };
 
 
+/**
+   \brief the constructor
+*/
 template<class T>
 inline tList<T>::tList () 
@@ -127,4 +135,11 @@
 }
 
+
+/**
+   \brief the deconstructor
+
+   this will delete only the list. ATTENTION: the list is deleted, but the objects in the list will 
+   not be deleted
+*/
 template<class T>
 inline tList<T>::~tList () 
@@ -144,4 +159,8 @@
 
 
+/**
+   \brief add an entity to the list
+   \param entity: the entity to add
+*/
 template<class T>
 inline void tList<T>::add(T* entity)
@@ -161,4 +180,8 @@
 
 
+/**
+   \brief remove an entity from the list
+   \param entity: the entity to be removed
+*/
 template<class T>
 inline void tList<T>::remove(T* entity)
@@ -185,6 +208,9 @@
 
 
-template<class T>
-inline void tList<T>::destroy()
+/**
+   \brief this will deletes the objects from the list
+*/
+template<class T>
+inline void tList<T>::flush()
 {
   this->currentEl = this->first;
@@ -192,5 +218,5 @@
     {
       listElement<T>* le = this->currentEl->next;
-      //delete this->currentEl->curr;
+      delete this->currentEl->curr;
       delete this->currentEl;
       this->currentEl = le;
@@ -202,4 +228,8 @@
 
 
+/**
+   \brief returns the first element of the list
+   \returns first element
+*/
 template<class T>
 inline T* tList<T>::firstElement()
@@ -209,4 +239,8 @@
 
 
+/**
+   \brief function returns the last element of the list
+   \returns the last element
+*/
 template<class T>
 inline T* tList<T>::lastElement()
@@ -216,4 +250,8 @@
 
 
+/**
+   \brief returns true if the list is empty
+   \returns true if the list is empty
+*/
 template<class T>
 inline bool tList<T>::isEmpty()
@@ -223,4 +261,8 @@
 
 
+/**
+   \brief this returns the number of elements in the list
+   \returns number of elements
+*/
 template<class T>
 inline int tList<T>::getSize()
@@ -230,16 +272,10 @@
 
 
-/* deprecated */
-/*
-template<class T>
-T* tList<T>::enumerate()
-{
-  //if( this->last == this->first == NULL) return NULL;
-  if( this->size == 0) return NULL;
-  this->currentEl = this->first;
-  return this->currentEl->curr;
-}
-*/
-
+/**
+   \brief creates an itereator object and returns it
+   \returns the iterator object to this list
+
+   You will use this, if you want to iterate through the list
+*/
 template<class T>
 inline tIterator<T>* tList<T>::getIterator()
@@ -250,18 +286,9 @@
 
 
-/* deprecated */
-template<class T>
-T* tList<T>::nextElement()
-{
-  // if( this->last == this->first == NULL) return NULL;
-  if( this->size == 0) return NULL;
-  this->currentEl = this->currentEl->next;
-  if( this->currentEl == NULL) return NULL;
-  return this->currentEl->curr;
-}
-
 
 /**
    \brief this returns the next element after toEntity or the first if toEntity is last
+   \param toEntity: the entity after which is an entity, that has to be returned, sorry, terrible phrase
+   \returns the element after toEntity
 */
 template<class T>
@@ -282,7 +309,15 @@
 
 
+/**
+   \brief creates an array out of the list (ATTENTION: not implemented)
+   \returns pointer to the array beginning
+
+   ATTENTION: function is not implemented and wont do anything
+*/
 template<class T>
 T* tList<T>::toArray()
-{}
+{
+  return NULL;
+}
 
 #endif /* _LIST_H */
