Index: trunk/src/lib/lang/new_class_id.cc
===================================================================
--- trunk/src/lib/lang/new_class_id.cc	(revision 9659)
+++ trunk/src/lib/lang/new_class_id.cc	(revision 9660)
@@ -19,17 +19,4 @@
 #include <cassert>
 
-ClassIDDeclaration::ClassIDDeclaration(const std::string& name)
-  : _id(-1), _name(name)
-{
-  NewClassID::registerClass(this);
-}
-
-ClassIDDeclaration::~ClassIDDeclaration()
-{
-  NewClassID::unregisterClass(this);
-}
-
-
-
 ///////////////////////////////////////////////////////////
 //// CLASS ID definiton. //////////////////////////////////
@@ -39,7 +26,6 @@
  */
 NewClassID::NewClassID ()
-  : _className("")
-{
-}
+    : _className("")
+{}
 
 
@@ -53,16 +39,2 @@
 
 
-int NewClassID::_idCounter = 0;
-
-//! TODO make access to the idCounter ThreadSafe!
-void NewClassID::registerClass(ClassIDDeclaration* namer)
-{
-  assert (namer->id() != -1 && "Do not register any ClassID's for yourself.");
-
-  namer->_id = NewClassID::_idCounter++;
-}
-
-void NewClassID::unregisterClass(ClassIDDeclaration* namer)
-{
-  // here nothing is done, because Classes cannot be realigned fast.
-}
Index: trunk/src/lib/lang/new_class_id.h
===================================================================
--- trunk/src/lib/lang/new_class_id.h	(revision 9659)
+++ trunk/src/lib/lang/new_class_id.h	(revision 9660)
@@ -12,27 +12,4 @@
 #include <string>
 
-#define DeclareClass(ClassName) \
-   ClassIDDeclaration ClassID_##ClassName(ClassName)
-
-class ClassIDDeclaration
-{
-  friend class NewClassID;
-public:
-  ClassIDDeclaration(const std::string& name);
-  ~ClassIDDeclaration();
-
-  int id() const { return _id; };
-  const std::string& name() const { return _name; };
-
-private:
-  //! the copy constructor will be hidden.
-  ClassIDDeclaration(const ClassIDDeclaration& definer) {};
-
-private:
-  int                   _id;
-  std::string           _name;
-};
-
-
 //! A class to dynamically allocate ClassID's and support a isA operator
 class NewClassID
@@ -42,15 +19,7 @@
   ~NewClassID();
 
-
-
-  static int classCount() { return _idCounter; };
-  static void registerClass(ClassIDDeclaration* namer);
-  static void unregisterClass(ClassIDDeclaration* namer);
-
 private:
-  std::set<ClassIDDeclaration>  _types;
   std::string                   _className;
 
-  static int                    _idCounter;      //!< A counter, that gives all classes a Unique ClassID. Access to this Variable is to be Thread-Safe.
 };
 
Index: trunk/src/lib/lang/new_class_list.cc
===================================================================
--- trunk/src/lib/lang/new_class_list.cc	(revision 9660)
+++ trunk/src/lib/lang/new_class_list.cc	(revision 9660)
@@ -0,0 +1,26 @@
+/*
+   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_list.h"
+#include <cassert>
+
+
+NewClassListBase::NewClassListBase(const std::string& className)
+  : _id(-1), _name(className)
+{
+
+}
Index: trunk/src/lib/lang/new_class_list.h
===================================================================
--- trunk/src/lib/lang/new_class_list.h	(revision 9660)
+++ trunk/src/lib/lang/new_class_list.h	(revision 9660)
@@ -0,0 +1,64 @@
+/*!
+ * @file new_class_list.h
+ * @brief Definition of a dynamically allocating ClassID
+ *
+ */
+
+#ifndef _NEW_CLASS_LIST_H
+#define _NEW_CLASS_LIST_H
+
+#include "type_info.h"
+#include <set>
+#include <string>
+
+#define DeclareClass(ClassName) \
+   NewClassList ClassID_##ClassName(ClassName)
+
+#define DeclareInClass(ClassName) \
+   NewClassList classList(ClassName)
+
+class NewClassListBase
+{
+public:
+  int id() const { return _id; };
+  const std::string& name() const { return _name; };
+
+  static int classCount() { return _idCounter; };
+
+protected:
+  NewClassListBase(const std::string& className);
+private:
+  NewClassListBase(const NewClassListBase&);
+
+
+private:
+  int                           _id;
+  std::string                   _name;
+
+private:
+  static int                           _idCounter;      //!< A counter, that gives all classes a Unique ClassID. Access to this Variable is to be Thread-Safe.
+  static std::set<NewClassListBase>    _classes;        //!< A Set of all the classes in existance.
+};
+
+template<class T> class NewClassList : public NewClassListBase
+{
+public:
+  NewClassList(const std::string& name);
+  ~NewClassList();
+
+private:
+  //! the copy constructor will be hidden.
+  NewClassList(const NewClassList& definer) {};
+};
+
+template <class T>
+NewClassList<T>::NewClassList(const std::string& name)
+    : NewClassListBase(name)
+{}
+
+template <class T>
+NewClassList<T>::~NewClassList()
+{}
+
+
+#endif /* _NEW_CLASS_LIST_H */
