Index: src/RandomNumbers/RandomNumberGeneratorFactory.hpp
===================================================================
--- src/RandomNumbers/RandomNumberGeneratorFactory.hpp	(revision 3f9eba726fa6ba97ad9f47ad397aa83f8f1fc923)
+++ src/RandomNumbers/RandomNumberGeneratorFactory.hpp	(revision c9bc2b7e55bf61ed1abfd0a5314ce53adea45fa9)
@@ -16,14 +16,14 @@
 #include "CodePatterns/Singleton.hpp"
 
-#include "RandomNumberDistribution.hpp"
-#include "RandomNumberEngine.hpp"
-#include "RandomNumberGenerator.hpp"
+#include "RandomNumberDistributionFactory.hpp"
+#include "RandomNumberEngineFactory.hpp"
 
 #include <map>
 
-#include "TemplatePowerSetGenerator.hpp"
-#include "RandomNumberGeneratorFactory.def"
+#include "RandomNumberGenerator_Creator.hpp"
 
 #include "unittests/RandomNumberGeneratorFactoryUnitTest.hpp"
+
+class RandomNumberGenerator;
 
 /** This is the abstract factory class for random number generators.
@@ -40,4 +40,5 @@
   friend class Singleton<RandomNumberGeneratorFactory>;
   friend class RandomNumberGeneratorFactoryTest;
+
 public:
 
@@ -47,25 +48,9 @@
 
 public:
-  /** Enumeration of all (pseudo-)random number engines implemented in
-   *  boost::random, see
-   *  http://www.boost.org/doc/libs/1_45_0/doc/html/boost_random/reference.html#boost_random.reference.concepts
-   */
-  enum Engine {
-BOOST_PP_REPEAT( engine_seq_size, seqitems_as_enum, engine_seq)
-,
-BOOST_PP_REPEAT( engine_seq_a_size, seqitems_as_enum, engine_seq_a)
-  };
-
-  /** Enumeration of all distribution implemented in random::boost.
-   */
-  enum Distribution {
-BOOST_PP_REPEAT( distribution_seq_size, seqitems_as_enum, distribution_seq)
-  };
-
   /** Create a Generator of previously set type.
    *
    * \return random number generator instance
    */
-  RandomNumberGenerator& makeRandomNumberGenerator() const;
+  RandomNumberGenerator* makeRandomNumberGenerator() const;
 
   /** Create a Generator of desired combination of engine and distribution.
@@ -75,8 +60,9 @@
    *
    * \param engine_type name of engine, give empty string for current default
-   * \param distribution_type name of distribution, give empty string for current default
+   * \param distribution_type name of distribution, give empty string for
+   *        current default
    * \return random number generator instance
    */
-  RandomNumberGenerator& makeRandomNumberGenerator(std::string engine_type, std::string distribution_type) const;
+  RandomNumberGenerator* makeRandomNumberGenerator(std::string engine_type, std::string distribution_type) const;
 
   /** Specify the precise type of the engine to build
@@ -86,9 +72,9 @@
   void setEngine(std::string engine_type);
 
-  /** Getter for current type of engine.
+  /** Getter for the name of the current type of engine.
    *
    * @return name of engine
    */
-  const std::string &getEngine() const;
+  const std::string &getEngineName() const;
 
   /** Specify the precise type of the distribution to build
@@ -98,9 +84,9 @@
   void setDistribution(std::string distribution_type);
 
-  /** Getter for current type of distribution.
+  /** Getter for the name of the current type of distribution.
    *
    * @return name of distribution
    */
-  const std::string &getDistribution() const;
+  const std::string &getDistributionName() const;
 
 protected:
@@ -109,51 +95,17 @@
    *  and stores them in \a PrototypeTable.
    */
-  void FillPrototypeTables();
+  void FillPrototypeTable();
 
   typedef std::map<
-      std::string,
-      enum Engine
-      > EngineMap;
-  typedef std::map<
-      enum Engine,
-      RandomNumberEngine *
-      > EngineTable;
-  typedef std::map<
-      enum Engine,
-      std::string
-        > EngineNamesMap;
-
-  typedef std::map<
-      std::string,
-      enum Distribution
-      > DistributionMap;
-  typedef std::map<
-      enum Distribution,
-      RandomNumberDistribution *
-      > DistributionTable;
-  typedef std::map<
-      enum Distribution,
-      std::string
-      > DistributionNamesMap;
-
-  typedef std::map<
-      enum Engine,
+      enum RandomNumberEngineFactory::Engine,
       std::map<
-        enum Distribution,
-        RandomNumberGenerator *>
+        enum RandomNumberDistributionFactory::Distribution,
+        IRandomNumberGenerator_Creator *>
   > EngineDistributionTable;
 
-  static enum Engine engine;
-  static enum Distribution distribution;
-  static EngineMap engines;
-  static EngineTable EnginePrototypeTable;
-  static EngineNamesMap engineNames;
-  static DistributionMap distributions;
-  static DistributionTable DistributionPrototypeTable;
-  static DistributionNamesMap distributionNames;
+  static enum RandomNumberDistributionFactory::Distribution distribution;
+  static enum RandomNumberEngineFactory::Engine engine;
   static EngineDistributionTable GeneratorPrototypeTable;
 };
 
-#include "RandomNumberGeneratorFactory.undef"
-
 #endif /* RANDOMNUMBERGENERATORFACTORY_HPP_ */
