Index: configure.ac
===================================================================
--- configure.ac	(revision d76c105521eae2cb351abe774baa0111bf43e75c)
+++ configure.ac	(revision 5676409856e5052e34e9fef21c20b76578a1384c)
@@ -3,5 +3,5 @@
 
 AC_PREREQ([2.65])
-AC_INIT([CodePatterns], [1.0.5], [heber@ins.uni-bonn.de], [codepatterns], [http://trac.ins.uni-bonn.de/projects/CodePatterns/])
+AC_INIT([CodePatterns], [1.0.6], [heber@ins.uni-bonn.de], [codepatterns], [http://trac.ins.uni-bonn.de/projects/CodePatterns/])
 AC_CONFIG_AUX_DIR(config)
 AC_CONFIG_SRCDIR([src/Patterns/Singleton_impl.hpp])
@@ -25,6 +25,6 @@
 # refer to the libtool manual, section "Updating library version information":
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
-AC_SUBST([CODEPATTERNS_SO_VERSION], [3:0:0])
-AC_SUBST([CODEPATTERNS_API_VERSION], [1.0.5])
+AC_SUBST([CODEPATTERNS_SO_VERSION], [3:1:1])
+AC_SUBST([CODEPATTERNS_API_VERSION], [1.0.6])
 
 # Checks for libraries.
Index: src/Patterns/PrototypeFactory.hpp
===================================================================
--- src/Patterns/PrototypeFactory.hpp	(revision d76c105521eae2cb351abe774baa0111bf43e75c)
+++ src/Patterns/PrototypeFactory.hpp	(revision 5676409856e5052e34e9fef21c20b76578a1384c)
@@ -364,5 +364,6 @@
 
 protected:
-  /** Getter for the true prototype of the product.
+  /** Yields true prototype of the product and sets entry to NULL on
+   *  PrototypeTable.
   *
   * @warning This method is \b intentionally protected such that only
@@ -378,9 +379,11 @@
   {
     ASSERT(enums.count(instance_name) != 0,
-        "PrototypeFactory<"+toString(typeid(T).name())+">::getProduct() - type name "+instance_name+" is not registered.");
-    return dynamic_cast<T *>(PrototypeTable[ enums[instance_name] ]);
-  }
-
-  /** Getter for the true prototype of the product.
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - type name "+instance_name+" is not registered.");
+    T* prototype = dynamic_cast<T *>(PrototypeTable[ enums[instance_name] ]);
+    return prototype;
+  }
+
+  /** Yields true prototype of the product and sets entry to NULL on
+   *  PrototypeTable.
   *
   * @warning This method is \b intentionally protected such that only
@@ -393,9 +396,11 @@
   {
     ASSERT(names.count(instance_type) != 0,
-        "PrototypeFactory<"+toString(typeid(T).name())+">::getProduct() - enum type "+toString(instance_type)+" is not registered.");
-    return dynamic_cast<T *>(PrototypeTable[instance_type]);
-  }
-
-  /** Getter for the true prototype of the product.
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - enum type "+toString(instance_type)+" is not registered.");
+    T* prototype = dynamic_cast<T *>(PrototypeTable[instance_type]);
+    return prototype;
+  }
+
+  /** Yields true prototype of the product and sets entry to NULL on
+   *  PrototypeTable.
   *
   * @warning This method is \b intentionally protected such that only
@@ -408,6 +413,97 @@
   {
     ASSERT(types.count(instance_type_info.name()) != 0,
-        "PrototypeFactory<"+toString(typeid(T).name())+">::getProduct() - type info name "+instance_type_info.name()+" is not registered.");
-    return dynamic_cast<T *>(PrototypeTable[ types[instance_type_info.name()] ]);
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - type info name "+instance_type_info.name()+" is not registered.");
+    T* prototype = dynamic_cast<T *>(PrototypeTable[ types[instance_type_info.name()] ]);
+    return prototype;
+  }
+
+  /** Yields true prototype of the currenttype product and sets entry to NULL
+   *  on PrototypeTable.
+  *
+  * @warning This method is \b intentionally protected such that only
+  * specific friends are allowed to access it.
+  *
+  * @return reference to prototype stored in this factory
+  */
+  T* getPrototypeManipulator()
+  {
+    T* prototype = dynamic_cast<T *>(PrototypeTable[ currenttype ]);
+    return prototype;
+  }
+
+  /** Allows returning (a possibly different) prototype which is stored in
+   *  PrototypeTable.
+   *
+   * @warning a prototype has to be delivered by getPrototypeManipulator()
+   * before it can be returned again.
+   *
+   * @param _newprototype reference to new prototype
+   * @param instance_name name of particular type
+   */
+  void installPrototype(Clone<T> *_newprototype, const std::string instance_name)
+  {
+    ASSERT(enums.count(instance_name) != 0,
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - type name "+instance_name+" is not registered.");
+    ASSERT(typeid(PrototypeTable[ enums[instance_name] ]) == typeid(_newprototype),
+        "PrototypeFactory<"+toString(typeid(T).name())+">::installPrototype() - new prototype is not of the necessary type "+instance_name+".");
+    // TODO: use boost::shared_ptr to store prototypes instead!
+    delete PrototypeTable[ enums[instance_name] ];
+    PrototypeTable[ enums[instance_name] ] = _newprototype;
+  }
+
+  /** Allows returning (a possibly different) prototype which is stored in
+   *  PrototypeTable.
+   *
+   * @warning a prototype has to be delivered by getPrototypeManipulator()
+   * before it can be returned again.
+   *
+   * @param _newprototype reference to new prototype
+   * @param instance_type enumeration index of particular type
+   */
+  void installPrototype(Clone<T> *_newprototype, TypeList instance_type)
+  {
+    ASSERT(names.count(instance_type) != 0,
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - enum type "+toString(instance_type)+" is not registered.");
+    ASSERT( typeid(PrototypeTable[ instance_type ]) == typeid(_newprototype),
+        "PrototypeFactory<"+toString(typeid(T).name())+">::installPrototype() - new prototype is not of the necessary type "+names[instance_type]+".");
+    // TODO: use boost::shared_ptr to store prototypes instead!
+    delete PrototypeTable[ instance_type ];
+    PrototypeTable[ instance_type ] = _newprototype;
+  }
+
+  /** Allows returning (a possibly different) prototype which is stored in
+   *  PrototypeTable.
+   *
+   * @warning a prototype has to be delivered by getPrototypeManipulator()
+   * before it can be returned again.
+   *
+   * @param _newprototype reference to new prototype
+   * @param instance_type_info type_info of particular type
+   */
+  void installPrototype(Clone<T> *_newprototype, const std::type_info &instance_type_info)
+  {
+    ASSERT(types.count(instance_type_info.name()) != 0,
+        "PrototypeFactory<"+toString(typeid(T).name())+">::getPrototypeManipulator() - type info name "+instance_type_info.name()+" is not registered.");
+    ASSERT( typeid(PrototypeTable[ types[instance_type_info.name()] ]) == typeid(_newprototype),
+        "PrototypeFactory<"+toString(typeid(T).name())+">::installPrototype() - new prototype is not of the necessary type "+instance_type_info.name()+".");
+    // TODO: use boost::shared_ptr to store prototypes instead!
+    PrototypeTable[ types[instance_type_info.name()] ] = _newprototype;
+  }
+
+  /** Allows returning (a possibly different) prototype which is stored in
+   *  PrototypeTable.
+   *
+   * @warning a prototype has to be delivered by getPrototypeManipulator()
+   * before it can be returned again.
+   *
+   * @param _newprototype reference to new prototype
+   * @param instance_type_info type_info of particular type
+   */
+  void installPrototype(Clone<T> *_newprototype)
+  {
+    ASSERT( typeid(PrototypeTable[ currenttype ]) == typeid(_newprototype),
+        "PrototypeFactory<"+toString(typeid(T).name())+">::installPrototype() - new prototype is not of the necessary type "+names[currenttype]+".");
+    // TODO: use boost::shared_ptr to store prototypes instead!
+    PrototypeTable[ currenttype ] = _newprototype;
   }
 
Index: src/Patterns/unittests/PrototypeFactoryUnitTest.cpp
===================================================================
--- src/Patterns/unittests/PrototypeFactoryUnitTest.cpp	(revision d76c105521eae2cb351abe774baa0111bf43e75c)
+++ src/Patterns/unittests/PrototypeFactoryUnitTest.cpp	(revision 5676409856e5052e34e9fef21c20b76578a1384c)
@@ -183,2 +183,20 @@
   CPPUNIT_ASSERT( rndA->getcount() == rndA_3->getcount() );
 }
+
+void PrototypeFactoryTest::installPrototypetest()
+{
+  Prototype< teststubs::Aclass> *newprototype = new Prototype< teststubs::Aclass> ();
+  newprototype->setcount(1);
+  PrototypeFactoryStub::getInstance().installPrototype(newprototype, std::string("Aclass"));
+  newprototype = NULL;
+
+  IPrototype *rndA_1 = PrototypeFactoryStub::getInstance().getProduct(std::string("Aclass"));
+  CPPUNIT_ASSERT( 1 == rndA_1->getcount() );
+
+  rndA_1->count();
+  CPPUNIT_ASSERT( 2 == rndA_1->getcount() );
+
+  IPrototype *rndA_2 = PrototypeFactoryStub::getInstance().getProduct(std::string("Aclass"));
+  CPPUNIT_ASSERT( 1 == rndA_2->getcount() );
+  CPPUNIT_ASSERT( rndA_1->getcount() != rndA_2->getcount() );
+}
Index: src/Patterns/unittests/PrototypeFactoryUnitTest.hpp
===================================================================
--- src/Patterns/unittests/PrototypeFactoryUnitTest.hpp	(revision d76c105521eae2cb351abe774baa0111bf43e75c)
+++ src/Patterns/unittests/PrototypeFactoryUnitTest.hpp	(revision 5676409856e5052e34e9fef21c20b76578a1384c)
@@ -27,4 +27,5 @@
   CPPUNIT_TEST ( Individualitytest );
   CPPUNIT_TEST ( PrototypeManipulatortest );
+  CPPUNIT_TEST ( installPrototypetest );
   CPPUNIT_TEST_SUITE_END();
 
@@ -39,4 +40,5 @@
   void Individualitytest();
   void PrototypeManipulatortest();
+  void installPrototypetest();
 
 private:
Index: src/Patterns/unittests/stubs/CloneStub.hpp
===================================================================
--- src/Patterns/unittests/stubs/CloneStub.hpp	(revision d76c105521eae2cb351abe774baa0111bf43e75c)
+++ src/Patterns/unittests/stubs/CloneStub.hpp	(revision 5676409856e5052e34e9fef21c20b76578a1384c)
@@ -39,7 +39,8 @@
 
     /**
-     * Test is friend such that it can access protected cstor.
+     * Tests are friend such that it can access protected cstor.
      */
     friend class CloneTest;
+    friend class PrototypeFactoryTest;
 
 protected:
