Index: /branches/new_class_id/src/lib/coord/p_node.cc
===================================================================
--- /branches/new_class_id/src/lib/coord/p_node.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/coord/p_node.cc	(revision 9684)
@@ -19,5 +19,4 @@
 
 #include "util/loading/load_param.h"
-#include "class_list.h"
 
 #include "netdefs.h"
@@ -38,5 +37,5 @@
   : BaseObject(), Synchronizeable()
 {
-  this->setClassID(CL_PARENT_NODE, "PNode");
+  this->registerObject(this, PNode::_objectList);
 
   this->bRelCoorChanged = true;
@@ -541,5 +540,5 @@
 void PNode::addChild (const std::string& childName)
 {
-  PNode* childNode = dynamic_cast<PNode*>(ClassList::getObject(childName, CL_PARENT_NODE));
+  PNode* childNode = PNode::objectList().getObject(childName);
   //  PRINTF(0)("Adding the Child: %s to: %s\n", childName, this->getName());
   //  assert( childNode != NULL );
@@ -625,5 +624,5 @@
 void PNode::setParent (const std::string& parentName)
 {
-  PNode* parentNode = dynamic_cast<PNode*>(ClassList::getObject(parentName, CL_PARENT_NODE));
+  PNode* parentNode = PNode::objectList().getObject(parentName);
   if (parentNode != NULL)
     parentNode->addChild(this);
@@ -681,5 +680,5 @@
 void PNode::setParentSoft(const std::string& parentName, float bias)
 {
-  PNode* parentNode = dynamic_cast<PNode*>(ClassList::getObject(parentName, CL_PARENT_NODE));
+  PNode* parentNode = PNode::objectList().getObject(parentName);
   if (parentNode != NULL)
     this->setParentSoft(parentNode, bias);
@@ -731,5 +730,5 @@
   {
     PNode::nullParent = new PNode(NULL, PNODE_PARENT_MODE_DEFAULT | PNODE_REPARENT_TO_NULL);
-    PNode::nullParent->setClassID(CL_NULL_PARENT, "NullParent");
+    //PNode::nullParent->registerObject(, CL_NULL_PARENT);
     PNode::nullParent->setName("NullParent");
     PNode::nullParent->setSynchronized(true);
Index: /branches/new_class_id/src/lib/coord/p_node.h
===================================================================
--- /branches/new_class_id/src/lib/coord/p_node.h	(revision 9683)
+++ /branches/new_class_id/src/lib/coord/p_node.h	(revision 9684)
@@ -74,5 +74,7 @@
 //! Patent Node is a Engine to calculate the position of an Object in respect to the position of its parent.
 class PNode : virtual public BaseObject, virtual public Synchronizeable {
- public:
+  NewObjectListDeclaration(PNode);
+
+  public:
   PNode (PNode* parent = PNode::getNullParent(), long nodeFlags = PNODE_PARENT_MODE_DEFAULT);
   virtual ~PNode ();
Index: /branches/new_class_id/src/lib/graphics/importer/height_map.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/height_map.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/height_map.cc	(revision 9684)
@@ -327,4 +327,5 @@
 
 
+NewObjectListDefinition(HeightMap);
 
 
@@ -413,5 +414,5 @@
 void HeightMap::init(const std::string& heightMapName)
 {
-  this->setClassID(CL_HEIGHT_MAP, "HeightMap");
+  this->registerObject(this, HeightMap::_objectList);
 
   this->shiftX = 0;
Index: /branches/new_class_id/src/lib/graphics/importer/height_map.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/height_map.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/height_map.h	(revision 9684)
@@ -29,7 +29,5 @@
 
 class SDL_Surface;
-class Vector;
 class Material;
-class PNode;
 class Texture;
 class HeightMap;
@@ -70,7 +68,9 @@
 
 
+
 //!< the height map representation itself
 class HeightMap : public VertexArrayModel
 {
+  NewObjectListDeclaration(HeightMap);
   friend class Tile;
 
Index: /branches/new_class_id/src/lib/graphics/importer/interactive_model.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/interactive_model.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/interactive_model.cc	(revision 9684)
@@ -22,4 +22,6 @@
 
 
+NewObjectListDefinition(InteractiveModel);
+
 /**
  * standard constructor
@@ -28,5 +30,5 @@
 InteractiveModel::InteractiveModel()
 {
-  this->setClassID(CL_INTERACTIVE_MODEL, "InteractiveModel");
+  this->registerObject(this, InteractiveModel::_objectList);
 }
 
Index: /branches/new_class_id/src/lib/graphics/importer/interactive_model.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/interactive_model.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/interactive_model.h	(revision 9684)
@@ -30,4 +30,5 @@
 class InteractiveModel : public Model
 {
+  NewObjectListDeclaration(InteractiveModel);
   public:
     InteractiveModel();
Index: /branches/new_class_id/src/lib/graphics/importer/model.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/model.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/model.cc	(revision 9684)
@@ -20,5 +20,5 @@
 #include "glincl.h"
 
-
+NewObjectListDefinition(Model);
 
 /**
@@ -28,5 +28,5 @@
 Model::Model()
 {
-  this->setClassID(CL_MODEL, "Model");
+  this->registerObject(this, Model::_objectList);
   this->pModelInfo.numVertices = 0;
   this->pModelInfo.numTriangles = 0;
Index: /branches/new_class_id/src/lib/graphics/importer/model.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/model.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/model.h	(revision 9684)
@@ -54,4 +54,5 @@
 //! This class defines the basic components of a model
 class Model : virtual public BaseObject {
+  NewObjectListDeclaration(Model);
 
   public:
Index: /branches/new_class_id/src/lib/graphics/importer/objModel.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/objModel.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/objModel.cc	(revision 9684)
@@ -27,4 +27,5 @@
 #include "compiler.h"
 
+NewObjectListDefinition(OBJModel);
 /**
  * @brief Crates a 3D-Model, loads in a File and scales it.
@@ -35,5 +36,5 @@
   : StaticModel(fileName)
 {
-  this->setClassID(CL_OBJ_MODEL, "OBJModel");
+  this->registerObject(this, OBJModel::_objectList);
 
   this->objPath = "./";
Index: /branches/new_class_id/src/lib/graphics/importer/objModel.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/objModel.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/objModel.h	(revision 9684)
@@ -12,5 +12,6 @@
 class OBJModel : public StaticModel
 {
- public:
+  NewObjectListDeclaration(OBJModel);
+  public:
    OBJModel(const std::string& fileName, float scaling = 1.0);
   virtual ~OBJModel();
Index: /branches/new_class_id/src/lib/graphics/importer/static_model.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/static_model.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/static_model.cc	(revision 9684)
@@ -129,7 +129,11 @@
 
 
+
+
 /////////////
 /// MODEL ///
 /////////////
+NewObjectListDefinition(StaticModel);
+
 /**
  * @brief Creates a 3D-Model.
@@ -139,5 +143,5 @@
 StaticModel::StaticModel(const std::string& modelName)
 {
-  this->setClassID(CL_STATIC_MODEL, "StaticModel");
+  this->registerObject(this, StaticModel::_objectList);
   PRINTF(4)("new 3D-Model is being created\n");
   this->setName(modelName);
Index: /branches/new_class_id/src/lib/graphics/importer/static_model.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/static_model.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/static_model.h	(revision 9684)
@@ -94,5 +94,6 @@
 class StaticModel : public Model
 {
- public:
+  NewObjectListDeclaration(StaticModel);
+  public:
   StaticModel(const std::string& modelName = "");
   virtual ~StaticModel();
Index: /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.cc
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.cc	(revision 9684)
@@ -24,4 +24,5 @@
 
 
+NewObjectListDefinition(VertexArrayModel);
 
 /////////////
@@ -35,5 +36,5 @@
 VertexArrayModel::VertexArrayModel()
 {
-  this->setClassID(CL_MODEL, "VertexArrayModel");
+  this->registerObject(this, VertexArrayModel::_objectList);
 
   this->newStripe();
@@ -49,5 +50,5 @@
 VertexArrayModel::VertexArrayModel(const Model& model)
 {
-  this->setClassID(CL_MODEL, "VertexArrayModel");
+  this->registerObject(this, VertexArrayModel::_objectList);
 
   // importing the data to the new Model.
Index: /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.h
===================================================================
--- /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.h	(revision 9683)
+++ /branches/new_class_id/src/lib/graphics/importer/vertex_array_model.h	(revision 9684)
@@ -27,5 +27,6 @@
 class VertexArrayModel : public Model
 {
- public:
+  NewObjectListDeclaration(VertexArrayModel);
+  public:
   VertexArrayModel();
   VertexArrayModel(const Model& model);
Index: /branches/new_class_id/src/lib/lang/Makefile.am
===================================================================
--- /branches/new_class_id/src/lib/lang/Makefile.am	(revision 9683)
+++ /branches/new_class_id/src/lib/lang/Makefile.am	(revision 9684)
@@ -9,5 +9,4 @@
 libORXlang_a_SOURCES = \
 		base_object.cc \
-		class_list.cc \
 		new_class_id.cc \
 		new_object_list.cc
@@ -15,5 +14,4 @@
 noinst_HEADERS = \
 		base_object.h \
-		class_list.h \
 		new_class_id.h \
 		new_object_list.h
Index: /branches/new_class_id/src/lib/lang/base_object.cc
===================================================================
--- /branches/new_class_id/src/lib/lang/base_object.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/lang/base_object.cc	(revision 9684)
@@ -20,5 +20,4 @@
 
 #include "util/loading/load_param.h"
-#include "class_list.h"
 
 /**
@@ -28,9 +27,7 @@
 BaseObject::BaseObject(const std::string& objectName)
 {
-  this->classID = CL_BASE_OBJECT;
   this->className = "BaseObject";
 
   this->objectName = objectName;
-  this->classList = NULL;
   this->xmlElem = NULL;
 
@@ -43,5 +40,11 @@
 BaseObject::~BaseObject ()
 {
-  ClassList::removeFromClassList(this);
+  /// Remove from the NewObjectLists
+  ClassList::iterator it;
+  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+  {
+    (*it)._objectList->unregisterObject((*it)._iterator);
+    delete (*it)._iterator;
+  }
 
   if (this->xmlElem != NULL)
@@ -69,22 +72,4 @@
 
 /**
- * @brief sets the class identifiers
- * @param id a number for the class from class_id.h enumeration
- * @param className the class name
-*/
-void BaseObject::setClassID(ClassID classID, const std::string& className)
-{
-  //printf("%s(0x%.8X)->%s(0x%.8X)\n", this->className, this->classID, className, classID);
-  assert (!(this->classID & classID & !CL_MASK_SUBSUPER_CLASS_IDA ));
-
-  this->leafClassID = classID;
-  this->classID |= (long)classID;
-  this->className = className;
-
-  this->classList = ClassList::addToClassList(this, classID, this->classID, className);
-}
-
-
-/**
  * @brief set the name of the Object
  * @param objectName The new name of the Object.
@@ -97,71 +82,53 @@
 
 /**
- * @brief queries for the ClassID of the Leaf Class (the last made class of this type
- * @returns the ClassID of the Leaf Class (e.g. the ID of the Class)
- *
- * the returned ID can be used to generate new Objects of the same type through
- * Factory::fabricate(Object->getLeafClassID());
+ * @brief Seeks in the Inheritance if it matches objectList.
+ * @param objectList The ObjectList this should be a member of (by Pointer-comparison).
+ * @return True if found, false if not.
  */
-const ClassID& BaseObject::getLeafClassID() const
+bool BaseObject::isA(const NewObjectListBase& objectList) const
 {
-  return this->leafClassID;
+  ClassList::const_iterator it;
+  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+    if ((*it)._objectList == &objectList)
+      return true;
+  return false;
 }
 
-
+/**
+ * @brief Seeks in the Inheritance if it matches objectList.
+ * @param classID The ClassID of the class this should be a member of.
+ * @return True if found, false if not.
+ */
+bool BaseObject::isA(int classID) const
+{
+  ClassList::const_iterator it;
+  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+    if (*(*it)._objectList == classID)
+      return true;
+  return false;
+}
 
 /**
- * @brief checks if the class is a classID
- * @param classID the Identifier to check for
- * @returns true if it is, false otherwise
-*/
-bool BaseObject::isA (ClassID classID) const
+ * @brief Seeks in the Inheritance if it matches objectList.
+ * @param className The ClassName of the class this should be a member of.
+ * @return True if found, false if not.
+ */
+bool BaseObject::isA(const std::string& className) const
 {
-  // if classID is a derivable object from a SUPERCLASS
-  if (classID & CL_MASK_SUPER_CLASS)
-  {
-    if( likely(this->classID & classID))
+  ClassList::const_iterator it;
+  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+    if (*(*it)._objectList == className)
       return true;
-  }
-  // if classID is a SubSuperClass, and
-  else if (classID & CL_MASK_SUBSUPER_CLASS)
-  {
-    if (likely(((this->classID & CL_MASK_SUBSUPER_CLASS_IDA) == (classID & CL_MASK_SUBSUPER_CLASS_IDA)) &&
-        this->classID & classID & CL_MASK_SUBSUPER_CLASS_IDB))
-      return true;
-  }
-  // if classID is a LOWLEVEL-class
-  else
-  {
-    if( likely((this->classID & CL_MASK_LOWLEVEL_CLASS) == classID))
-      return true;
-  }
   return false;
 }
 
 
+void BaseObject::listInheritance() const
+{
+  PRINT(0)("Listing inheritance diagram for ....: ");
+  ClassList::const_iterator it;
+  for (it = this->_classes.begin(); it != this->_classes.end(); ++it)
+    PRINT(0)(" -> %s(id:%d)", (*it)._objectList->name().c_str(), (*it)._objectList->id());
+  PRINT(0)("\n");
 
-/**
- * @brief checks if the class is a classID
- * @param classID the Identifier to check for
- * @returns true if it is, false otherwise
- */
-bool BaseObject::isA (const std::string& className) const
-{
-  ClassID classID = ClassList::StringToID(className);
-  if (classID != CL_NULL)
-    return this->isA(classID);
-  else
-    return false;
 }
-
-
-/**
- * @brief compares the ObjectName with an external name
- * @param objectName: the name to check.
- * @returns true on match, false otherwise.
- */
-bool BaseObject::operator==(const std::string& objectName) const
-{
-  return (this->objectName == objectName);
-}
-
Index: /branches/new_class_id/src/lib/lang/base_object.h
===================================================================
--- /branches/new_class_id/src/lib/lang/base_object.h	(revision 9683)
+++ /branches/new_class_id/src/lib/lang/base_object.h	(revision 9684)
@@ -14,5 +14,5 @@
 #define __BASE_OBJECT_H_
 
-#include "class_id.h"
+#include "new_object_list.h"
 #include "sigslot/slot.h"
 
@@ -41,21 +41,27 @@
   inline TiXmlNode* getXmlElem() const { return this->xmlElem; };
 
-  /** @returns the className of the corresponding Object */
-  inline const std::string& getClassName() const { return this->className; }
+  //  /** @returns the className of the corresponding Object */
+  //inline const std::string& getClassName() const { return this->className; }
   /** @returns the className of the corresponding Object as a C-compliant string (const char*) */
   inline const char* getClassCName() const { return this->className.c_str(); };
-  /** @returns the classID of the corresponding Object */
-  inline int getClassID() const { return this->classID; };
-  const ClassID& getLeafClassID() const;
+  /** @returns the ClassName of the Topmost Object of the ClassStack */
+  inline const std::string& getClassName() const { return _classes.front()._objectList->name(); }
 
-  bool isA (ClassID classID) const;
-  bool isA (const std::string& className) const;
+  /** @returns the ID of the Topmost object of the ClassStack */
+  inline int getLeafClassID() const { return _classes.front()._objectList->id(); }
+
+  bool isA(const NewObjectListBase& objectList) const;
+  bool isA(int classID) const;
+  bool isA(const std::string& className) const;
+
+  void listInheritance() const;
 
   /** @param classID comparer for a ClassID @returns true on match, false otherwise */
-  bool operator==(ClassID classID) const  { return this->isA(classID); };
-  bool operator==(const std::string& objectName) const;
+  bool operator==(int classID) const  { return this->isA(classID); };
+  /** @param objectName: the name to check. * @returns true on match, false otherwise. */
+  bool operator==(const std::string& objectName) const { return this->objectName == objectName;};
 
 protected:
-  void setClassID(ClassID classID, const std::string& className);
+  template<class T> void registerObject(T* object, NewObjectList<T>& list);
 
 protected:
@@ -63,12 +69,40 @@
 
 private:
-  std::string        className;        //!< the name of the class
-  long               classID;          //!< this is the id from the class_id.h enumeration
-  ClassID            leafClassID;      //!< The Leaf Class ID
-
-  ClassList*         classList;        //!< Pointer to the ClassList this Object is inside of
 
   TiXmlNode*         xmlElem;          //!< The XML Element with wich this Object was loaded(saved).
+
+  //////////////////////////////
+  //// Type Definition Part ////
+  //////////////////////////////
+  //! A ClassEntry so we can store Classes inside of Objects
+  struct ClassEntry
+  {
+    /** Simple Constuctor @param objectList the NewObjectList, @param iterator the (intrusive) Iterator inside of the ObjectList */
+    inline ClassEntry (NewObjectListBase* objectList, NewObjectListBase::IteratorBase* iterator) : _objectList(objectList), _iterator(iterator) {}
+    NewObjectListBase*                _objectList;  //!< A ObjectList this Object is part of
+    NewObjectListBase::IteratorBase*  _iterator;    //!< An iterator pointing to the position of the Object inside of the List.
+  };
+  typedef std::list<ClassEntry>        ClassList;   //!< Type definition for the List.
+
+  std::string                         className;    //!< the name of the class
+  ClassList                           _classes;     //!< All Classes this object is part of.
+
 };
 
+
+/**
+ * @brief Registeres an Object of Type T to objectList
+ * @param object The Object to append to the objectList.
+ * @param objectList The ObjectList to append the Object to.
+ *
+ * This function is essential to integrate objects into their designated ObjectList.
+ * Remember if you do not want objects to be stored in Lists (less overhead),
+ * do not attempt to call this function.
+ */
+template<class T>
+inline void BaseObject::registerObject(T* object, NewObjectList<T>& objectList)
+{
+  this->_classes.push_front(ClassEntry(&objectList, objectList.registerObject(object)));
+}
+
 #endif /* __BASE_OBJECT_H_ */
Index: anches/new_class_id/src/lib/lang/class_list.cc
===================================================================
--- /branches/new_class_id/src/lib/lang/class_list.cc	(revision 9683)
+++ 	(revision )
@@ -1,402 +1,0 @@
-/*
-   orxonox - the future of 3D-vertical-scrollers
-
-   Copyright (C) 2004 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_list.h"
-#include "base_object.h"
-
-#include "compiler.h"
-#include "debug.h"
-#include <cmath>
-
-
-
-/**
- * @brief Creates a new ClassList
-*/
-ClassList::ClassList(ClassID classID, unsigned long classIDFull, const std::string& className)
-  : className(className)
-{
-  this->classID = classID;
-  this->classIDFull = classIDFull;
-}
-
-/**
- * @brief standard deconstructor
-*/
-ClassList::~ClassList ()
-{
-//   ClassList::classList->clear());
-}
-
-//! a List of all known Classes.
-std::list<ClassList>* ClassList::classList = NULL;
-
-//! a List of all strings of all classes, that have registered so far.
-std::list<std::string> ClassList::classNames;
-
-/**
- * @brief Adds a new Object to the ClassList (and if necessary a new Class)
- * @param objectPointer Pointer to the Object at hand
- * @param classID ID of the Given ObjectType \see ClassID
- * @param className name of the Class to add
- *
- * !! FIRST YOU HAVE TO CALL THIS FUNCTION ONCE
- * !! Before unsing the ClassList, as it creates the ClassLits
- */
-ClassList* ClassList::addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className)
-{
-  if (unlikely(classList == NULL))
-    ClassList::classList = new std::list<ClassList>();
-
-  PRINTF(5)("subscribe a '%s'\n", className.c_str() );
-
-  ClassList* regClass = ClassList::getClassList(classID);
-  if (regClass != NULL)
-  {
-    regClass->objectList.push_back(objectPointer);
-    return regClass;
-  }
-  else
-  {
-    ClassList::classList->push_back(ClassList(classID, classIDFull, className));
-    ClassList::classList->back().objectList.push_back(objectPointer);
-    return &ClassList::classList->back();
-  }
-}
-
-/**
- * @brief removes an Object from a the ClassList
- * @param objectPointer the Object to delete from the List
- */
-void ClassList::removeFromClassList(BaseObject* objectPointer)
-{
-  std::list<ClassList>::iterator cl;
-  for(cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-  {
-    if (objectPointer->isA((*cl).classID))
-    {
-      std::list<BaseObject*>::iterator bo = std::find ((*cl).objectList.begin(), (*cl).objectList.end(), objectPointer);
-      if (bo != (*cl).objectList.end())
-          (*cl).objectList.erase(bo);
-    }
-  }
-}
-
-/**
- * @brief grabs the names of all Classes, and injects it into a List of const chars
- * @return the generated List
- *
- * This function first looks, if the List has been changed (by the ListSize)
- * befor it changes anything.
- */
-const std::list<std::string>* ClassList::getClassNames()
-{
-  if (ClassList::classNames.size() != ClassList::classList->size())
-  {
-      ClassList::classNames.clear();
-
-      std::list<ClassList>::const_iterator cl;
-      for (cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-        ClassList::classNames.push_back((*cl).className);
-  }
-
-  return &ClassList::classNames;
-}
-
-/**
- * @brief searches for classID and returns the list of Entities
- * @param classID the ID of the class to get the list from
- * @return the List accessed by classID, or NULL if not found
- */
-const std::list<BaseObject*>* ClassList::getList(ClassID classID)
-{
-  ClassList* fl;
-  return ((fl = ClassList::getClassList(classID)) != NULL)?
-       &(fl->objectList) : NULL;
-
-/*
-  std::list<ClassList>::iterator classIT = find (classList->begin(), classList->end(), classID);
-  return (likely(classIT != classList->end()))? &(*classIT).objectList : NULL;*/
-
-/*  for (classIT = ClassList::classList->begin(); classIT != ClassList::classList->end(); classIT++)
-  {
-    if ((*classIT) == classID )
-      return &(*classIT).objectList;
-  }
-  return NULL;*/
-}
-
-/**
- * @brief searches for className and returns the list of Entities
- * @param className the name of the class to get the list from
- * @return the List accessed by classID, or NULL if not found
- */
-const std::list<BaseObject*>* ClassList::getList(const std::string& className)
-{
-  ClassList* fl;
-  return ((fl = ClassList::getClassList(className)) != NULL)?
-      &(fl->objectList) : NULL;
-
-  /*
-  std::list<ClassList>::iterator classIT = find (classList->begin(), classList->end(), className);
-  return (likely(classIT != classList->end()))? &(*classIT).objectList : NULL;*/
-
-
-/*  for (classIT = ClassList::classList->begin(); classIT != ClassList::classList->end(); classIT++)
-  {
-    if ((*classIT) == className )
-      return &(*classIT).objectList;
-  }
-  return NULL;*/
-}
-
-/**
- * !!PRIVATE!!
- * @param classID the ClassID to search for
- * @returns the ClassList with classID as specifyer, or NULL if not
- */
-ClassList* ClassList::getClassList(ClassID classID)
-{
-  std::list<ClassList>::iterator classIT = find (ClassList::classList->begin(), ClassList::classList->end(), classID);
-  return (likely(classIT != classList->end()))? &(*classIT) : NULL;
-}
-
-
-/**
- * !!PRIVATE!!
- * @param className the ClassName to search for
- * @returns the ClassList with className as specifyer, or NULL if not
- */
-ClassList* ClassList::getClassList(const std::string& className)
-{
-  if (className.empty())
-    return NULL;
-  std::list<ClassList>::iterator classIT = find (classList->begin(), classList->end(), className);
-  return (likely(classIT != classList->end()))? &(*classIT) : NULL;
-}
-
-
-/**
- * @brief checks if the BaseObject* object exists.
- * @param objectName the name of the BaseObject to look for
- * @param classID if not CL_NULL it will only search through a specific type of Objects. Otherwise it will be searched everywhere.
- * @return true, if the Object Exists in the specified ClassID, false otherwise
- * @todo: speed this up!!
- */
-BaseObject* ClassList::getObject(const std::string& objectName, ClassID classID)
-{
-  if (classID != CL_NULL)
-  {
-    ClassList* cl = ClassList::getClassList(classID);
-    if (cl != NULL)
-    {
-      std::list<BaseObject*>::iterator bo;
-      for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
-        if (objectName == (*bo)->getName())
-          return (*bo);
-    }
-  }
-  else
-  {
-    std::list<ClassList>::iterator cl;
-    for (cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-    {
-      std::list<BaseObject*>::iterator bo;
-      for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
-        if (objectName == (*bo)->getName())
-          return (*bo);
-    }
-  }
-  return NULL;
-}
-
-
-/**
- * @brief checks if the BaseObject* object exists.
- * @param objectName the name of the BaseObject to look for
- * @param classID if not CL_NULL it will only search through a specific type of Objects. Otherwise it will be searched everywhere.
- * @return true, if the Object Exists in the specified ClassID, false otherwise
- * @todo: speed this up!!
- */
-BaseObject* ClassList::getObject(const std::string& objectName, const std::string& className)
-{
-
-  ClassList* cl = ClassList::getClassList(className);
-  if (cl != NULL)
-  {
-    std::list<BaseObject*>::iterator bo;
-    for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
-      if (objectName == (*bo)->getName())
-        return (*bo);
-  }
-  return NULL;
-}
-
-
-/**
- * @brief checks if the BaseObject* object exists.
- * @param object the Pointer to a BaseObject to check if it exists
- * @param classID if not CL_NULL it will only search through a specific type of Objects. Otherwise it will be searched everywhere.
- * @return true, if the Object Exists in the specified ClassID, false otherwise
- * @todo: speed this up!!
- */
-bool ClassList::exists(const BaseObject* object, ClassID classID)
-{
-  if (classID != CL_NULL)
-  {
-    ClassList* cl = ClassList::getClassList(classID);
-    if (cl != NULL)
-    {
-      std::list<BaseObject*>::const_iterator bo = std::find (cl->objectList.begin(), cl->objectList.end(), object);
-      return (bo != cl->objectList.end());
-    }
-  }
-  else
-  {
-    std::list<ClassList>::iterator cl;
-    for (cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-    {
-      std::list<BaseObject*>::const_iterator bo = std::find ((*cl).objectList.begin(), (*cl).objectList.end(), object);
-      if (bo != (*cl).objectList.end())
-        return true;
-    }
-  }
-  return false;
-}
-
-bool ClassList::exists(const std::string& className, const std::string& objectName)
-{
-  ClassList* cl = ClassList::getClassList(className);
-  if (likely(cl != NULL))
-  {
-    std::list<BaseObject*>::iterator bo;
-    for (bo = cl->objectList.begin(); bo != cl->objectList.end(); bo++)
-      if (objectName == (*bo)->getName())
-        return true;
-  }
-  return false;
-}
-
-
-/**
- * @brief prints out a string of all the types this Object matches
- * @param object a Pointer to the object to analyze
- */
-void ClassList::whatIs(const BaseObject* object)
-{
-  std::list<ClassList>::iterator cl;
-  for (cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-    if (object->isA((*cl).classID))
-  {
-    PRINT(0)("=%s::0x%.8X=-", (*cl).className.c_str(), (*cl).classID);
-  }
-}
-
-/**
- * @brief converts a ClassID into a string
- * @param classID the ClassID to search for
- * @return a String containing the name of the Class, NULL if the Class was not found
- */
-const std::string& ClassList::IDToString(ClassID classID)
-{
-  static const std::string empty("");
-
-  ClassList* cl = ClassList::getClassList(classID);
-  return (cl != NULL) ? cl->className : empty;
-}
-
-/**
- * @brief converts a String into a ClassID
- * @param className the name of the class to search for
- * @return the ClassID. CL_NULL, if the class was not found.
- */
-ClassID ClassList::StringToID(const std::string& className)
-{
-  ClassList* cl = ClassList::getClassList(className);
-  return (cl != NULL) ? cl->classID : CL_NULL;
-}
-
-/**
- * @brief checks if this ClassList is named className
- * @param className the Name to check this ClassList's ClassName against
- * @returns true on match, false otherwise
- */
-bool ClassList::operator==(const std::string& className)
-{
-  return (this->className == className);
-}
-
-
-
-/**
- * @brief Print out some very nice debug information
- * @param debugLevel the level of verbosity
- * @param classID the class that should be displayed (if CL_NULL (default) all classes will be displayed)
- */
-void ClassList::debug(unsigned int debugLevel, ClassID classID)
-{
-  if (debugLevel > 3)
-    debugLevel = 3;
-  PRINT(0)("==========================\n");
-  PRINT(0)("=  CLASS_LIST (level %d)  =\n", debugLevel);
-  PRINT(0)("==========================\n");
-  PRINT(0)("| knows %d Classes\n|\n", ClassList::classList->size());
-  char niceString[100];
-  int lenCount = 0;
-
-  std::list<ClassList>::iterator cl;
-  for (cl = ClassList::classList->begin(); cl != ClassList::classList->end(); cl++)
-  {
-    if ((debugLevel >= 1 || (*cl).objectList.size() > 0 ) &&
-         (classID == CL_NULL || unlikely (classID == (*cl).classID)))
-    {
-      lenCount = 1;
-      while (std::pow((float)10, (int)lenCount) <= (*cl).objectList.size())
-        ++lenCount;
-      for (unsigned int i=0; i < 30-(*cl).className.size() - lenCount; i++)
-        (niceString[i]) = ' ';
-      niceString[30-(*cl).className.size() - lenCount] = '\0';
-
-      PRINT(0)("| CLASS %s::%s %d\n", (*cl).className.c_str(), niceString, (*cl).objectList.size());
-
-      if (debugLevel >=2 && (*cl).objectList.size() > 0)
-      {
-        PRINT(0)("|  Listing Instances:\n");
-        std::list<BaseObject*>::const_iterator bo;
-        for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
-        {
-          PRINT(0)("|   %s::%s::(0x%.8X->%p ", (*bo)->getClassCName(), (*bo)->getCName(), (*bo)->getClassID(), (*bo));
-          if (debugLevel == 3)
-            ClassList::whatIs(*bo);
-          PRINT(0)("\n");
-        }
-      }
-    }
-  }
-  PRINT(0)("=======================CL=\n");
-}
-
-/**
- * @brief Print out some very nice debug information
- * @param debugLevel the level of verbosity
- * @param className the class that should be displayed.
- * @see ClassList::debug
- */
-void ClassList::debugS(const std::string& className, unsigned int debugLevel)
-{
-  ClassList::debug(debugLevel, ClassList::StringToID(className));
-}
Index: anches/new_class_id/src/lib/lang/class_list.h
===================================================================
--- /branches/new_class_id/src/lib/lang/class_list.h	(revision 9683)
+++ 	(revision )
@@ -1,79 +1,0 @@
-/*!
- * @file class_list.h
-  *  Definition of the Class List, that handles a Class-Specific-Control structure
-
- */
-
-#ifndef _CLASS_LIST_H
-#define _CLASS_LIST_H
-
-#include "class_id.h"
-#include <list>
-#include <string>
-
-// FORWARD DECLARATION
-class BaseObject;
-
-//! A class that handles Pointers to Objects of all type.
-/**
- * here all the Pointers to all the Object of orxonox are stored, that implement BaseObject
- * for now.
- * You can get Any Object's Reference to BaseObject with dynamic_cast<T>(ClassList::getObject(name, CL_T_NAME));
- *  where: T: is the Class to cast to,
- *   name: the name of the Object (not className)
- *   CL_T_NAME: the class Identifier, (if CL_NULL or nothing it will take longer, because all BaseObject's are searched through)
- *
- * There is also the exists-function, that just checks, if a Reference is still in existence.
- *
- * @see ClassID, BaseObject, dynamic_cast
- */
-class ClassList {
-  friend class BaseObject;
-
-  public:
-    ClassList(ClassID classID, unsigned long classIDFull, const std::string& className);
-    virtual ~ClassList();
-
-    static const std::list<BaseObject*>*  getList(ClassID classID = CL_NULL);// { return (ClassList* fl = ClassList::getClassList(classID) != NULL)? &(fl->objectList) : NULL; };
-    static const std::list<BaseObject*>*  getList(const std::string& className); // { return (ClassList* fl = ClassList::getClassList(className) != NULL)? &(fl->objectList) : NULL;  };
-    static const std::list<std::string>*  getClassNames();
-    static BaseObject*                    getObject(const std::string& objectName, ClassID classID = CL_NULL);
-    static BaseObject*                    getObject(const std::string& objectName, const std::string& className);
-    static bool                           exists(const BaseObject* object, ClassID classID = CL_NULL);
-    static bool                           exists(const std::string& className, const std::string& objectName);
-
-    void                                  sendBack(std::list<BaseObject*>::const_iterator it);
-
-    static void                           whatIs(const BaseObject* object);
-
-    static const std::string&             IDToString(ClassID classID = CL_NULL);
-    static ClassID                        StringToID(const std::string& className);
-    static void                           debug(unsigned int debugLevel = 0, ClassID classID = CL_NULL);
-    static void                           debugS(const std::string& className = "", unsigned int debugLevel = 0);
-
-    inline bool                           operator==(ClassID classID) { return (this->classID == classID); };
-    bool                                  operator==(const std::string& className);
-    inline ClassID                        getLeafClassID() const { return this->classID; };
-
-  private:
-    /* MAINTENANCE FUNCTIONS THESE ARE !!ONLY FOR BASEOBJECT !! */
-    static ClassList*                     addToClassList(BaseObject* objectPointer, ClassID classID, unsigned long classIDFull, const std::string& className);
-    static void                           removeFromClassList(BaseObject* objectPointer);
-
-    static ClassList*                     getClassList(ClassID classID);
-    static ClassList*                     getClassList(const std::string& className);
-
-  private:
-    ClassID                               classID;                //!< ClassID stored in this ClassList
-    unsigned long                         classIDFull;            //!< The Full ClassID of this Class.
-
-    const std::string                     className;              //!< Name of the Class Stored here
-
-    std::list<BaseObject*>                objectList;             //!< A list of Objects belonging to this Class
-
-    // STATIC MEMBERS
-    static std::list<ClassList>*          classList;              //!< The first Class in the List
-    static std::list<std::string>         classNames;             //!< a List of all Names of all classes, that have registered so far.
-};
-
-#endif /* _CLASS_LIST_H */
Index: /branches/new_class_id/src/lib/lang/new_object_list.h
===================================================================
--- /branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9683)
+++ /branches/new_class_id/src/lib/lang/new_object_list.h	(revision 9684)
@@ -16,8 +16,11 @@
 
 #define NewObjectListDeclaration(ClassName) \
-   static NewObjectList<ClassName> objectList
+  public: \
+   static const NewObjectList<ClassName>& objectList() { return ClassName::_objectList; }; \
+  private: \
+   static NewObjectList<ClassName> _objectList
 
 #define NewObjectListDefinitionID(ClassName, ID) \
-   NewObjectList<ClassName> ClassName::objectList(#ClassName, ID)
+   NewObjectList<ClassName> ClassName::_objectList(#ClassName, ID)
 
 
@@ -157,9 +160,9 @@
 T* NewObjectList<T>::getObject(const std::string& name) const
 {
-  iterator it = std::find(this->_objects.begin(), this->_objects.end(), name);
-  if (it != this->_objects.end())
-    return *it;
-  else
-    return NULL;
+  const_iterator it;
+  for (it = this->_objects.begin(); it != this->_objects.end(); ++it)
+    if ((*it)->getName() == name)
+      return (*it);
+  return NULL;
 }
 
Index: /branches/new_class_id/src/lib/util/executor/executor.cc
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/executor/executor.cc	(revision 9684)
@@ -18,7 +18,7 @@
 #include "executor.h"
 
-////////////////////////
-// SHELL COMMAND BASE //
-////////////////////////
+
+NewObjectListDefinition(Executor);
+
 /**
  * @brief constructs and registers a new Command
@@ -35,5 +35,5 @@
                    const MultiType& param6)
 {
-  this->setClassID(CL_EXECUTOR, "Executor");
+  this->registerObject(this, Executor::_objectList);
 
   // What Parameters have we got
Index: /branches/new_class_id/src/lib/util/executor/executor.h
===================================================================
--- /branches/new_class_id/src/lib/util/executor/executor.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/executor/executor.h	(revision 9684)
@@ -38,4 +38,5 @@
 class Executor : public BaseObject
 {
+  NewObjectListDeclaration(Executor);
   public:
     virtual ~Executor();
Index: /branches/new_class_id/src/lib/util/loading/dynamic_loader.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/dynamic_loader.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/dynamic_loader.cc	(revision 9684)
@@ -24,5 +24,5 @@
 
 
-
+NewObjectListDefinition(DynamicLoader);
 
 /**
@@ -31,7 +31,7 @@
 */
 DynamicLoader::DynamicLoader (const std::string& libName)
-    : Factory(NULL, CL_NULL)
+    : Factory(NULL, 0)
 {
-  this->setClassID(CL_DYNAMIC_LOADER, "DynamicLoader");
+  this->registerObject(this, DynamicLoader::_objectList);
 
   this->handle = NULL;
Index: /branches/new_class_id/src/lib/util/loading/dynamic_loader.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/dynamic_loader.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/dynamic_loader.h	(revision 9684)
@@ -19,4 +19,5 @@
 class DynamicLoader : public Factory
 {
+  NewObjectListDeclaration(DynamicLoader);
 
 public:
Index: /branches/new_class_id/src/lib/util/loading/factory.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/factory.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/factory.cc	(revision 9684)
@@ -19,5 +19,5 @@
 //#include "shell_command.h"
 
-
+NewObjectListDefinition(Factory);
 
 //SHELL_COMMAND(create, Factory, fabricate);
@@ -28,8 +28,8 @@
  * set everything to zero and define factoryName
  */
-Factory::Factory (const std::string& factoryName, ClassID classID)
+Factory::Factory (const std::string& factoryName, int classID)
     : classID(classID), className(factoryName)
 {
-  this->setClassID(CL_FACTORY, "Factory");
+  this->registerObject(this, Factory::_objectList);
   this->setName(factoryName);
 
@@ -74,5 +74,5 @@
  * @returns true on match, false otherwise
  */
-bool Factory::operator==(ClassID classID) const
+bool Factory::operator==(int classID) const
 {
   return (this->classID == classID);
@@ -149,5 +149,5 @@
  * @returns a new Object of Type classID on match, NULL otherwise
  */
-BaseObject* Factory::fabricate(ClassID classID)
+BaseObject* Factory::fabricate(int classID)
 {
   if (Factory::factoryList == NULL)
Index: /branches/new_class_id/src/lib/util/loading/factory.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/factory.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/factory.h	(revision 9684)
@@ -38,7 +38,8 @@
 
 //! The Factory is a loadable object handler
-class Factory : public BaseObject {
-
- public:
+class Factory : public BaseObject
+{
+  NewObjectListDeclaration(Factory);
+public:
   virtual ~Factory ();
 
@@ -46,20 +47,20 @@
 
   static  BaseObject* fabricate(const std::string& className);
-  static  BaseObject* fabricate(ClassID classID);
+  static  BaseObject* fabricate(int classID);
   static  BaseObject* fabricate(const TiXmlElement* root = NULL);
 
 
-  bool operator==(ClassID classID) const;
+  bool operator==(int classID) const;
   bool operator==(const char* className) const;
   bool operator==(const std::string& className) const;
 
-  protected:
-    Factory (const std::string& factoryName, ClassID classID);
-    virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
+protected:
+  Factory (const std::string& factoryName, int classID);
+  virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
 
-  protected:
-    const ClassID                 classID;              //!< The Class-Identifyer of the Factory.
-    const std::string             className;            //!< The name of the Class.
-    static std::list<Factory*>*   factoryList;          //!< List of Registered Factories
+protected:
+  const int                     classID;              //!< The Class-Identifyer of the Factory.
+  const std::string             className;            //!< The name of the Class.
+  static std::list<Factory*>*   factoryList;          //!< List of Registered Factories
 };
 
@@ -70,24 +71,24 @@
 template<class T> class tFactory : public Factory
 {
- public:
- /**
-  * @brief creates a new type Factory to enable the loading of T
-  * @param factoryName the Name of the Factory to load.
-  * @param classID the ID of the Class to be created.
-  */
-  tFactory (const char* factoryName, ClassID classID)
-   : Factory(factoryName, classID)
+public:
+  /**
+   * @brief creates a new type Factory to enable the loading of T
+   * @param factoryName the Name of the Factory to load.
+   * @param classID the ID of the Class to be created.
+   */
+  tFactory (const char* factoryName, int classID)
+      : Factory(factoryName, classID)
   {  }
 
-  private:
-   /**
-    * @brief fabricates an Object of type T, with the constructor T::T(const TiXmlElemnt*)
-    * @param root the TiXmlElement T should load parameters from.
-    * @return the newly fabricated T.
-    */
-    virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const
-    {
-      return new T(root);
-    }
+private:
+  /**
+   * @brief fabricates an Object of type T, with the constructor T::T(const TiXmlElemnt*)
+   * @param root the TiXmlElement T should load parameters from.
+   * @return the newly fabricated T.
+   */
+  virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const
+  {
+    return new T(root);
+  }
 };
 
Index: /branches/new_class_id/src/lib/util/loading/game_loader.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/game_loader.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/game_loader.cc	(revision 9684)
@@ -28,4 +28,5 @@
 #include "key_mapper.h"
 
+NewObjectListDefinition(GameLoader);
 
 
@@ -43,5 +44,5 @@
 GameLoader::GameLoader ()
 {
-  this->setClassID(CL_GAME_LOADER, "GameLoader");
+  this->registerObject(this, GameLoader::_objectList);
   this->setName("GameLoader");
   this->bRun = true;
@@ -57,5 +58,5 @@
     delete this->currentCampaign;
   this->currentCampaign = NULL;
-  
+
   GameLoader::singletonRef = NULL;
 }
Index: /branches/new_class_id/src/lib/util/loading/game_loader.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/game_loader.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/game_loader.h	(revision 9684)
@@ -38,5 +38,6 @@
 class GameLoader : public EventListener
 {
- public:
+  NewObjectListDeclaration(GameLoader);
+  public:
   virtual ~GameLoader ();
   /**  this class is a singleton class @returns an instance of itself  */
Index: /branches/new_class_id/src/lib/util/loading/resource_manager.cc
===================================================================
--- /branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/resource_manager.cc	(revision 9684)
@@ -50,5 +50,5 @@
 #include <unistd.h>
 
-
+NewObjectListDefinition(ResourceManager);
 
 /**
@@ -57,5 +57,5 @@
 ResourceManager::ResourceManager ()
 {
-  this->setClassID(CL_RESOURCE_MANAGER, "ResourceManager");
+  this->registerObject(this, ResourceManager::_objectList);
   this->setName("ResourceManager");
 
Index: /branches/new_class_id/src/lib/util/loading/resource_manager.h
===================================================================
--- /branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/loading/resource_manager.h	(revision 9684)
@@ -94,5 +94,6 @@
 class ResourceManager : public BaseObject
 {
- public:
+  NewObjectListDeclaration(ResourceManager);
+public:
   virtual ~ResourceManager();
   /** @returns a Pointer to the only object of this Class */
@@ -101,5 +102,5 @@
   bool setDataDir(const std::string& dataDir);
   /** @returns the Name of the data directory */
-  inline const std::string& getDataDir() const { return this->dataDir; };
+inline const std::string& getDataDir() const { return this->dataDir; };
 
 
@@ -139,10 +140,10 @@
   static ResourceType stringToResourceType(const std::string& resourceType);
 
- private:
+private:
   ResourceManager();
   Resource* loadResource(const std::string& fileName, ResourceType type, ResourcePriority prio,
                          const MultiType& param0, const MultiType& param1, const MultiType& param2);
 
- private:
+private:
   static ResourceManager*    singletonRef;       //!< singleton Reference
 
Index: /branches/new_class_id/src/lib/util/preferences.cc
===================================================================
--- /branches/new_class_id/src/lib/util/preferences.cc	(revision 9683)
+++ /branches/new_class_id/src/lib/util/preferences.cc	(revision 9684)
@@ -20,4 +20,5 @@
 #include "debug.h"
 
+NewObjectListDefinition(Preferences);
 
 /**
@@ -26,5 +27,5 @@
 Preferences::Preferences ()
 {
-   this->setClassID(CL_PREFERENCES, "Preferences");
+  this->registerObject(this, Preferences::_objectList);
    this->setName("Preferences");
    this->fileName = "";
Index: /branches/new_class_id/src/lib/util/preferences.h
===================================================================
--- /branches/new_class_id/src/lib/util/preferences.h	(revision 9683)
+++ /branches/new_class_id/src/lib/util/preferences.h	(revision 9684)
@@ -29,5 +29,5 @@
 //! A default singleton class.
 class Preferences : public BaseObject {
-
+  NewObjectListDeclaration(Preferences);
  public:
    virtual ~Preferences(void);
Index: /branches/new_class_id/src/world_entities/weapons/ammo_container.h
===================================================================
--- /branches/new_class_id/src/world_entities/weapons/ammo_container.h	(revision 9683)
+++ /branches/new_class_id/src/world_entities/weapons/ammo_container.h	(revision 9684)
@@ -22,5 +22,5 @@
   virtual ~AmmoContainer();
 
-  bool operator=(ClassID projectileType) const { return (this->projectileType == projectileType); };
+  bool operator=(int projectileType) const { return (this->projectileType == projectileType); };
   ClassID getProjectileType() const { return this->projectileType; };
 
