Index: src/UIElements/TextUIFactory.cpp
===================================================================
--- src/UIElements/TextUIFactory.cpp	(revision 8cbb9792c39564b3033f03b7e9dc61143585d5f4)
+++ src/UIElements/TextUIFactory.cpp	(revision 190326dfcdf83119424cbc4a7e16803961408c23)
@@ -12,13 +12,8 @@
 
 TextUIFactory::TextUIFactory()
-{
-  // TODO Auto-generated constructor stub
-
-}
+{}
 
 TextUIFactory::~TextUIFactory()
-{
-  // TODO Auto-generated destructor stub
-}
+{}
 
 
@@ -31,2 +26,13 @@
 }
 
+TextUIFactory::description::description() :
+    UIFactory::factoryDescription("Text")
+{}
+
+TextUIFactory::description::~description()
+{}
+
+UIFactory* TextUIFactory::description::makeFactory(){
+  return new TextUIFactory();
+}
+
Index: src/UIElements/TextUIFactory.hpp
===================================================================
--- src/UIElements/TextUIFactory.hpp	(revision 8cbb9792c39564b3033f03b7e9dc61143585d5f4)
+++ src/UIElements/TextUIFactory.hpp	(revision 190326dfcdf83119424cbc4a7e16803961408c23)
@@ -21,4 +21,11 @@
   virtual MainWindow* makeMainWindow(menuPopulaters,MoleculeListClass *, config *, periodentafel *, char *);
 
+  struct description : public UIFactory::factoryDescription {
+    description();
+    virtual ~description();
+
+    virtual UIFactory* makeFactory();
+  };
+
 protected:
   TextUIFactory();
Index: src/UIElements/UIFactory.cpp
===================================================================
--- src/UIElements/UIFactory.cpp	(revision 8cbb9792c39564b3033f03b7e9dc61143585d5f4)
+++ src/UIElements/UIFactory.cpp	(revision 190326dfcdf83119424cbc4a7e16803961408c23)
@@ -7,33 +7,37 @@
 
 
-#include <cassert>
+#include <utility>
 #include "Patterns/Singleton_impl.hpp"
 #include "UIElements/UIFactory.hpp"
+#include "Helpers/Assert.hpp"
 
-// all factories that can be used:
-#include "UIElements/TextUIFactory.hpp"
+using namespace std;
+
+std::map<std::string,boost::shared_ptr<UIFactory::factoryDescription> > UIFactory::factories;
 
 UIFactory::UIFactory()
-{
-  // TODO Auto-generated constructor stub
+{}
 
+UIFactory::~UIFactory()
+{}
+
+void UIFactory::makeUserInterface(std::string type) {
+  ASSERT(factories.count(type),"Selected factory was not registered before creation.");
+  // call the factory factory
+  setInstance(factories[type]->makeFactory());
 }
 
-UIFactory::~UIFactory()
-{
-  // TODO Auto-generated destructor stub
-}
-
-void UIFactory::makeUserInterface(InterfaceTypes type) {
-  switch(type) {
-    case Text :
-      setInstance(new TextUIFactory());
-      break;
-
-    default:
-      assert(0 && "No such Factory in stock");
-      break;
-  }
+void UIFactory::registerFactory(factoryDescription *factoryDesc) {
+  ASSERT(!factories.count(factoryDesc->name),"Trying to re-register an already registered factory.");
+  factories.insert(make_pair(factoryDesc->name,
+                             boost::shared_ptr<factoryDescription>(factoryDesc)));
 }
 
 CONSTRUCT_SINGLETON(UIFactory)
+
+UIFactory::factoryDescription::factoryDescription(string _name) :
+  name(_name)
+{}
+
+UIFactory::factoryDescription::~factoryDescription()
+{}
Index: src/UIElements/UIFactory.hpp
===================================================================
--- src/UIElements/UIFactory.hpp	(revision 8cbb9792c39564b3033f03b7e9dc61143585d5f4)
+++ src/UIElements/UIFactory.hpp	(revision 190326dfcdf83119424cbc4a7e16803961408c23)
@@ -20,4 +20,8 @@
 #include "Patterns/Singleton.hpp"
 
+#include <string>
+#include <map>
+#include <boost/smart_ptr.hpp>
+
 /**
  * Abstract Factory to create any kind of User interface object needed by the programm.
@@ -29,9 +33,6 @@
 class UIFactory : public Singleton<UIFactory,false>
 {
-
+  friend class Singleton<UIFactory,false>;
 public:
-  enum InterfaceTypes {Text};
-  virtual ~UIFactory();
-
   /**
    * Produce some kind of main window, of whichever type was chosen when the factory was created
@@ -47,11 +48,24 @@
 protected:
   UIFactory();
+  virtual ~UIFactory();
 
 public:
+  struct factoryDescription {
+    factoryDescription(std::string _name);
+    virtual ~factoryDescription();
+
+    const std::string name;
+    // yes this method really is a factory factory, to allow insertion of
+    // arbitrary factories
+    virtual UIFactory* makeFactory()=0;
+  };
   /**
    * create a Factory of a certain type. From that moment on only those UIElements can be produced by the factory
    */
-  static void makeUserInterface(InterfaceTypes type);
-
+  static void makeUserInterface(std::string type);
+  static void registerFactory(factoryDescription *factoryDesc);
+protected:
+private:
+  static std::map<std::string,boost::shared_ptr<factoryDescription> > factories;
 };
 
