Index: /trunk/src/lib/Makefile.am
===================================================================
--- /trunk/src/lib/Makefile.am	(revision 9658)
+++ /trunk/src/lib/Makefile.am	(revision 9659)
@@ -7,4 +7,5 @@
 		lang/base_object.cc \
 		lang/class_list.cc \
+		lang/new_class_id.cc \
 		\
 		coord/p_node.cc \
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 9659)
@@ -0,0 +1,68 @@
+/*
+   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 <cassert>
+
+ClassIDDeclaration::ClassIDDeclaration(const std::string& name)
+  : _id(-1), _name(name)
+{
+  NewClassID::registerClass(this);
+}
+
+ClassIDDeclaration::~ClassIDDeclaration()
+{
+  NewClassID::unregisterClass(this);
+}
+
+
+
+///////////////////////////////////////////////////////////
+//// CLASS ID definiton. //////////////////////////////////
+///////////////////////////////////////////////////////////
+/**
+ * @brief standard constructor
+ */
+NewClassID::NewClassID ()
+  : _className("")
+{
+}
+
+
+/**
+ * @brief standard deconstructor
+ */
+NewClassID::~NewClassID ()
+{
+  // delete what has to be deleted here
+}
+
+
+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 9659)
@@ -0,0 +1,58 @@
+/*!
+ * @file new_class_id.h
+ * @brief Definition of a dynamically allocating ClassID
+ *
+ */
+
+#ifndef _NEW_CLASS_ID_H
+#define _NEW_CLASS_ID_H
+
+#include "type_info.h"
+#include <set>
+#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
+{
+public:
+  NewClassID();
+  ~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.
+};
+
+
+#endif /* _NEW_CLASS_ID_H */
Index: /trunk/src/lib/lang/type_info.h
===================================================================
--- /trunk/src/lib/lang/type_info.h	(revision 9659)
+++ /trunk/src/lib/lang/type_info.h	(revision 9659)
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+// The Loki Library
+// Copyright (c) 2001 by Andrei Alexandrescu
+// This code accompanies the book:
+// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design
+//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
+// Permission to use, copy, modify, distribute and sell this software for any
+//     purpose is hereby granted without fee, provided that the above copyright
+//     notice appear in all copies and that both that copyright notice and this
+//     permission notice appear in supporting documentation.
+// The author or Addison-Wesley Longman make no representations about the
+//     suitability of this software for any purpose. It is provided "as is"
+//     without express or implied warranty.
+////////////////////////////////////////////////////////////////////////////////
+
+// Last update: June 20, 2001
+
+#ifndef __TYPE_INFO_H__
+#define __TYPE_INFO_H__
+
+#include <typeinfo>
+#include <cassert>
+////////////////////////////////////////////////////////////////////////////////
+// class TypeInfo
+// Purpose: offer a first-class, comparable wrapper over std::type_info
+////////////////////////////////////////////////////////////////////////////////
+
+class TypeInfo
+{
+public:
+  // Constructors
+  TypeInfo(); // needed for containers
+  TypeInfo(const std::type_info&); // non-explicit
+
+  bool operator==(const TypeInfo& typeInfo) const;
+  bool operator!=(const TypeInfo& typeInfo) const;
+  bool operator<(const TypeInfo& typeInfo) const;
+  bool operator>(const TypeInfo& typeInfo) const;
+  bool operator<=(const TypeInfo& typeInfo) const;
+  bool operator>=(const TypeInfo& typeInfo) const;
+
+  // Access for the wrapped std::type_info
+  const std::type_info& get() const;
+  // Compatibility functions
+  bool before(const TypeInfo& rhs) const;
+  const char* name() const;
+
+private:
+  const std::type_info* pInfo_;
+};
+
+// Implementation
+
+inline TypeInfo::TypeInfo()
+{
+  class Nil {};
+  pInfo_ = &typeid(Nil);
+  assert(pInfo_);
+}
+
+inline TypeInfo::TypeInfo(const std::type_info& ti)
+    : pInfo_(&ti)
+{
+  assert(pInfo_);
+}
+
+inline bool TypeInfo::before(const TypeInfo& rhs) const
+{
+  assert(pInfo_);
+  // type_info::before return type is int in some VC libraries
+  return pInfo_->before(*rhs.pInfo_) != 0;
+}
+
+inline const std::type_info& TypeInfo::get() const
+  {
+    assert(pInfo_);
+    return *pInfo_;
+  }
+
+inline const char* TypeInfo::name() const
+{
+  assert(pInfo_);
+  return pInfo_->name();
+}
+
+// Comparison operators
+
+inline bool TypeInfo::operator==(const TypeInfo& rhs) const
+// type_info::operator== return type is int in some VC libraries
+{ return (this->get() == rhs.get()) != 0; }
+
+inline bool TypeInfo::operator<(const TypeInfo& rhs) const
+{ return this->before(rhs); }
+
+inline bool TypeInfo::operator!=(const TypeInfo& rhs) const
+{ return !(*this == rhs); }
+
+inline bool TypeInfo::operator>(const TypeInfo& rhs) const
+{ return rhs < *this; }
+
+inline bool TypeInfo::operator<=(const TypeInfo& rhs) const
+{ return !(*this > rhs); }
+
+inline bool TypeInfo::operator>=(const TypeInfo& rhs) const
+{ return !(*this < rhs); }
+
+////////////////////////////////////////////////////////////////////////////////
+// Change log:
+// June 20, 2001: ported by Nick Thurn to gcc 2.95.3. Kudos, Nick!!!
+////////////////////////////////////////////////////////////////////////////////
+
+#endif /* __TYPE_INFO_H__ */
Index: /trunk/src/lib/util/smooth.h
===================================================================
--- /trunk/src/lib/util/smooth.h	(revision 9658)
+++ /trunk/src/lib/util/smooth.h	(revision 9659)
@@ -21,5 +21,6 @@
 
   //! A class to handle smoothness of Variables.
-  /** With this smoothing can be achived for many different types of variables.
+  /** 
+   * With this smoothing can be achived for many different types of variables.
    */
   template <typename var_type = float, class iteration_type = LinearIteration<var_type> > class Smooth
Index: /trunk/src/lib/util/timer.h
===================================================================
--- /trunk/src/lib/util/timer.h	(revision 9658)
+++ /trunk/src/lib/util/timer.h	(revision 9659)
@@ -1,3 +1,2 @@
-
 /*!
  * @file timer.h
@@ -33,5 +32,4 @@
     double         _lastTime;
     double         _timeStep;
-
 };
 
