Index: src/Parser/Parameters/ContinuousParameter.hpp
===================================================================
--- src/Parser/Parameters/ContinuousParameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/ContinuousParameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,36 @@
+/*
+ * ContinuousParameter.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+#ifndef CONTINUOUSPARAMETER_HPP_
+#define CONTINUOUSPARAMETER_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "ContinuousValue.hpp"
+#include "Parameter.hpp"
+
+/** This class encapsulates a clonable, continuous value.
+ *
+ */
+template <typename T>
+class ContinuousParameter : public Parameter, public ContinuousValue<T>
+{
+public:
+  ContinuousParameter();
+  ContinuousParameter(const range<T> &_ValidRange);
+  virtual ~ContinuousParameter();
+
+  Parameter* clone() const;
+};
+
+#include "ContinuousParameter_impl.hpp"
+
+#endif /* CONTINUOUSPARAMETER_HPP_ */
Index: src/Parser/Parameters/ContinuousParameter_impl.hpp
===================================================================
--- src/Parser/Parameters/ContinuousParameter_impl.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/ContinuousParameter_impl.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,54 @@
+/*
+ * ContinuousParameter_impl.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+#ifndef CONTINUOUSPARAMETER_IMPL_HPP_
+#define CONTINUOUSPARAMETER_IMPL_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ContinuousParameter.hpp"
+
+/** Constructor for class ContinuousParameter.
+ *
+ */
+template<typename T>
+ContinuousParameter<T>::ContinuousParameter()
+{};
+
+/** Constructor for class ContinuousParameter.
+ *
+ * @param _ValidRange valid range for this ContinuousValue
+ */
+template<typename T>
+ContinuousParameter<T>::ContinuousParameter(const range<T> &_ValidRange) :
+  ContinuousValue<T>(_ValidRange)
+{};
+
+/** Destructor for class ContinuousParameter.
+ *
+ */
+template<typename T>
+ContinuousParameter<T>::~ContinuousParameter()
+{};
+
+/** Creates a clone of this Parameter instance.
+ *
+ * @return cloned instance
+ */
+template<typename T>
+Parameter* ContinuousParameter<T>::clone() const
+{
+  ContinuousParameter<T> *instance = new ContinuousParameter<T>(ContinuousValue<T>::getValidRange());
+  instance->setValue(ContinuousValue<T>::getValue());
+  return instance;
+}
+
+
+#endif /* CONTINUOUSPARAMETER_IMPL_HPP_ */
Index: src/Parser/Parameters/DiscreteParameter.hpp
===================================================================
--- src/Parser/Parameters/DiscreteParameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/DiscreteParameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,38 @@
+/*
+ * DiscreteParameter.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+#ifndef DISCRETEPARAMETER_HPP_
+#define DISCRETEPARAMETER_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "DiscreteValue.hpp"
+#include "Parameter.hpp"
+
+#include <vector>
+
+/** This class encapsulates a clonable, continuous value.
+ *
+ */
+template <typename T>
+class DiscreteParameter : public Parameter, public DiscreteValue<T>
+{
+public:
+  DiscreteParameter();
+  DiscreteParameter(const std::vector<T> &_ValidValues);
+  virtual ~DiscreteParameter();
+
+  Parameter* clone() const;
+};
+
+#include "DiscreteParameter_impl.hpp"
+
+#endif /* DISCRETEPARAMETER_HPP_ */
Index: src/Parser/Parameters/DiscreteParameter_impl.hpp
===================================================================
--- src/Parser/Parameters/DiscreteParameter_impl.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/DiscreteParameter_impl.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,56 @@
+/*
+ * DiscreteParameter_impl.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+#ifndef DISCRETEPARAMETER_IMPL_HPP_
+#define DISCRETEPARAMETER_IMPL_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "DiscreteParameter.hpp"
+
+#include <vector>
+
+/** Constructor for class DiscreteParameter.
+ *
+ */
+template<typename T>
+DiscreteParameter<T>::DiscreteParameter()
+{};
+
+/** Constructor for class DiscreteParameter.
+ *
+ * @param _ValidValues valid values for this DiscreteValue
+ */
+template<typename T>
+DiscreteParameter<T>::DiscreteParameter(const std::vector<T> &_ValidValues) :
+  DiscreteValue<T>(_ValidValues)
+{};
+
+/** Destructor for class DiscreteParameter.
+ *
+ */
+template<typename T>
+DiscreteParameter<T>::~DiscreteParameter()
+{};
+
+/** Creates a clone of this Parameter instance.
+ *
+ * @return cloned instance
+ */
+template<typename T>
+Parameter* DiscreteParameter<T>::clone() const
+{
+  DiscreteParameter<T> *instance = new DiscreteParameter<T>(DiscreteValue<T>::getValidValues());
+  instance->setValue(DiscreteValue<T>::getValue());
+  return instance;
+}
+
+
+#endif /* DISCRETEPARAMETER_IMPL_HPP_ */
Index: src/Parser/Parameters/Parameter.hpp
===================================================================
--- src/Parser/Parameters/Parameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/Parameter.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,30 @@
+/*
+ * Parameter.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+#ifndef PARAMETER_HPP_
+#define PARAMETER_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/Clone.hpp"
+
+#include "Parser/Parameters/ValueInterface.hpp"
+
+
+class Parameter : virtual public ValueInterface, public Clone<Parameter>
+{
+public:
+  virtual ~Parameter() {}
+
+  virtual Parameter* clone() const=0;
+};
+
+
+#endif /* PARAMETER_HPP_ */
Index: src/Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp
===================================================================
--- src/Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,80 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * ContinuousParameterUnitTest.cpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "ContinuousParameterUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/Parameters/ContinuousParameter.hpp"
+
+#include "CodePatterns/Range.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( ContinuousParameterTest );
+
+
+void ContinuousParameterTest::setUp()
+{
+  // failing asserts should be thrown
+  ASSERT_DO(Assert::Throw);
+
+  ValidRange = new range<int>(1,4);
+}
+
+void ContinuousParameterTest::tearDown()
+{
+  delete ValidRange;
+}
+
+/************************************ tests ***********************************/
+
+/** Unit test for clone.
+ *
+ */
+void ContinuousParameterTest::cloneTest()
+{
+  // create instance
+  ContinuousParameter<int> test(*ValidRange);
+
+  // check that we throw because of unset parameter
+#ifndef NDEBUG
+  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
+  CPPUNIT_ASSERT_THROW(test.clone(), Assert::AssertionFailure);
+#endif
+
+  // set parameter
+  test.setValue(2);
+
+  // is returned as Parameter but we can compare only in true class as
+  // Parameter may also be a DiscreteParameter where comparison is nonsense
+  ContinuousParameter<int> *instance = dynamic_cast< ContinuousParameter<int> *> (test.clone());
+
+  // different places in memory
+  CPPUNIT_ASSERT( &test != instance);
+
+  // but same contents
+  CPPUNIT_ASSERT( test == *instance);
+}
+
Index: src/Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp
===================================================================
--- src/Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,37 @@
+/*
+ * ContinuousParameterUnitTest.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+#ifndef CONTINUOUSPARAMETERUNITTEST_HPP_
+#define CONTINUOUSPARAMETERUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <string>
+
+#include <cppunit/extensions/HelperMacros.h>
+
+template<class T> struct range;
+
+class ContinuousParameterTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( ContinuousParameterTest ) ;
+  CPPUNIT_TEST ( cloneTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void cloneTest();
+
+private:
+  range<int> *ValidRange;
+};
+
+#endif /* CONTINUOUSPARAMETERUNITTEST_HPP_ */
Index: src/Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp
===================================================================
--- src/Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,82 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * DiscreteParameterUnitTest.cpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "DiscreteParameterUnitTest.hpp"
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "Parser/Parameters/DiscreteParameter.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+using namespace std;
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( DiscreteParameterTest );
+
+
+void DiscreteParameterTest::setUp()
+{
+  // failing asserts should be thrown
+  ASSERT_DO(Assert::Throw);
+
+  for (int i=1; i<=3;++i) {
+    ValidValues.push_back(i);
+  }
+}
+
+void DiscreteParameterTest::tearDown()
+{
+  ValidValues.clear();
+}
+
+/************************************ tests ***********************************/
+
+/** Unit test for clone.
+ *
+ */
+void DiscreteParameterTest::cloneTest()
+{
+  // create instance
+  DiscreteParameter<int> test(ValidValues);
+
+  // check that we throw because of unset parameter
+#ifndef NDEBUG
+  std::cout << "The following Assert failures are intended and do not indicate a failure of the test." << std::endl;
+  CPPUNIT_ASSERT_THROW(test.clone(), Assert::AssertionFailure);
+#endif
+
+  // set parameter
+  test.setValue(2);
+
+  // is returned as Parameter but we can compare only in true class as
+  // Parameter may also be a ContinuousParameter where comparison is nonsense
+  DiscreteParameter<int> *instance = dynamic_cast< DiscreteParameter<int> *> (test.clone());
+
+  // different places in memory
+  CPPUNIT_ASSERT( &test != instance);
+
+  // but same contents
+  CPPUNIT_ASSERT( test == *instance);
+}
+
Index: src/Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp
===================================================================
--- src/Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
+++ src/Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -0,0 +1,35 @@
+/*
+ * DiscreteParameterUnitTest.hpp
+ *
+ *  Created on: Sep 30, 2011
+ *      Author: heber
+ */
+#ifndef DISCRETEPARAMETERUNITTEST_HPP_
+#define DISCRETEPARAMETERUNITTEST_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <vector>
+
+class DiscreteParameterTest :  public CppUnit::TestFixture
+{
+  CPPUNIT_TEST_SUITE( DiscreteParameterTest ) ;
+  CPPUNIT_TEST ( cloneTest );
+  CPPUNIT_TEST_SUITE_END();
+
+public:
+  void setUp();
+  void tearDown();
+
+  void cloneTest();
+
+private:
+  std::vector<int> ValidValues;
+};
+
+#endif /* DISCRETEPARAMETERUNITTEST_HPP_ */
Index: src/Parser/Parameters/unittests/Makefile.am
===================================================================
--- src/Parser/Parameters/unittests/Makefile.am	(revision 498dddb270b5a81a0dc413c9707b1fd0ba8ff7fb)
+++ src/Parser/Parameters/unittests/Makefile.am	(revision c4afd1ada21b7e8c7c09cb2144a757477ed4b7f4)
@@ -5,13 +5,19 @@
 PARSERPARAMETERSTESTSSOURCES = \
 	../Parser/Parameters/unittests/ContinuousValueUnitTest.cpp \
