Index: branches/new_class_id/src/lib/lang/Makefile.am
===================================================================
--- branches/new_class_id/src/lib/lang/Makefile.am	(revision 9715)
+++ branches/new_class_id/src/lib/lang/Makefile.am	(revision 9716)
@@ -9,11 +9,11 @@
 libORXlang_a_SOURCES = \
 		base_object.cc \
-		new_class_id.cc \
-		new_object_list.cc
+		class_id.cc \
+		object_list.cc
 
 noinst_HEADERS = \
 		base_object.h \
-		new_class_id.h \
-		new_object_list.h
+		class_id.h \
+		object_list.h
 
 
Index: branches/new_class_id/src/lib/lang/base_object.h
===================================================================
--- branches/new_class_id/src/lib/lang/base_object.h	(revision 9715)
+++ branches/new_class_id/src/lib/lang/base_object.h	(revision 9716)
@@ -14,5 +14,5 @@
 #define __BASE_OBJECT_H_
 
-#include "new_object_list.h"
+#include "object_list.h"
 #include "sigslot/slot.h"
 
Index: branches/new_class_id/src/lib/lang/class_id.cc
===================================================================
--- branches/new_class_id/src/lib/lang/class_id.cc	(revision 9716)
+++ branches/new_class_id/src/lib/lang/class_id.cc	(revision 9716)
@@ -0,0 +1,43 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2006 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "class_id.h"
+#include "object_list.h"
+
+/**
+ * @brief a Default Constructor.
+ * this Always points to the ID of the NullClass.
+ */
+ClassID::ClassID()
+{
+  NullClass::acquireID(this->_id, this->_name);
+};
+
+/**
+ * @brief Acquiring the ID of a objectList.
+ * @param objList The ObjectList to acquire the ID from.
+ */
+ClassID::ClassID(const ObjectListBase* const objList)
+{
+  objList->acquireID(this->_id, this->_name);
+}
+
+
+ClassID NullClass::_classID;
+
+int NullClass::_nullID;
+const std::string NullClass::_nullName = std::string("NullClass");
Index: branches/new_class_id/src/lib/lang/class_id.h
===================================================================
--- branches/new_class_id/src/lib/lang/class_id.h	(revision 9716)
+++ branches/new_class_id/src/lib/lang/class_id.h	(revision 9716)
@@ -0,0 +1,76 @@
+/*!
+ * @file class_id.h
+ * @brief Definition of a dynamically allocating ClassID
+ *
+ */
+
+#ifndef _CLASS_ID_H
+#define _CLASS_ID_H
+
+#include <string>
+
+class ObjectListBase;
+
+//! A class to dynamically allocate ClassID's and to support a isA operator
+/**
+ * A ClassID can only be aquired over a ObjectList,
+ * thus enabling the developer to have permanent access to the correct ID and ClassName
+ *
+ * The Idea behind this concept is, that storing a ClassID that changes its internal state
+ * all ClassID's will be updated correctly.
+ *
+ * Since the Existance of any ObjectList is a requirement during the working process all
+ * ID's should reference a valid ID and ClassName
+ */
+class ClassID
+{
+public:
+  ClassID();
+  ClassID(const ObjectListBase* const id);
+  /// the copy constructor is also defined implicitely.
+
+  /** @returns A constant reference to the ID. */
+  const int& id() const { return *_id; };
+  /** @returns A constant reference to the Name. */
+  const std::string& name() const { return *_name; };
+
+  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
+  bool operator==(const ClassID& id) const { return *_id == *id._id /* || _name == id._name */; };
+  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
+  bool operator==(int id) const { return *_id == id; };
+  /** @param name the id to compare @returns true on match (match is same Name) @brief compares an ID with a ClassName */
+  bool operator==(const std::string& name) const { return *_name == name; };
+  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
+  bool operator!=(const ClassID& id) const { return *_id != *id._id /* && _name != id._name*/;  };
+  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
+  bool operator!=(int id) const { return *_id != id; };
+  /** @param name the id to compare @returns false on match (match is same Name) @brief compares an ID with a ClassName */
+  bool operator!=(const std::string& name) const { return *_name != name; };
+
+private:
+  const int*                _id;           //!< A pointer to the ID of the ClassID.
+  const std::string*        _name;         //!< A pointer to the Name of the ClassID.
+};
+
+//! A NullClass. This is the Null of the ClassID.
+/**
+ * implemented as a Class id can be used to reference NullObjects.
+ */
+class NullClass
+{
+public:
+  /** @returns the NullClass' ID. */
+  static const ClassID& classID() { return NullClass::_classID; }
+  /** @param id the ID to acquire @param name the name to acquire @brief acquires the ID of this Class */
+  static void acquireID(const int*& id, const std::string*& name) { id = &_nullID; name = &_nullName; };
+
+private:
+  NullClass() {}; //!< The Default Constructor is hidden from the User.
+
+private:
+  static ClassID         _classID;      //!< The NullClass' ID
+  static const std::string  _nullName;     //!< The NullClass' Name ("NullClass")
+  static int                _nullID;       //!< The NullClass' ID
+};
+
+#endif /* _CLASS_ID_H */
Index: branches/new_class_id/src/lib/lang/new_class_id.cc
===================================================================
--- branches/new_class_id/src/lib/lang/new_class_id.cc	(revision 9715)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2006 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Benjamin Grauer
-   co-programmer: ...
-*/
-
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
-
-#include "new_class_id.h"
-#include "new_object_list.h"
-
-/**
- * @brief a Default Constructor.
- * this Always points to the ID of the NullClass.
- */
-ClassID::ClassID()
-{
-  NullClass::acquireID(this->_id, this->_name);
-};
-
-/**
- * @brief Acquiring the ID of a objectList.
- * @param objList The ObjectList to acquire the ID from.
- */
-ClassID::ClassID(const ObjectListBase* const objList)
-{
-  objList->acquireID(this->_id, this->_name);
-}
-
-
-ClassID NullClass::_classID;
-
-int NullClass::_nullID;
-const std::string NullClass::_nullName = std::string("NullClass");
Index: branches/new_class_id/src/lib/lang/new_class_id.h
===================================================================
--- branches/new_class_id/src/lib/lang/new_class_id.h	(revision 9715)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/*!
- * @file new_class_id.h
- * @brief Definition of a dynamically allocating ClassID
- *
- */
-
-#ifndef _NEW_CLASS_ID_H
-#define _NEW_CLASS_ID_H
-
-#include <string>
-
-class ObjectListBase;
-
-//! A class to dynamically allocate ClassID's and to support a isA operator
-/**
- * A ClassID can only be aquired over a ObjectList,
- * thus enabling the developer to have permanent access to the correct ID and ClassName
- *
- * The Idea behind this concept is, that storing a ClassID that changes its internal state
- * all ClassID's will be updated correctly.
- *
- * Since the Existance of any ObjectList is a requirement during the working process all
- * ID's should reference a valid ID and ClassName
- */
-class ClassID
-{
-public:
-  ClassID();
-  ClassID(const ObjectListBase* const id);
-  /// the copy constructor is also defined implicitely.
-
-  /** @returns A constant reference to the ID. */
-  const int& id() const { return *_id; };
-  /** @returns A constant reference to the Name. */
-  const std::string& name() const { return *_name; };
-
-  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
-  bool operator==(const ClassID& id) const { return *_id == *id._id /* || _name == id._name */; };
-  /** @param id the id to compare @returns true on match (match is same ID) @brief compares two id's */
-  bool operator==(int id) const { return *_id == id; };
-  /** @param name the id to compare @returns true on match (match is same Name) @brief compares an ID with a ClassName */
-  bool operator==(const std::string& name) const { return *_name == name; };
-  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
-  bool operator!=(const ClassID& id) const { return *_id != *id._id /* && _name != id._name*/;  };
-  /** @param id the id to compare @returns false on match (match is same ID) @brief compares two id's */
-  bool operator!=(int id) const { return *_id != id; };
-  /** @param name the id to compare @returns false on match (match is same Name) @brief compares an ID with a ClassName */
-  bool operator!=(const std::string& name) const { return *_name != name; };
-
-private:
-  const int*                _id;           //!< A pointer to the ID of the ClassID.
-  const std::string*        _name;         //!< A pointer to the Name of the ClassID.
-};
-
-//! A NullClass. This is the Null of the ClassID.
-/**
- * implemented as a Class id can be used to reference NullObjects.
- */
-class NullClass
-{
-public:
-  /** @returns the NullClass' ID. */
-  static const ClassID& classID() { return NullClass::_classID; }
-  /** @param id the ID to acquire @param name the name to acquire @brief acquires the ID of this Class */
-  static void acquireID(const int*& id, const std::string*& name) { id = &_nullID; name = &_nullName; };
-
-private:
-  NullClass() {}; //!< The Default Constructor is hidden from the User.
-
-private:
-  static ClassID         _classID;      //!< The NullClass' ID
-  static const std::string  _nullName;     //!< The NullClass' Name ("NullClass")
-  static int                _nullID;       //!< The NullClass' ID
-};
-
-#endif /* _NEW_CLASS_ID_H */
Index: branches/new_class_id/src/lib/lang/new_object_list.cc
===================================================================
--- branches/new_class_id/src/lib/lang/new_object_list.cc	(revision 9715)
+++ 	(revision )
@@ -1,310 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2006 orx
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   ### File Specific:
-   main-programmer: Benjamin Grauer
-   co-programmer: ...
-*/
-
-//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
-
-#include "new_object_list.h"
-#include <cassert>
-
-
-#include <stdio.h>
-
-/**
- * @brief Constructor, that creates an ObjectList while checking (development mode) for uniqueness of all Keys (names and ID's)
- * @param className The Name of the Class to create an ObjectList for.
- * @param id The ID if you like, or -1 otherwise.
- * @return a new NewObejctList
- */
-ObjectListBase::ObjectListBase(const std::string& className, int id)
-    : _name(className)
-{
-  printf("ObjectList, Registered %s::%d\n", className.c_str(), id);
-  if (ObjectListBase::_classesByID == NULL)
-  {
-    ObjectListBase::_classesByID = new classIDMap;
-    assert (ObjectListBase::_classesByName == NULL);
-    ObjectListBase::_classesByName = new classNameMap;
-  }
-  assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)");
-
-  if (id == -1)
-  {
-    id = ObjectListBase::_classesByID->size();
-    // searching for a free ID
-    while (ObjectListBase::classIDExists(id)) ++id;
-  }
-  assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)");
-
-  _id = id;
-  /// Some Output, that will fall out later
-  std::cout << "register new ObjectList " << className << " ID: " << this->_id << std::endl;
-
-  this->_identity = ClassID(this);
-  (*ObjectListBase::_classesByID)[this->_identity.id()] = this;
-  (*ObjectListBase::_classesByName)[this->_identity.name()] = this;
-}
-
-
-/**
- * Destructor.
- *
- * This destructor deletes the ObjectList, and cleans up the ObjectList sorted Maps.
- */
-ObjectListBase::~ObjectListBase()
-{
-  assert (ObjectListBase::_classesByName != NULL && ObjectListBase::_classesByID != NULL);
-  /*
-  std::cout << "Erasing: " << this->_name << " "<< this->_id  << std::endl;
-  std::cout << "SIZE OF _classByID: " << ObjectListBase::_classesByID->size() << std::endl;
-  std::cout << "SIZE OF _classByName: " << ObjectListBase::_classesByName->size() << std::endl;
-  */
-  ObjectListBase::_classesByID->erase(this->_identity.id());
-  ObjectListBase::_classesByName->erase(this->_identity.name());
-
-  if (ObjectListBase::_classesByID->empty())
-  {
-    delete ObjectListBase::_classesByID;
-    ObjectListBase::_classesByID = NULL;
-    assert(ObjectListBase::_classesByName != NULL);
-    delete ObjectListBase::_classesByName;
-    ObjectListBase::_classesByName = NULL;
-  }
-}
-
-ObjectListBase::classIDMap* ObjectListBase::_classesByID = NULL;
-ObjectListBase::classNameMap* ObjectListBase::_classesByName = NULL;
-
-/**
- * @returns the Registered Class Count.
- */
-unsigned int ObjectListBase::classCount()
-{
-  assert (ObjectListBase::_classesByID != NULL);
-  return ObjectListBase::_classesByID->size();
-};
-
-/**
- * @brief Checks if a Class with name already exists.
- * @param name The Name of the Class to check.
- * @return true if such a class already exists.
- */
-bool ObjectListBase::classIDExists(int id)
-{
-  return (ObjectListBase::_classesByID->find(id) != ObjectListBase::_classesByID->end());
-}
-
-/**
- * @brief Checks if a Class with name already exists.
- * @param name The Name of the Class to check.
- * @return true if such a class already exists.
- */
-bool ObjectListBase::classNameExists(const std::string& name)
-{
-  return (ObjectListBase::_classesByName->find(name) != ObjectListBase::_classesByName->end());
-}
-
-/**
- * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity
- * @param id: The Id to search for
- * @returns the ClassID if found and NullClass' identity if not.
- */
-const ClassID& ObjectListBase::retrieveIdentity(int id)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(id);
-
-  if (base != NULL)
-    return base->_identity;
-  else
-    return NullClass::classID();
-}
-
-
-/**
- * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity
- * @param name: The Name to search for
- * @returns the ClassID if found and NullClass' identity if not.
- */
-const ClassID& ObjectListBase::retrieveIdentity(const std::string& name)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(name);
-
-  if (base != NULL)
-    return base->_identity;
-  else
-    return NullClass::classID();
-}
-
-
-/**
- * @brief Searches for a ObjectList with the ID classID
- * @param classID the ID to search for.
- * @return The ObjectList if found, NULL otherwise.
- */
-const ObjectListBase* const ObjectListBase::getObjectList(int classID)
-{
-  assert (ObjectListBase::_classesByID != NULL);
-  ObjectListBase::classIDMap::iterator it = ObjectListBase::_classesByID->find(classID);
-  if (it != ObjectListBase::_classesByID->end())
-    return (*it).second;
-  else
-    return NULL;
-}
-
-/**
- * @brief Searches for a ObjectList with the Name className
- * @param className the Name to search for.
- * @return The ObjectList if found, NULL otherwise.
- */
-const ObjectListBase* const ObjectListBase::getObjectList(const std::string& className)
-{
-  assert (ObjectListBase::_classesByName != NULL);
-  ObjectListBase::classNameMap::iterator it = ObjectListBase::_classesByName->find(className);
-  if (it != ObjectListBase::_classesByName->end())
-    return (*it).second;
-  else
-    return NULL;
-}
-
-/**
- * @brief Searches for a ObjectList with the ClassID classID
- * @param classID the ID to search for.
- * @return The ObjectList if found, NULL otherwise.
- */
-const ObjectListBase* const ObjectListBase::getObjectList(const ClassID& classID)
-{
-  return ObjectListBase::getObjectList(classID.id());
-}
-
-/**
- * @brief Retrieves the first BaseObject matching the name objectName from the List matching classID.
- * @param classID the ID of the List.
- * @param objectName the Name of the Object to search for
- */
-BaseObject* ObjectListBase::getBaseObject(int classID, const std::string& objectName)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
-
-  if (base != NULL)
-    return base->getBaseObject(objectName);
-  else
-    return NULL;
-}
-
-/**
- * @brief Retrieves the first BaseObject matching the name objectName from the List matching className.
- * @param className the Name of the List.
- * @param objectName the Name of the Object to search for
- */
-BaseObject* ObjectListBase::getBaseObject(const std::string& className, const std::string& objectName)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(className);
-
-  if (base != NULL)
-    return base->getBaseObject(objectName);
-  else
-    return NULL;
-}
-
-/**
- * @brief Retrieves the first BaseObject matching the name objectName from the List matching classID.
- * @param classID The ClassID of the List.
- * @param objectName the Name of the Object to search for
- */
-BaseObject* ObjectListBase::getBaseObject(const ClassID& classID, const std::string& objectName)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
-
-  if (base != NULL)
-    return base->getBaseObject(objectName);
-  else
-    return NULL;
-}
-
-#include "base_object.h"
-
-/**
- * @brief Prints out some debugging information about a given List.
- */
-void ObjectListBase::debug(unsigned int level) const
-{
-  base_list list;
-  this->getBaseObjectList(&list);
-
-  if (level > 1 || !list.empty())
-    printf(" ObjectList of class %s(id:%d) contains %d objects\n", this->name().c_str(), this->id(), list.size());
-
-  if (level >= 2)
-  {
-    printf("  - listing Instances: \n");
-    for (base_iterator it = list.begin();
-         it != list.end();
-         ++it)
-    {
-      printf("   + %s::%s\n", (*it)->getClassCName(), (*it)->getCName());
-    }
-  }
-}
-
-
-void ObjectListBase::debugAll(unsigned int level)
-{
-  printf("Listing all %d ObjectLists \n", ObjectListBase::_classesByID->size());
-
-  for (classNameMap::const_iterator it = ObjectListBase::_classesByName->begin();
-       it != ObjectListBase::_classesByName->end();
-       ++it)
-  {
-    (*it).second->debug(level);
-
-  }
-
-}
-
-
-
-/**
- * @brief Converts an ID into a ClassName String.
- * @param classID The ID to convert.
- * @return The ClassName or an empty string if the ID was not found.
- */
-const std::string& ObjectListBase::IDToString(int classID)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
-
-  if (base != NULL)
-    return base->name();
-  else
-  {
-    static std::string empty;
-    return empty;
-  }
-}
-
-
-/**
- * @brief Converts a String into an ID
- * @param className the Name of the Class to search for
- * @return The Classes ID if found, -1 otherwise.
- */
-int ObjectListBase::StringToID(const std::string& className)
-{
-  const ObjectListBase* const base = ObjectListBase::getObjectList(className);
-
-  if (base != NULL)
-    return base->id();
-  else
-    return -1;
-}
-
Index: branches/new_class_id/src/lib/lang/new_object_list.h
===================================================================
--- branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9715)
+++ 	(revision )
@@ -1,333 +1,0 @@
-/*!
- * @file new_object_list.h
- * @brief Definition of a dynamically allocating ClassID
- *
- */
-
-#ifndef _NEW_OBJECT_LIST_H
-#define _NEW_OBJECT_LIST_H
-
-#include "new_class_id.h"
-#include <cassert>
-#include <map>
-#include <list>
-#include <string>
-#include <iostream>
-
-/**
- * @brief Use this macro to easily declare a Class to store its own ObjectListDeclaration
- * @param ClassName the Name of the Class.
- * @note: Using this inside of a Class means, that you loose the member: _objectList, while defining
- * two new functions objectList() and classID().
- */
-#define ObjectListDeclaration(ClassName) \
-  public: \
-   static inline const ObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \
-   static inline const ClassID& classID() { return ClassName::_objectList.identity(); }; \
-  private: \
-   static ObjectList<ClassName> _objectList
-
-#define ObjectListDefinitionID(ClassName, ID) \
-   ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
-
-
-#define ObjectListDefinition(ClassName) \
-    ObjectListDefinitionID(ClassName, -1)
-
-class BaseObject;
-//! The superclass that all ObjectLists follow.
-/**
- * @see template<class T> ObjectList<T>
- */
-class ObjectListBase
-{
-public:
-  //! A fast iterator Base-Class, for iterator-casting and storing.
-  /**
-   * @note This Iterator is explicitely used only for storage purposes in the BaseObject
-   */
-  class IteratorBase { };
-
-  /** @brief A Typedefinition for the Base-List that can be retrieved with getBaseObjectList(base_list*) */
-  typedef std::list<BaseObject*>        base_list;
-  /** @brief An iterator for the base_list */
-  typedef base_list::iterator           base_iterator;
-
-public:
-  /** @returns The Identity of the Class stored within. */
-  inline const ClassID&              identity() const { return _identity; }
-  /** @returns the ID of the Identity of the ObjectList */
-  inline int                            id() const { return _id; };
-  /** @returns The Name of the Class stored in this ObjectList */
-  inline const std::string&             name() const { return _name; };
-  /** @param id The id to compare @returns true on match, false otherwise */
-  inline bool                           operator==(int id) const { return _id == id; };
-  /** @param id The id to compare @returns true on match, false otherwise */
-  inline bool                           operator==(const ClassID& id) const { return id == _id; };
-  /** @param name The name to compare @returns true on match, false otherwise */
-  inline bool                           operator==(const std::string& name) const { return _name == name; };
-  /** @param id The id to check @returns true on match, false otherwise */
-  inline void                           acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
-  /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
-  virtual void                          getBaseObjectList(base_list* list) const = 0;
-
-  static const ClassID&              retrieveIdentity(int id);
-  static const ClassID&              retrieveIdentity(const std::string& name);
-
-  static const ObjectListBase* const getObjectList(int classID);
-  static const ObjectListBase* const getObjectList(const std::string& className);
-  static const ObjectListBase* const getObjectList(const ClassID& classID);
-
-  static BaseObject*                    getBaseObject(int classID, const std::string& objectName);
-  static BaseObject*                    getBaseObject(const std::string& className, const std::string& objectName);
-  static BaseObject*                    getBaseObject(const ClassID& classID, const std::string& objectName);
-
-  /** @returns an Object with Name name out of this List @param name the name of the Object. */
-  virtual BaseObject*                   getBaseObject(const std::string& name) const = 0;
-
-  static const std::list<std::string>&  getClassNames();
-
-
-  static unsigned int                   classCount();
-  void                                  debug(unsigned int level) const;
-  static void                           debugAll(unsigned int level);
-
-  static const std::string&             IDToString(int classID);
-  static int                            StringToID(const std::string& className);
-
-  //! Only uset to unsubscribe a BaseObject.
-  virtual void                          unregisterObject(IteratorBase* _iterators) = 0;
-
-protected:
-  ObjectListBase(const std::string& className, int id = -1);
-  virtual ~ObjectListBase();
-
-private:
-  ObjectListBase(const ObjectListBase&);
-
-  static bool                         classIDExists(int id);
-  static bool                         classNameExists(const std::string& className);
-
-
-protected:
-  typedef std::map<int, ObjectListBase*>         classIDMap;   //!< The Generic Map.
-  typedef std::map<std::string, ObjectListBase*> classNameMap; //!< The Generic Map.
-
-private:
-  int                           _id;
-  const std::string             _name;              //!< The Name of the Class.
-  ClassID                    _identity;          //!< The Identity of the Class. (equal to _id and _name)
-
-private:
-  static classIDMap*            _classesByID;       //!< A Map of all the classes in existance.
-  static classNameMap*          _classesByName;     //!< A Map of all the classes in existance.
-  static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
-};
-
-
-/////////////////////////
-//// TEMPLATISATION /////
-/////////////////////////
-//! Defines a ObjectsList handler for objects of type T.
-/**
- * The ObjectList is a generic way to store every object created from a Class 'T'
- *  into a List. The list can be retrieved, and used constantly over iterators,
- *  as with normal std::list.
- *
- * Furthermore the linkage over the single Lists is given over the Superclass ObjectListBase.
- *
- *
- *
- *
- * To define a Class with a ObjectList, you have to:
- *  1. Include 'ObjectListDeclaration(T);' in its Declaration (at the beginning)
- *  2. Include 'ObjectListDefinition(T);' in some Definition file (cc-file)
- *  3. In the constructor add 'registerObject(this, objectList);'
- *
- * @note The Class must define the compare with const std::string& operator for this to work.
- *
- *
- *
- * Limitations:
- *  ObjectList cannot be used with other Factory style Classes, if the class is also a BaseObject,
- *   and not loaded before the ObjectList.
- *
- * @example Iterating: Iteration is made easy, and fast as follows:
- *   for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
- *      it != PlayerStats::objectList().end();
- *     ++it)
- *   {
- *    (*it)->dosomething
- *   }
- *
- * @example Find an Object:
- * Playable* playable = Playable::objectList("orxonox-super-rocket-fighter"); // searches an Object By its name.
- *
- */
-template<class T>
-class ObjectList : public ObjectListBase
-{
-public:
-  typedef std::list<T*>                  list;
-  typedef typename list::iterator        iterator;
-  typedef typename list::const_iterator  const_iterator;
-
-
-class Iterator : public ObjectListBase::IteratorBase
-  {
-  public:
-    Iterator(iterator it) { _it = it; }
-    inline iterator& it() { return _it; }
-    typename ObjectList::iterator _it;
-  };
-
-public:
-  ObjectList(const std::string& name, int id = -1);
-  ~ObjectList();
-
-  virtual BaseObject*                getBaseObject(const std::string& name) const;
-  T*                                 getObject(const std::string& name) const;
-  inline const list&                 objects() const { return _objects; };
-  bool                               exists(const T* const object) const;
-
-  /** @returns an Iterator to the beginning of the List. */
-  inline iterator                    begin() { return _objects.begin(); };
-  /** @returns a constant Iterator to the beginning of the List. */
-  inline const_iterator              begin() const { return _objects.begin(); };
-  /** @returns an Iterator to the end of the List. */
-  inline iterator                    end() { return _objects.end(); };
-  /** @returns a constant Iterator to the beginning of the List. */
-  inline const_iterator              end() const { return _objects.end(); };
-
-  /** @returns true if the List is empty. */
-  inline bool                        empty() const { return _objects.empty(); };
-  /** @returns the size of the List */
-  inline int                         size() const { return _objects.size(); };
-  /** @returns the frontmost Element of the list (normaly the last added Object). */
-  inline T*                          front() const { return _objects.front(); };
-  /** @returns the last added Object */
-  inline T*                          back() const { return _objects.back(); };
-
-
-  ObjectListBase::IteratorBase*   registerObject(T* object);
-  virtual void                       unregisterObject(IteratorBase* iterator);
-
-protected:
-  virtual void                       getBaseObjectList(ObjectListBase::base_list* list) const;
-
-
-private:
-  //! the copy constructor will be hidden.
-  ObjectList(const ObjectList& definer) {};
-
-private:
-  list                _objects;     //!< The List of stored Objects of Type T.
-};
-
-
-
-
-
-/////////////////////////
-//// IMPLEMENTATION /////
-/////////////////////////
-/**
- * @brief creates a new ObjectList
- * @param name The name of the Class.
- * @param id The ID of the class if desired, or -1 if an id should be assigned automatically.
- */
-template <class T>
-ObjectList<T>::ObjectList(const std::string& name, int id)
-    : ObjectListBase(name, id)
-{}
-
-/**
- * @brief deletes the ObjectList.
- */
-template <class T>
-ObjectList<T>::~ObjectList()
-{
-  if (!_objects.empty())
-  {
-    // std::cout << "There are " << this->size() << " objects from class " << this->name() << "(id:" << this->id() << ") in existance\n";
-  }
-}
-
-/**
- * @brief Retrieves a BaseObject matching the Name name in this List.
- * @param name the Name of the Object.
- * @returns a BaseObject pointing to the object if found, NULL otherwise.
- */
-template <class T>
-BaseObject* ObjectList<T>::getBaseObject(const std::string& name) const
-{
-  return this->getObject(name);
-}
-
-
-
-/**
- * @brief Retrieves an Object of type T matching the Name name in this List.
- * @param name the Name of the Object.
- * @returns an Object of type T pointing to the object if found, NULL otherwise.
- */
-template <class T>
-T* ObjectList<T>::getObject(const std::string& name) const
-{
-  const_iterator it;
-  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
-    if ((*it)->getName() == name)
-      return (*it);
-  return NULL;
-}
-
-/**
- * @brief checks if Object object exists in this ClassList.
- * @param object the Object to check for
- * @returns True if the object is found within the List, false otherwise
- */
-template <class T>
-    bool ObjectList<T>::exists(const T* const object) const
-{
-  return (std::find(_objects.begin(), _objects.end(), object) != _objects.end());
-}
-
-
-/**
- * @brief retrieves a List of BaseObjects
- * @param list the list to push the ObjectList into.
- */
-template <class T>
-void ObjectList<T>::getBaseObjectList(ObjectListBase::base_list* list) const
-{
-  assert (list != NULL);
-  const_iterator it;
-  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
-    list->push_back(*it);
-}
-
-
-/**
- * @brief registers an Object to the ObjectList.
- * @param T object the Object to register.
- * @returns a pointer to the iterator inside of the list.
- */
-template <class T>
-ObjectListBase::IteratorBase* ObjectList<T>::registerObject(T* object)
-{
-  this->_objects.push_back(object);
-  return new Iterator(--this->_objects.end());
-}
-
-/**
- * @brief removes an Object from the ClassList.
- * @param iterator the Position at which to remove the Object.
- */
-template <class T>
-void ObjectList<T>::unregisterObject(IteratorBase* iterator)
-{
-  this->_objects.erase(static_cast<Iterator*>(iterator)->it());
-  //_objects.erase(std::find(_objects.begin(), _objects.end(), object));
-}
-
-#endif /* _NEW_OBJECT_LIST_H */
Index: branches/new_class_id/src/lib/lang/object_list.cc
===================================================================
--- branches/new_class_id/src/lib/lang/object_list.cc	(revision 9716)
+++ branches/new_class_id/src/lib/lang/object_list.cc	(revision 9716)
@@ -0,0 +1,310 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2006 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "object_list.h"
+#include <cassert>
+
+
+#include <stdio.h>
+
+/**
+ * @brief Constructor, that creates an ObjectList while checking (development mode) for uniqueness of all Keys (names and ID's)
+ * @param className The Name of the Class to create an ObjectList for.
+ * @param id The ID if you like, or -1 otherwise.
+ * @return a new NewObejctList
+ */
+ObjectListBase::ObjectListBase(const std::string& className, int id)
+    : _name(className)
+{
+  printf("ObjectList, Registered %s::%d\n", className.c_str(), id);
+  if (ObjectListBase::_classesByID == NULL)
+  {
+    ObjectListBase::_classesByID = new classIDMap;
+    assert (ObjectListBase::_classesByName == NULL);
+    ObjectListBase::_classesByName = new classNameMap;
+  }
+  assert(!ObjectListBase::classNameExists(className) && "Classes should only be included once, and no two classes should have the same name (key value)");
+
+  if (id == -1)
+  {
+    id = ObjectListBase::_classesByID->size();
+    // searching for a free ID
+    while (ObjectListBase::classIDExists(id)) ++id;
+  }
+  assert(!ObjectListBase::classIDExists(id) && "Classes should only be included once, and no two classes should have the same ID (key value)");
+
+  _id = id;
+  /// Some Output, that will fall out later
+  std::cout << "register new ObjectList " << className << " ID: " << this->_id << std::endl;
+
+  this->_identity = ClassID(this);
+  (*ObjectListBase::_classesByID)[this->_identity.id()] = this;
+  (*ObjectListBase::_classesByName)[this->_identity.name()] = this;
+}
+
+
+/**
+ * Destructor.
+ *
+ * This destructor deletes the ObjectList, and cleans up the ObjectList sorted Maps.
+ */
+ObjectListBase::~ObjectListBase()
+{
+  assert (ObjectListBase::_classesByName != NULL && ObjectListBase::_classesByID != NULL);
+  /*
+  std::cout << "Erasing: " << this->_name << " "<< this->_id  << std::endl;
+  std::cout << "SIZE OF _classByID: " << ObjectListBase::_classesByID->size() << std::endl;
+  std::cout << "SIZE OF _classByName: " << ObjectListBase::_classesByName->size() << std::endl;
+  */
+  ObjectListBase::_classesByID->erase(this->_identity.id());
+  ObjectListBase::_classesByName->erase(this->_identity.name());
+
+  if (ObjectListBase::_classesByID->empty())
+  {
+    delete ObjectListBase::_classesByID;
+    ObjectListBase::_classesByID = NULL;
+    assert(ObjectListBase::_classesByName != NULL);
+    delete ObjectListBase::_classesByName;
+    ObjectListBase::_classesByName = NULL;
+  }
+}
+
+ObjectListBase::classIDMap* ObjectListBase::_classesByID = NULL;
+ObjectListBase::classNameMap* ObjectListBase::_classesByName = NULL;
+
+/**
+ * @returns the Registered Class Count.
+ */
+unsigned int ObjectListBase::classCount()
+{
+  assert (ObjectListBase::_classesByID != NULL);
+  return ObjectListBase::_classesByID->size();
+};
+
+/**
+ * @brief Checks if a Class with name already exists.
+ * @param name The Name of the Class to check.
+ * @return true if such a class already exists.
+ */
+bool ObjectListBase::classIDExists(int id)
+{
+  return (ObjectListBase::_classesByID->find(id) != ObjectListBase::_classesByID->end());
+}
+
+/**
+ * @brief Checks if a Class with name already exists.
+ * @param name The Name of the Class to check.
+ * @return true if such a class already exists.
+ */
+bool ObjectListBase::classNameExists(const std::string& name)
+{
+  return (ObjectListBase::_classesByName->find(name) != ObjectListBase::_classesByName->end());
+}
+
+/**
+ * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity
+ * @param id: The Id to search for
+ * @returns the ClassID if found and NullClass' identity if not.
+ */
+const ClassID& ObjectListBase::retrieveIdentity(int id)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(id);
+
+  if (base != NULL)
+    return base->_identity;
+  else
+    return NullClass::classID();
+}
+
+
+/**
+ * @brief searches for a ClassID in the list of all ObjectLists, and returns its Identity
+ * @param name: The Name to search for
+ * @returns the ClassID if found and NullClass' identity if not.
+ */
+const ClassID& ObjectListBase::retrieveIdentity(const std::string& name)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(name);
+
+  if (base != NULL)
+    return base->_identity;
+  else
+    return NullClass::classID();
+}
+
+
+/**
+ * @brief Searches for a ObjectList with the ID classID
+ * @param classID the ID to search for.
+ * @return The ObjectList if found, NULL otherwise.
+ */
+const ObjectListBase* const ObjectListBase::getObjectList(int classID)
+{
+  assert (ObjectListBase::_classesByID != NULL);
+  ObjectListBase::classIDMap::iterator it = ObjectListBase::_classesByID->find(classID);
+  if (it != ObjectListBase::_classesByID->end())
+    return (*it).second;
+  else
+    return NULL;
+}
+
+/**
+ * @brief Searches for a ObjectList with the Name className
+ * @param className the Name to search for.
+ * @return The ObjectList if found, NULL otherwise.
+ */
+const ObjectListBase* const ObjectListBase::getObjectList(const std::string& className)
+{
+  assert (ObjectListBase::_classesByName != NULL);
+  ObjectListBase::classNameMap::iterator it = ObjectListBase::_classesByName->find(className);
+  if (it != ObjectListBase::_classesByName->end())
+    return (*it).second;
+  else
+    return NULL;
+}
+
+/**
+ * @brief Searches for a ObjectList with the ClassID classID
+ * @param classID the ID to search for.
+ * @return The ObjectList if found, NULL otherwise.
+ */
+const ObjectListBase* const ObjectListBase::getObjectList(const ClassID& classID)
+{
+  return ObjectListBase::getObjectList(classID.id());
+}
+
+/**
+ * @brief Retrieves the first BaseObject matching the name objectName from the List matching classID.
+ * @param classID the ID of the List.
+ * @param objectName the Name of the Object to search for
+ */
+BaseObject* ObjectListBase::getBaseObject(int classID, const std::string& objectName)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
+
+  if (base != NULL)
+    return base->getBaseObject(objectName);
+  else
+    return NULL;
+}
+
+/**
+ * @brief Retrieves the first BaseObject matching the name objectName from the List matching className.
+ * @param className the Name of the List.
+ * @param objectName the Name of the Object to search for
+ */
+BaseObject* ObjectListBase::getBaseObject(const std::string& className, const std::string& objectName)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(className);
+
+  if (base != NULL)
+    return base->getBaseObject(objectName);
+  else
+    return NULL;
+}
+
+/**
+ * @brief Retrieves the first BaseObject matching the name objectName from the List matching classID.
+ * @param classID The ClassID of the List.
+ * @param objectName the Name of the Object to search for
+ */
+BaseObject* ObjectListBase::getBaseObject(const ClassID& classID, const std::string& objectName)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
+
+  if (base != NULL)
+    return base->getBaseObject(objectName);
+  else
+    return NULL;
+}
+
+#include "base_object.h"
+
+/**
+ * @brief Prints out some debugging information about a given List.
+ */
+void ObjectListBase::debug(unsigned int level) const
+{
+  base_list list;
+  this->getBaseObjectList(&list);
+
+  if (level > 1 || !list.empty())
+    printf(" ObjectList of class %s(id:%d) contains %d objects\n", this->name().c_str(), this->id(), list.size());
+
+  if (level >= 2)
+  {
+    printf("  - listing Instances: \n");
+    for (base_iterator it = list.begin();
+         it != list.end();
+         ++it)
+    {
+      printf("   + %s::%s\n", (*it)->getClassCName(), (*it)->getCName());
+    }
+  }
+}
+
+
+void ObjectListBase::debugAll(unsigned int level)
+{
+  printf("Listing all %d ObjectLists \n", ObjectListBase::_classesByID->size());
+
+  for (classNameMap::const_iterator it = ObjectListBase::_classesByName->begin();
+       it != ObjectListBase::_classesByName->end();
+       ++it)
+  {
+    (*it).second->debug(level);
+
+  }
+
+}
+
+
+
+/**
+ * @brief Converts an ID into a ClassName String.
+ * @param classID The ID to convert.
+ * @return The ClassName or an empty string if the ID was not found.
+ */
+const std::string& ObjectListBase::IDToString(int classID)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(classID);
+
+  if (base != NULL)
+    return base->name();
+  else
+  {
+    static std::string empty;
+    return empty;
+  }
+}
+
+
+/**
+ * @brief Converts a String into an ID
+ * @param className the Name of the Class to search for
+ * @return The Classes ID if found, -1 otherwise.
+ */
+int ObjectListBase::StringToID(const std::string& className)
+{
+  const ObjectListBase* const base = ObjectListBase::getObjectList(className);
+
+  if (base != NULL)
+    return base->id();
+  else
+    return -1;
+}
+
Index: branches/new_class_id/src/lib/lang/object_list.h
===================================================================
--- branches/new_class_id/src/lib/lang/object_list.h	(revision 9716)
+++ branches/new_class_id/src/lib/lang/object_list.h	(revision 9716)
@@ -0,0 +1,333 @@
+/*!
+ * @file object_list.h
+ * @brief Definition of a dynamically allocating ClassID
+ *
+ */
+
+#ifndef _OBJECT_LIST_H
+#define _OBJECT_LIST_H
+
+#include "class_id.h"
+#include <cassert>
+#include <map>
+#include <list>
+#include <string>
+#include <iostream>
+
+/**
+ * @brief Use this macro to easily declare a Class to store its own ObjectListDeclaration
+ * @param ClassName the Name of the Class.
+ * @note: Using this inside of a Class means, that you loose the member: _objectList, while defining
+ * two new functions objectList() and classID().
+ */
+#define ObjectListDeclaration(ClassName) \
+  public: \
+   static inline const ObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \
+   static inline const ClassID& classID() { return ClassName::_objectList.identity(); }; \
+  private: \
+   static ObjectList<ClassName> _objectList
+
+#define ObjectListDefinitionID(ClassName, ID) \
+   ObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
+
+
+#define ObjectListDefinition(ClassName) \
+    ObjectListDefinitionID(ClassName, -1)
+
+class BaseObject;
+//! The superclass that all ObjectLists follow.
+/**
+ * @see template<class T> ObjectList<T>
+ */
+class ObjectListBase
+{
+public:
+  //! A fast iterator Base-Class, for iterator-casting and storing.
+  /**
+   * @note This Iterator is explicitely used only for storage purposes in the BaseObject
+   */
+  class IteratorBase { };
+
+  /** @brief A Typedefinition for the Base-List that can be retrieved with getBaseObjectList(base_list*) */
+  typedef std::list<BaseObject*>        base_list;
+  /** @brief An iterator for the base_list */
+  typedef base_list::iterator           base_iterator;
+
+public:
+  /** @returns The Identity of the Class stored within. */
+  inline const ClassID&              identity() const { return _identity; }
+  /** @returns the ID of the Identity of the ObjectList */
+  inline int                            id() const { return _id; };
+  /** @returns The Name of the Class stored in this ObjectList */
+  inline const std::string&             name() const { return _name; };
+  /** @param id The id to compare @returns true on match, false otherwise */
+  inline bool                           operator==(int id) const { return _id == id; };
+  /** @param id The id to compare @returns true on match, false otherwise */
+  inline bool                           operator==(const ClassID& id) const { return id == _id; };
+  /** @param name The name to compare @returns true on match, false otherwise */
+  inline bool                           operator==(const std::string& name) const { return _name == name; };
+  /** @param id The id to check @returns true on match, false otherwise */
+  inline void                           acquireID(const int*& id, const std::string*& name) const { id = &_id; name = &_name; };
+  /** @brief fills a list of Objects into a BaseObject*-List. @param list the list to fill */
+  virtual void                          getBaseObjectList(base_list* list) const = 0;
+
+  static const ClassID&              retrieveIdentity(int id);
+  static const ClassID&              retrieveIdentity(const std::string& name);
+
+  static const ObjectListBase* const getObjectList(int classID);
+  static const ObjectListBase* const getObjectList(const std::string& className);
+  static const ObjectListBase* const getObjectList(const ClassID& classID);
+
+  static BaseObject*                    getBaseObject(int classID, const std::string& objectName);
+  static BaseObject*                    getBaseObject(const std::string& className, const std::string& objectName);
+  static BaseObject*                    getBaseObject(const ClassID& classID, const std::string& objectName);
+
+  /** @returns an Object with Name name out of this List @param name the name of the Object. */
+  virtual BaseObject*                   getBaseObject(const std::string& name) const = 0;
+
+  static const std::list<std::string>&  getClassNames();
+
+
+  static unsigned int                   classCount();
+  void                                  debug(unsigned int level) const;
+  static void                           debugAll(unsigned int level);
+
+  static const std::string&             IDToString(int classID);
+  static int                            StringToID(const std::string& className);
+
+  //! Only uset to unsubscribe a BaseObject.
+  virtual void                          unregisterObject(IteratorBase* _iterators) = 0;
+
+protected:
+  ObjectListBase(const std::string& className, int id = -1);
+  virtual ~ObjectListBase();
+
+private:
+  ObjectListBase(const ObjectListBase&);
+
+  static bool                         classIDExists(int id);
+  static bool                         classNameExists(const std::string& className);
+
+
+protected:
+  typedef std::map<int, ObjectListBase*>         classIDMap;   //!< The Generic Map.
+  typedef std::map<std::string, ObjectListBase*> classNameMap; //!< The Generic Map.
+
+private:
+  int                           _id;
+  const std::string             _name;              //!< The Name of the Class.
+  ClassID                    _identity;          //!< The Identity of the Class. (equal to _id and _name)
+
+private:
+  static classIDMap*            _classesByID;       //!< A Map of all the classes in existance.
+  static classNameMap*          _classesByName;     //!< A Map of all the classes in existance.
+  static std::list<std::string> _classNames;        //!< A list of all the registered ClassNames.
+};
+
+
+/////////////////////////
+//// TEMPLATISATION /////
+/////////////////////////
+//! Defines a ObjectsList handler for objects of type T.
+/**
+ * The ObjectList is a generic way to store every object created from a Class 'T'
+ *  into a List. The list can be retrieved, and used constantly over iterators,
+ *  as with normal std::list.
+ *
+ * Furthermore the linkage over the single Lists is given over the Superclass ObjectListBase.
+ *
+ *
+ *
+ *
+ * To define a Class with a ObjectList, you have to:
+ *  1. Include 'ObjectListDeclaration(T);' in its Declaration (at the beginning)
+ *  2. Include 'ObjectListDefinition(T);' in some Definition file (cc-file)
+ *  3. In the constructor add 'registerObject(this, objectList);'
+ *
+ * @note The Class must define the compare with const std::string& operator for this to work.
+ *
+ *
+ *
+ * Limitations:
+ *  ObjectList cannot be used with other Factory style Classes, if the class is also a BaseObject,
+ *   and not loaded before the ObjectList.
+ *
+ * @example Iterating: Iteration is made easy, and fast as follows:
+ *   for (ObjectList<PlayerStats>::const_iterator it = PlayerStats::objectList().begin();
+ *      it != PlayerStats::objectList().end();
+ *     ++it)
+ *   {
+ *    (*it)->dosomething
+ *   }
+ *
+ * @example Find an Object:
+ * Playable* playable = Playable::objectList("orxonox-super-rocket-fighter"); // searches an Object By its name.
+ *
+ */
+template<class T>
+class ObjectList : public ObjectListBase
+{
+public:
+  typedef std::list<T*>                  list;
+  typedef typename list::iterator        iterator;
+  typedef typename list::const_iterator  const_iterator;
+
+
+class Iterator : public ObjectListBase::IteratorBase
+  {
+  public:
+    Iterator(iterator it) { _it = it; }
+    inline iterator& it() { return _it; }
+    typename ObjectList::iterator _it;
+  };
+
+public:
+  ObjectList(const std::string& name, int id = -1);
+  ~ObjectList();
+
+  virtual BaseObject*                getBaseObject(const std::string& name) const;
+  T*                                 getObject(const std::string& name) const;
+  inline const list&                 objects() const { return _objects; };
+  bool                               exists(const T* const object) const;
+
+  /** @returns an Iterator to the beginning of the List. */
+  inline iterator                    begin() { return _objects.begin(); };
+  /** @returns a constant Iterator to the beginning of the List. */
+  inline const_iterator              begin() const { return _objects.begin(); };
+  /** @returns an Iterator to the end of the List. */
+  inline iterator                    end() { return _objects.end(); };
+  /** @returns a constant Iterator to the beginning of the List. */
+  inline const_iterator              end() const { return _objects.end(); };
+
+  /** @returns true if the List is empty. */
+  inline bool                        empty() const { return _objects.empty(); };
+  /** @returns the size of the List */
+  inline int                         size() const { return _objects.size(); };
+  /** @returns the frontmost Element of the list (normaly the last added Object). */
+  inline T*                          front() const { return _objects.front(); };
+  /** @returns the last added Object */
+  inline T*                          back() const { return _objects.back(); };
+
+
+  ObjectListBase::IteratorBase*   registerObject(T* object);
+  virtual void                       unregisterObject(IteratorBase* iterator);
+
+protected:
+  virtual void                       getBaseObjectList(ObjectListBase::base_list* list) const;
+
+
+private:
+  //! the copy constructor will be hidden.
+  ObjectList(const ObjectList& definer) {};
+
+private:
+  list                _objects;     //!< The List of stored Objects of Type T.
+};
+
+
+
+
+
+/////////////////////////
+//// IMPLEMENTATION /////
+/////////////////////////
+/**
+ * @brief creates a new ObjectList
+ * @param name The name of the Class.
+ * @param id The ID of the class if desired, or -1 if an id should be assigned automatically.
+ */
+template <class T>
+ObjectList<T>::ObjectList(const std::string& name, int id)
+    : ObjectListBase(name, id)
+{}
+
+/**
+ * @brief deletes the ObjectList.
+ */
+template <class T>
+ObjectList<T>::~ObjectList()
+{
+  if (!_objects.empty())
+  {
+    // std::cout << "There are " << this->size() << " objects from class " << this->name() << "(id:" << this->id() << ") in existance\n";
+  }
+}
+
+/**
+ * @brief Retrieves a BaseObject matching the Name name in this List.
+ * @param name the Name of the Object.
+ * @returns a BaseObject pointing to the object if found, NULL otherwise.
+ */
+template <class T>
+BaseObject* ObjectList<T>::getBaseObject(const std::string& name) const
+{
+  return this->getObject(name);
+}
+
+
+
+/**
+ * @brief Retrieves an Object of type T matching the Name name in this List.
+ * @param name the Name of the Object.
+ * @returns an Object of type T pointing to the object if found, NULL otherwise.
+ */
+template <class T>
+T* ObjectList<T>::getObject(const std::string& name) const
+{
+  const_iterator it;
+  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
+    if ((*it)->getName() == name)
+      return (*it);
+  return NULL;
+}
+
+/**
+ * @brief checks if Object object exists in this ClassList.
+ * @param object the Object to check for
+ * @returns True if the object is found within the List, false otherwise
+ */
+template <class T>
+    bool ObjectList<T>::exists(const T* const object) const
+{
+  return (std::find(_objects.begin(), _objects.end(), object) != _objects.end());
+}
+
+
+/**
+ * @brief retrieves a List of BaseObjects
+ * @param list the list to push the ObjectList into.
+ */
+template <class T>
+void ObjectList<T>::getBaseObjectList(ObjectListBase::base_list* list) const
+{
+  assert (list != NULL);
+  const_iterator it;
+  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
+    list->push_back(*it);
+}
+
+
+/**
+ * @brief registers an Object to the ObjectList.
+ * @param T object the Object to register.
+ * @returns a pointer to the iterator inside of the list.
+ */
+template <class T>
+ObjectListBase::IteratorBase* ObjectList<T>::registerObject(T* object)
+{
+  this->_objects.push_back(object);
+  return new Iterator(--this->_objects.end());
+}
+
+/**
+ * @brief removes an Object from the ClassList.
+ * @param iterator the Position at which to remove the Object.
+ */
+template <class T>
+void ObjectList<T>::unregisterObject(IteratorBase* iterator)
+{
+  this->_objects.erase(static_cast<Iterator*>(iterator)->it());
+  //_objects.erase(std::find(_objects.begin(), _objects.end(), object));
+}
+
+#endif /* _OBJECT_LIST_H */
Index: branches/new_class_id/src/lib/lang/test_object_list.cc
===================================================================
--- branches/new_class_id/src/lib/lang/test_object_list.cc	(revision 9715)
+++ branches/new_class_id/src/lib/lang/test_object_list.cc	(revision 9716)
@@ -1,4 +1,4 @@
-#include "new_class_id.h"
-#include "new_object_list.h"
+#include "class_id.h"
+#include "object_list.h"
 #include <iostream>
 
