Index: branches/new_class_id/src/util/Makefile.am
===================================================================
--- branches/new_class_id/src/util/Makefile.am	(revision 9707)
+++ branches/new_class_id/src/util/Makefile.am	(revision 9709)
@@ -4,5 +4,5 @@
 noinst_LIBRARIES = libORXutils.a
 
-libORXutils_a_SOURCES = fast_factory.cc \
+libORXutils_a_SOURCES = \
 			object_manager.cc \
 			state.cc \
@@ -31,5 +31,5 @@
 			track/track_node.cc
 
-noinst_HEADERS =        fast_factory.h \
+noinst_HEADERS =        \
 			object_manager.h \
 			state.h \
Index: branches/new_class_id/src/util/fast_factory.cc
===================================================================
--- branches/new_class_id/src/util/fast_factory.cc	(revision 9707)
+++ 	(revision )
@@ -1,284 +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
-*/
-
-#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD
-
-#include "fast_factory.h"
-
-#include "compiler.h"
-#include "debug.h"
-#include <string.h>
-
-
-NewObjectListDefinition(FastFactory);
-
-/**
- * @brief Initializes a FastFactory
- * @param classID the ClassID this Class belongs to (the top-most)
- * @param fastFactoryName the Name of the ObjectClass-handled here
- * @return a new FastFactory
- */
-FastFactory::FastFactory (const NewClassID& classID, const std::string& fastFactoryName)
-{
-  this->registerObject(this, FastFactory::_objectList);
-  this->setName(fastFactoryName);
-
-  this->storedClassID = classID;
-  this->next = NULL;
-
-  this->deadList = NULL;
-  this->unusedContainers = NULL;
-
-  this->storedDeadObjects = 0;
-
-  FastFactory::registerFastFactory(this);
-}
-
-/** a reference to the First FastFactory */
-FastFactory* FastFactory::first = NULL;
-
-/**
- *  destructor
- * deletes all the Instances of the FastFactory.
- */
-FastFactory::~FastFactory ()
-{
-  if (this == first)
-    this->first = NULL;
-  this->flush();
-
-  if (this->next)
-    delete this->next;
-}
-
-/**
- * deletes all FastFactories
- */
-void FastFactory::deleteAll()
-{
-  if (FastFactory::first)
-    delete FastFactory::first;
-}
-
-/**
- * registers a Factory to the List of known factories.
- * @param fastFactory The factory to add
- *
- * needed, to step through all the FastFactories.
- */
-void FastFactory::registerFastFactory(FastFactory* fastFactory)
-{
-  PRINTF(4)("Registered FastFactory for '%s'\n", fastFactory->getCName());
-
-  if( FastFactory::first == NULL)
-    FastFactory::first = fastFactory;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while( tmpFac->next != NULL)
-      tmpFac = tmpFac->next;
-    tmpFac->setNext(fastFactory);
-  }
-}
-
-/**
- * searches for a FastFactory
- * @param classID the ClassID of the FastFactory to search for
- * @returns true if found, false otherwise.
- */
-FastFactory* FastFactory::searchFastFactory(const NewClassID& classID)
-{
-  if (FastFactory::first == NULL)
-    return NULL;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (tmpFac->storedClassID == classID)
-        return tmpFac;
-      tmpFac = tmpFac->next;
-    }
-  }
-  return NULL;
-}
-
-/**
- * searches for a FastFactory
- * @param classID the ClassID of the FastFactory to search for
- * @returns true if found, false otherwise.
- */
-FastFactory* FastFactory::searchFastFactory(const std::string& fastFactoryName)
-{
-  if (FastFactory::first == NULL)
-    return NULL;
-  else
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (fastFactoryName == tmpFac->getCName())
-        return tmpFac;
-      tmpFac = tmpFac->next;
-    }
-  }
-  return NULL;
-}
-
-/**
- * Removes all the stored Containers, and sets the Lists back to emptienes.
- * @param hardFLUSH if true the containing Objects will also be deleted !! THIS IS DANGEROUS !!
- */
-void FastFactory::flushAll(bool hardFLUSH)
-{
-  FastFactory* tmpFac = FastFactory::first;
-  while (tmpFac != NULL)
-  {
-    PRINTF(4)("DELETEING ALL OF %s\n",tmpFac->getCName());
-    tmpFac->flush(hardFLUSH);
-    tmpFac = tmpFac->next;
-  }
-}
-
-/**
- * ereases all the remaining containers, without deleting the stored Objects inside of them.
- * @param hardFLUSH if the the containing Objects will also be deleted !! THIS IS DANGEROUS !!
- */
-void FastFactory::flush(bool hardFLUSH)
-{
-  FastObjectMember* tmpMember = this->deadList, *delMember = NULL;
-  while (tmpMember != NULL)
-  {
-    delMember = tmpMember;
-    tmpMember = tmpMember->next;
-    if (hardFLUSH)
-    {
-      delete delMember->objectPointer;
-    }
-    delete delMember;
-  }
-  this->deadList = NULL;
-
-  tmpMember = this->unusedContainers;
-  while (tmpMember != NULL)
-  {
-    delMember = tmpMember;
-    tmpMember = tmpMember->next;
-    delete delMember;
-  }
-  this->unusedContainers = NULL;
-}
-
-/**
- * generates count new Object of the Corresponding class. (precaching)
- * @param count How many instances of the class should be generated.
- */
-void FastFactory::prepare(unsigned int count)
-{
-/*  if (this->storedDeadObjects + this->storedLivingObjects >= count)
-  {
-  PRINTF(3)("not creating new Objects for class %s, because the requested count already exists\n", this->getClassCName());
-}*/
-  for (unsigned int i = this->storedDeadObjects; i < count; i++)
-  {
-    this->fabricate();
-  }
-}
-
-/**
- * gives back live to one Object.
- * @return the Object to resurrect.
- */
-BaseObject* FastFactory::resurrect()
-{
-  PRINTF(4)("Resurecting Object of type %s\n", this->getCName());
-  if (unlikely(this->deadList == NULL))
-  {
-    PRINTF(3)("The deadList of Class %s is empty, this may be either because it has not been filled yet, or the cache is to small.\n" \
-        "  Developer: try increasing the count with FastFactory::prepare(contHigher than actual)\n" \
-        "    Fabricating a new %s\n", this->getCName(), this->getCName());
-    this->fabricate();
-    return this->resurrect();
-  }
-  else
-  {
-    FastObjectMember* tmpC = this->deadList;
-    this->deadList = this->deadList->next;
-
-    tmpC->next = this->unusedContainers;
-    this->unusedContainers = tmpC;
-
-    return tmpC->objectPointer;
-  }
-}
-
-/**
- * gives back live to one Object.
- * @param classID the class From which to resurrect an Object.
- * @return the Object to resurrect, NULL if classID is not found.
- */
-BaseObject* FastFactory::resurrect(const NewClassID& classID)
-{
-  FastFactory* tmpFac = FastFactory::getFirst();
-
-  while (tmpFac != NULL)
-  {
-    if (classID == tmpFac->storedClassID)
-      return tmpFac->resurrect();
-    tmpFac = tmpFac->next;
-  }
-  return NULL;
-}
-
-/**
- * kills Object object, meaning, that it will be stored in the deadList of the FastFactory, and waiting for resurrection
- * @param object the Object to kill.
- *
- * synony that would be really grate would be abolish, but this is more like exterminate than pause-mode.
- */
-void FastFactory::kill(BaseObject* object)
-{
-  FastObjectMember* tmpC;
-  if (unlikely(this->unusedContainers == NULL))
-  {
-    tmpC = new FastObjectMember;
-  }
-  else
-  {
-    tmpC = this->unusedContainers;
-    this->unusedContainers = this->unusedContainers->next;
-  }
-
-  tmpC->next = this->deadList;
-  tmpC->objectPointer = object;
-  this->deadList = tmpC;
-}
-
-
-void FastFactory::kill(BaseObject* object, bool searchForFastFactory)
-{
-  if (likely(searchForFastFactory == true))
-  {
-    FastFactory* tmpFac = FastFactory::first;
-    while (tmpFac != NULL)
-    {
-      if (object->isA(tmpFac->storedClassID))
-      {
-        tmpFac->kill(object);
-        return;
-      }
-      tmpFac = tmpFac->next;
-    }
-  }
-}
Index: branches/new_class_id/src/util/fast_factory.h
===================================================================
--- branches/new_class_id/src/util/fast_factory.h	(revision 9707)
+++ 	(revision )
@@ -1,176 +1,0 @@
-/*!
- * @file fast_factory.h
- * The ObjectManager (FastFactory) is designed, to automatically generate and remove
- * (without to much overhead) many instances of different classes.
- *
- * It is especially usefull for objects, that come only for a short time into existence,
- * and get killed after a small amount of time (like shots).
- *
- * The Creation of an Object is usually done in the Weapon Class, where one subscribes
- * a Projectile with:
- * this->bulletFactory = tFastFactory<TestBullet>::getFastFactory(CL_TEST_BULLET, "TestBullet");
- * (this might change over time).
- * Then you can at loading time initialize an amount of the class with something like:
- * this->bulletFactory->prepare(100); // creates 100 entities of TestBullet (dead ones)
- * afterwards one can just retrieve an Object form the Class with
- * this->bulletFactory->resurrect();  // this returns a BaseObject an Object of the class.
- *
- * The big difference to the FastFactory-class is, that this one is used more for the purpose
- * of fast game-interaction than for loading. althought one can also load FastFactorized classes
- * it is not the main topic.
- */
-
-#ifndef _FAST_FACTORY_H
-#define _FAST_FACTORY_H
-
-#include "base_object.h"
-/**
- * Creates a FastFactory to a Createable FastFactory.
- */
-#define CREATE_FAST_FACTORY(CLASS_NAME, CLASS_ID) \
-  FastFactory* global_##CLASS_NAME##_FastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_ID, #CLASS_NAME)
-/**
- * Creates a FastFactory for a Class' static function named ClassName::fastFactory.
- * @param CLASS_NAME the name of the Class to create the fast-factory for.
- * @param CLASS_ID the ID of the class to create the fast-factory for @see "class_id.h"
- *
- * notice, that the Class to be called, must implement:
- * static FastFactory*         fastFactory;
- */
-#define CREATE_FAST_FACTORY_STATIC(CLASS_NAME) \
-  FastFactory* CLASS_NAME::fastFactory = tFastFactory<CLASS_NAME>::getFastFactory(CLASS_NAME::classID(), #CLASS_NAME)
-
-//! A struct, that holds Lists of Objects of a certain type.
-typedef struct FastObjectMember
-{
-  BaseObject*          objectPointer;      //!< Pointer to the Object Stored in this Class (if it is the DeadList, else it is bork)
-
-  FastObjectMember*    next;               //!< the next stored FastObjectMember. (or NULL if this is the last one stored in either the deadList or the unusedContainers)
-};
-
-//! The FastFactory is a fast loadable object creator, and Dynamic List of dead object handler.
-/**
- * The ObjectManager (FastFactory) is designed, to automatically generate and remove
- * (without to much overhead) many instances of different classes.
- *
- * FastFactory is needed to glue all the tFastFactories together.
- * It is also the general class that implements the necessary functions
- * to generate, resurrect kill and stuff...
- */
-class FastFactory : public BaseObject
-{
-  NewObjectListDeclaration(FastFactory);
-
-public:
-  virtual ~FastFactory ();
-  static void deleteAll();
-
-  // functions to push and pop elements of this class
-  BaseObject* resurrect();
-  static BaseObject* resurrect(const NewClassID& classID);
-  void kill(BaseObject* object);
-  static void kill(BaseObject* object, bool searchForFastFactory);
-
-  void prepare(unsigned int count);
-
-  static void flushAll(bool hardFLUSH = false);
-  void flush(bool hardFLUSH = false);
-
-  /** @returns the first FastFactory */
-  inline static FastFactory* getFirst() { return FastFactory::first; };
-
-  static FastFactory* searchFastFactory(const NewClassID& classID);
-  static FastFactory* searchFastFactory(const std::string& fastFactoryName);
-
-  const NewClassID& getStoredID() const { return this->storedClassID; };
-
-protected:
-  FastFactory (const NewClassID& classID, const std::string& fastFactoryName = "");
-
-  /** sets the Next factory in the list @param nextFactory the next factory */
-  inline void setNext( FastFactory* nextFastFactory) { this->next = nextFastFactory; };
-  /** @returns the next FastFactory */
-  FastFactory* getNext() const { return this->next; };
-
-  /** generates a new Object of the Class T */
-  virtual void fabricate() = 0;
-
-private:
-  static void registerFastFactory(FastFactory* fastFactory);
-
-protected:
-  NewClassID            storedClassID;        //!< The classID of the specified class.
-  unsigned int          storedDeadObjects;    //!< How many dead objects are stored in this class
-
-  FastObjectMember*     deadList;             //!< A List of all stored dead Objects of this class.
-  FastObjectMember*     unusedContainers;     //!< This is a List of unused containers, that will be reused by kill.
-
-private:
-  static FastFactory*   first;                //!< A pointer to the first FastFactory.
-
-  FastFactory*          next;                 //!< pointer to the next FastFactory.
-};
-
-
-
-/**
- *  a FastFactory that is able to load any kind of Object from a ClassID
- * (this is a Functor)
- */
-template<class T>
-class tFastFactory : public FastFactory
-{
-public:
-  static tFastFactory<T>* getFastFactory(const NewClassID& classID, const std::string& fastFactoryName = NULL);
-
-private:
-  tFastFactory(const NewClassID& classID, const std::string& fastFactoryName);
-
-  virtual void fabricate();
-};
-
-/**
- * construnts a FastFactory with
- * @param fastFactoryName the name of the FastFactory
- * @param fastFactory the ID of the class
- * @todo (can this be written in another form??)
- */
-template<class T>
-tFastFactory<T>::tFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
-    : FastFactory(classID, fastFactoryName)
-{}
-
-/**
- * creates (if not existent) a Factory of Class T, and assigns some values to it
- * @param classID the ClassID to assign to this class
- * @param fastFactoryName the name to assign
- * @returns The FastFactory if existent a new Factory if not.
- */
-template<class T>
-tFastFactory<T>* tFastFactory<T>::getFastFactory(const NewClassID& classID, const std::string& fastFactoryName)
-{
-  tFastFactory<T>* tmpFac = NULL;
-  if (FastFactory::getFirst() != NULL)
-    tmpFac = static_cast<tFastFactory<T>*>(FastFactory::getFirst()->searchFastFactory(classID));
-
-  if (tmpFac != NULL)
-    return tmpFac;
-  else
-    return new tFastFactory<T>(classID, fastFactoryName);
-}
-
-/**
- * fabricates an Object of Class T, that corresponds to classID.
- */
-template<class T>
-void tFastFactory<T>::fabricate()
-{
-  FastObjectMember* tmpFirstDead = new FastObjectMember;
-  tmpFirstDead->objectPointer = new T();
-  tmpFirstDead->next = this->deadList;
-  ++this->storedDeadObjects;
-
-  this->deadList = tmpFirstDead;
-}
-
-#endif /* _FAST_FACTORY_H */
Index: branches/new_class_id/src/util/kill_target.cc
===================================================================
--- branches/new_class_id/src/util/kill_target.cc	(revision 9707)
+++ branches/new_class_id/src/util/kill_target.cc	(revision 9709)
@@ -23,6 +23,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(KillTarget, CL_KILL_TARGET);
 NewObjectListDefinitionID(KillTarget, CL_KILL_TARGET);
+CREATE_FACTORY(KillTarget);
 
 
Index: branches/new_class_id/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9707)
+++ branches/new_class_id/src/util/multiplayer_team_deathmatch.cc	(revision 9709)
@@ -50,6 +50,6 @@
 #include "class_id.h"
 
-CREATE_FACTORY(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
 NewObjectListDefinitionID(MultiplayerTeamDeathmatch, CL_MULTIPLAYER_TEAM_DEATHMATCH);
+CREATE_FACTORY(MultiplayerTeamDeathmatch);
 /**
  * constructor
Index: branches/new_class_id/src/util/singleplayer_shootemup.cc
===================================================================
--- branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9707)
+++ branches/new_class_id/src/util/singleplayer_shootemup.cc	(revision 9709)
@@ -26,6 +26,6 @@
 
 #include "class_id.h"
-CREATE_FACTORY(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
 NewObjectListDefinitionID(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
+CREATE_FACTORY(SingleplayerShootemup);
 
 /**