-	../Parser/Parameters/unittests/DiscreteValueUnitTest.cpp
+	../Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp \
+	../Parser/Parameters/unittests/DiscreteValueUnitTest.cpp \
+	../Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp
 
 PARSERPARAMETERSTESTSHEADERS = \
 	../Parser/Parameters/unittests/ContinuousValueUnitTest.hpp \
-	../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp
+	../Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp \
+	../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp \
+	../Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp
 
 PARSERPARAMETERSTESTS = \
 	ContinuousValueUnitTest \
-	DiscreteValueUnitTest
+	ContinuousParameterUnitTest \
+	DiscreteValueUnitTest \
+	DiscreteParameterUnitTest
 
 TESTS += $(PARSERPARAMETERSTESTS)
@@ -26,6 +32,19 @@
 	../Parser/Parameters/unittests/ContinuousValueUnitTest.hpp \
 	../Parser/Parameters/ContinuousValue.hpp \
-	../Parser/Parameters/ContinuousValue_impl.hpp
+	../Parser/Parameters/ContinuousValue_impl.hpp \
+	../Parser/Parameters/ValueInterface.hpp
 ContinuousValueUnitTest_LDADD = \
+	$(PARSERPARAMETERSLIBS)
+ 
+ContinuousParameterUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	../Parser/Parameters/unittests/ContinuousParameterUnitTest.cpp \
+	../Parser/Parameters/unittests/ContinuousParameterUnitTest.hpp \
+	../Parser/Parameters/ContinuousValue.hpp \
+	../Parser/Parameters/ContinuousValue_impl.hpp \
+	../Parser/Parameters/ContinuousParameter.hpp \
+	../Parser/Parameters/ContinuousParameter_impl.hpp \
+	../Parser/Parameters/Parameter.hpp \
+	../Parser/Parameters/ValueInterface.hpp
+ContinuousParameterUnitTest_LDADD = \
 	$(PARSERPARAMETERSLIBS)
  
@@ -34,6 +53,19 @@
 	../Parser/Parameters/unittests/DiscreteValueUnitTest.hpp \
 	../Parser/Parameters/DiscreteValue.hpp \
-	../Parser/Parameters/DiscreteValue_impl.hpp
+	../Parser/Parameters/DiscreteValue_impl.hpp \
+	../Parser/Parameters/ValueInterface.hpp
 DiscreteValueUnitTest_LDADD = \
+	$(PARSERPARAMETERSLIBS)
+
+DiscreteParameterUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \
+	../Parser/Parameters/unittests/DiscreteParameterUnitTest.cpp \
+	../Parser/Parameters/unittests/DiscreteParameterUnitTest.hpp \
+	../Parser/Parameters/DiscreteValue.hpp \
+	../Parser/Parameters/DiscreteValue_impl.hpp \
+	../Parser/Parameters/DiscreteParameter.hpp \
+	../Parser/Parameters/DiscreteParameter_impl.hpp \
+	../Parser/Parameters/Parameter.hpp \
+	../Parser/Parameters/ValueInterface.hpp
+DiscreteParameterUnitTest_LDADD = \
 	$(PARSERPARAMETERSLIBS)
  
