Index: src/Actions/Makefile.am
===================================================================
--- src/Actions/Makefile.am	(revision 5ca6b5f0669fee6abb940c6b02f384ca2f8a16c7)
+++ src/Actions/Makefile.am	(revision a55e6f407eec642fe6ff7723a0966f78c9483eaa)
@@ -16,6 +16,5 @@
   Actions/Process.cpp \
   Actions/UndoRedoHelpers.cpp \
-  Actions/Values.cpp \
-  Actions/ValueStorage.cpp
+  Actions/Values.cpp
 
 ACTIONSHEADER = \
@@ -47,6 +46,5 @@
   Actions/Reaction_impl_pre.hpp \
   Actions/UndoRedoHelpers.hpp \
-  Actions/Values.hpp \
-  Actions/ValueStorage.hpp
+  Actions/Values.hpp
   
 ACTIONPROTOTYPESSOURCE = \
Index: c/Actions/ValueStorage.cpp
===================================================================
--- src/Actions/ValueStorage.cpp	(revision 5ca6b5f0669fee6abb940c6b02f384ca2f8a16c7)
+++ 	(revision )
@@ -1,482 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * ValueStorage.cpp
- *
- *  Created on: Jul 22, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "CodePatterns/Singleton_impl.hpp"
-
-#include <iostream>
-
-#include "Actions/OptionTrait.hpp"
-#include "Actions/OptionRegistry.hpp"
-#include "Actions/Values.hpp"
-#include "Actions/ValueStorage.hpp"
-#include "Descriptors/AtomIdDescriptor.hpp"
-#include "Descriptors/MoleculeIdDescriptor.hpp"
-#include "CodePatterns/Assert.hpp"
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/BoxVector.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "LinearAlgebra/Vector.hpp"
-#include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
-#include "Atom/atom.hpp"
-#include "Box.hpp"
-#include "Element/element.hpp"
-#include "molecule.hpp"
-#include "Element/periodentafel.hpp"
-#include "World.hpp"
-
-ValueStorage::ValueStorage() :
-OptionRegistry_instance(MoleCuilder::OptionRegistry::getInstance())
-{};
-
-ValueStorage::~ValueStorage() {};
-
-
-bool ValueStorage::isCurrentValuePresent(const char *name) const
-{
-  return (CurrentValueMap.find(name) != CurrentValueMap.end());
-}
-
-void ValueStorage::queryCurrentValue(const char * name, const atom * &_T)
-{
-  int atomID = -1;
-  if (typeid( atom *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    atomID = lexical_cast<int>(CurrentValueMap[name].c_str());
-    CurrentValueMap.erase(name);
-  } else if (typeid( const atom *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    atomID = lexical_cast<int>(CurrentValueMap[name].c_str());
-    CurrentValueMap.erase(name);
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-  _T = World::getInstance().getAtom(AtomById(atomID));
-}
-
-void ValueStorage::queryCurrentValue(const char * name, const element * &_T)  {
-  int Z = -1;
-  if (typeid(const element *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    Z = lexical_cast<int>(CurrentValueMap[name].c_str());
-    CurrentValueMap.erase(name);
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-  _T = World::getInstance().getPeriode()->FindElement(Z);
-}
-
-void ValueStorage::queryCurrentValue(const char * name, const molecule * &_T) {
-  int molID = -1;
-  if (typeid( const molecule *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    molID = lexical_cast<int>(CurrentValueMap[name].c_str());
-    CurrentValueMap.erase(name);
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-  _T = World::getInstance().getMolecule(MoleculeById(molID));
-}
-
-void ValueStorage::queryCurrentValue(const char * name, class Box &_T) {
-  RealSpaceMatrix M;
-  double tmp;
-  if (typeid( Box ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    std::istringstream stream(CurrentValueMap[name]);
-    stream >> tmp;
-    M.set(0,0,tmp);
-    stream >> tmp;
-    M.set(0,1,tmp);
-    M.set(1,0,tmp);
-    stream >> tmp;
-    M.set(0,2,tmp);
-    M.set(2,0,tmp);
-    stream >> tmp;
-    M.set(1,1,tmp);
-    stream >> tmp;
-    M.set(1,2,tmp);
-    M.set(2,1,tmp);
-    stream >> tmp;
-    M.set(2,2,tmp);
-    _T = M;
-    CurrentValueMap.erase(name);
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, class Vector &_T) {
-  if (typeid( Vector ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    for (size_t i = 0; i < NDIM; ++i) {
-      stream >> _T[i];
-      ASSERT(!stream.fail(),
-          "ValueStorage::queryCurrentValue() - Vector in value map has only "+toString(i)+" components!");
-    }
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, class BoxVector &_T) {
-  if (typeid( BoxVector ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    for (size_t i = 0; i < NDIM; ++i) {
-      stream >> _T[i];
-      ASSERT(!stream.fail(),
-          "ValueStorage::queryCurrentValue() - BoxVector in value map has only "+toString(i)+" components!");
-    }
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, class RandomNumberDistribution_Parameters &_T) {
-  if (typeid( RandomNumberDistribution_Parameters ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::istringstream stream(CurrentValueMap[name]);
-    LOG(0, "ValueStorage::queryCurrentValue() for "+toString(name)+" is "+CurrentValueMap[name]+".");
-    CurrentValueMap.erase(name);
-    stream >> _T;
-    ASSERT(!stream.fail(),
-        "ValueStorage::queryCurrentValue() - RandomNumberDistribution_Parameters in value map has only no components!");
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, std::vector<const atom *>&_T)
-{
-  int atomID = -1;
-  size_t count = 0;
-  atom *Walker = NULL;
-  if (typeid( std::vector<const atom *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    while (!stream.fail()) {
-      stream >> atomID >> ws;
-      ASSERT((!stream.fail()) || (count != 0),
-          "ValueStorage::queryCurrentValue() - Atom is missing id!");
-      if (!stream.fail()) {
-        Walker = World::getInstance().getAtom(AtomById(atomID));
-        if (Walker != NULL)
-          _T.push_back(Walker);
-        atomID = -1;
-        Walker = NULL;
-        ++count;
-      }
-    }
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, std::vector<const element *>&_T)
-{
-  int Z = -1;
-  size_t count = 0;
-  const element *elemental = NULL;
-  if (typeid( std::vector<const element *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    while (!stream.fail()) {
-      stream >> Z >> ws;
-      ASSERT((!stream.fail()) || (count != 0),
-          "ValueStorage::queryCurrentValue() - atomic number is missing!");
-      if (!stream.fail()) {
-        elemental = World::getInstance().getPeriode()->FindElement(Z);
-        if (elemental != NULL)
-          _T.push_back(elemental);
-        Z = -1;
-        ++count;
-      }
-    }
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, std::vector<const molecule *>&_T)
-{
-  int molID = -1;
-  size_t count = 0;
-  molecule *mol = NULL;
-  if (typeid( std::vector<const molecule *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    while (!stream.fail()) {
-      stream >> molID >> ws;
-      ASSERT((!stream.fail()) || (count != 0),
-          "ValueStorage::queryCurrentValue() - molecule is missing id!");
-      if (!stream.fail()) {
-        mol = World::getInstance().getMolecule(MoleculeById(molID));
-        if (mol != NULL)
-          _T.push_back(mol);
-        molID = -1;
-        mol = NULL;
-        ++count;
-      }
-    }
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::queryCurrentValue(const char * name, boost::filesystem::path&_T)
-{
-  std::string tmp;
-  if (typeid( boost::filesystem::path ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    if (CurrentValueMap.find(name) == CurrentValueMap.end())
-      throw MissingValueException() << ValueStorageOptionName(name);
-    std::istringstream stream(CurrentValueMap[name]);
-    CurrentValueMap.erase(name);
-    stream >> tmp >> ws;
-    ASSERT(!stream.fail(),
-        "ValueStorage::queryCurrentValue() - boost::filesystem::path is missing!");
-    _T = tmp;
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, const atom * &_T)
-{
-  if (typeid( const atom *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    stream << _T->getId();
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, const element * &_T)
-{
-  if (typeid( const element *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    stream << _T->getAtomicNumber();
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, const molecule * &_T)
-{
-  if (typeid( const molecule *) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    stream << _T->getId();
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, class Box &_T)
-{
-  const RealSpaceMatrix &M = _T.getM();
-  if (typeid( Box ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    stream << M.at(0,0) << " ";
-    stream << M.at(0,1) << " ";
-    stream << M.at(0,2) << " ";
-    stream << M.at(1,1) << " ";
-    stream << M.at(1,2) << " ";
-    stream << M.at(2,2) << " ";
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, class Vector &_T)
-{
-  if (typeid( Vector ) == *(OptionRegistry_instance.getOptionByName(name)->getType())){
-    std::ostringstream stream;
-    stream << _T[0] << " ";
-    stream << _T[1] << " ";
-    stream << _T[2] << " ";
-    CurrentValueMap[name] = stream.str();
-  } else  if (typeid( BoxVector ) == *(OptionRegistry_instance.getOptionByName(name)->getType())){
-    std::ostringstream stream;
-    stream << _T[0] << " ";
-    stream << _T[1] << " ";
-    stream << _T[2] << " ";
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, class RandomNumberDistribution_Parameters &_T)
-{
-  if (typeid( RandomNumberDistribution_Parameters ) == *(OptionRegistry_instance.getOptionByName(name)->getType())){
-    std::ostringstream stream;
-    stream << _T;
-    CurrentValueMap[name] = stream.str();
-    LOG(0, "ValueStorage::setCurrentValue() for "+toString(name)+" to "+stream.str()+".");
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, std::vector<const atom *>&_T)
-{
-  if (typeid( std::vector<const atom *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    for (std::vector<const atom *>::const_iterator iter = _T.begin(); iter != _T.end(); ++iter) {
-      stream << (*iter)->getId() << " ";
-    }
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, std::vector<const element *>&_T)
-{
-  if (typeid( std::vector<const element *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    for (std::vector<const element *>::const_iterator iter = _T.begin(); iter != _T.end(); ++iter) {
-      stream << (*iter)->getAtomicNumber() << " ";
-    }
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, std::vector<const molecule *>&_T)
-{
-  if (typeid( std::vector<const molecule *> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    for (std::vector<const molecule *>::const_iterator iter = _T.begin(); iter != _T.end(); ++iter) {
-      stream << (*iter)->getId() << " ";
-    }
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-void ValueStorage::setCurrentValue(const char * name, boost::filesystem::path &_T)
-{
-  if (typeid( boost::filesystem::path ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {
-    std::ostringstream stream;
-    stream << _T.string();
-    CurrentValueMap[name] = stream.str();
-  } else
-    throw IllegalTypeException() << ValueStorageOptionName(name)
-        << ValueStoragePairTypeName(std::make_pair(
-            typeid(_T).name(),
-            OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-            );
-}
-
-const std::string ValueStorage::getCurrentValue(std::string actionname) {
-  return CurrentValueMap[actionname];
-}
-
-std::ostream & operator<<(std::ostream &ost, const ValueStorage &value)
-{
-  ost << "ValueStorage currently contains " << value.CurrentValueMap.size() << " elements:" << std::endl;
-  for (std::map<std::string, std::string>::const_iterator iter = value.CurrentValueMap.begin();
-      iter != value.CurrentValueMap.end();
-      ++iter)
-    ost << iter->first << "->" << iter->second << ", ";
-  return ost;
-}
-
-
-CONSTRUCT_SINGLETON(ValueStorage)
Index: c/Actions/ValueStorage.hpp
===================================================================
--- src/Actions/ValueStorage.hpp	(revision 5ca6b5f0669fee6abb940c6b02f384ca2f8a16c7)
+++ 	(revision )
@@ -1,266 +1,0 @@
-/*
- * ValueStorage.hpp
- *
- *  Created on: Jul 22, 2010
- *      Author: heber
- */
-
-#ifndef VALUESTORAGE_HPP_
-#define VALUESTORAGE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <boost/filesystem.hpp>
-#include <boost/lexical_cast.hpp>
-#include <boost/program_options.hpp>
-
-#include <iosfwd>
-#include <map>
-#include <set>
-#include <vector>
-#include <typeinfo>
-#include <utility>
-
-#include "Actions/OptionTrait.hpp"
-#include "Actions/OptionRegistry.hpp"
-#include "CodePatterns/Assert.hpp"
-#include "CodePatterns/Singleton.hpp"
-
-#include <exception>
-#include <boost/exception/all.hpp>
-
-class MatrixContent;
-class Vector;
-
-/** Base type for all exceptions regarding ValueStorage class.
- *
- */
-struct ValueStorageException : virtual std::exception, virtual boost::exception { };
-
-/** ========================== General error information ================== */
-
-/** Exception information for ValueStorageException: name of option.
- */
-typedef boost::error_info<struct tag_ValueStorageOptionName, const char *> ValueStorageOptionName;
-
-/** Exception information for ValueStorageException: name of type.
- */
-typedef boost::error_info<struct tag_ValueStorageTypeName, const char *> ValueStorageTypeName;
-
-/** Exception information for ValueStorageException: pair of names of two types.
- */
-typedef boost::error_info<
-    struct tag_ValueStorageTypeName,
-    std::pair<const char *,const char *> > ValueStoragePairTypeName;
-
-/** ============================ Specific exceptions ====================== */
-
-/** Exception thrown when ValueStorage is given an illegal type for a specific option.
- */
-struct IllegalTypeException : virtual ValueStorageException { };
-
-/** Exception thrown when ValueStorage is missing a requested value.
- */
-struct MissingValueException : virtual ValueStorageException { };
-
-
-class MapOfActionsTest;
-
-class Box;
-class atom;
-class element;
-class molecule;
-class Vector;
-class RandomNumberDistribution_Parameters;
-
-namespace po = boost::program_options;
-
-using boost::lexical_cast;
-
-#include "CodePatterns/Singleton.hpp"
-
-/** ValueStorage is a container for any type of value.
- *
- * This is needed to relax inter-dependencies between the Queries and the Actions.
- *
- * The ValueStorage is necessary because we do not a-priori know about the
- * type of a value as given by the user. The type is handled via RTTI (run-time
- * type information), and the value is cast to string stored under a specific
- * token in a map inside this class.
- *
- * Not any value can be stored in this container. We rely on OptionRegistry to allow
- * only tokens whose type has been defined beforehand. I.e. for each option we
- * require a specific and unique type.
- *
- * Then, there are three types of functions:
- * -# queryCurrentValue: request a value under a specific token
- * -# setCurrentValue: set/enter a value under a specific token
- * -# isCurrentValuePresent: ask whether a value under a specific token is contained
- *
- * For the first two we have templated version and a number of specialized ones to
- * deal with some types specific to this code: \ref atom, \ref Box, \ref element,
- * \ref molecule, ...
- *
- * \section ValueStorage-extend ValueStorage extension howto
- *
- * If you ever need to add a particular class to the ValueStorage, do as follows:
- * -# add a specialized queryCurrentValue and setCurrentValue to the definition
- *    of ValueStorage.
- * -# implement both in the declaration of ValueStorage.
- * -# in the implementation either directly implement the serializing of the
- *    class' members to a stringstream or use an already implemented operator<<
- *    or operator<<, respectively.
- *
- * \section ValueStorage-further-info Further information
- *
- * If you want to know in detail how this all works with the options, where they
- * come from and how values end up in the ValueStorage, then look at \ref  actions
- * and \ref  userinterfaces.
- *
- */
-class ValueStorage : public Singleton<ValueStorage> {
-  friend class Singleton<ValueStorage>;
-  friend std::ostream & operator<<(std::ostream &ost, const ValueStorage &value);
-public:
-
-  bool isCurrentValuePresent(const char *name) const;
-  void queryCurrentValue(const char * name, const atom * &_T);
-  void queryCurrentValue(const char * name, const element * &_T);
-  void queryCurrentValue(const char * name, const molecule * &_T);
-  void queryCurrentValue(const char * name, class Box &_T);
-  void queryCurrentValue(const char * name, class Vector &_T);
-  void queryCurrentValue(const char * name, class BoxVector &_T);
-  void queryCurrentValue(const char * name, class RandomNumberDistribution_Parameters &_T);
-  void queryCurrentValue(const char * name, std::vector<const atom *>&_T);
-  void queryCurrentValue(const char * name, std::vector<const element *>&_T);
-  void queryCurrentValue(const char * name, std::vector<const molecule *>&_T);
-  void queryCurrentValue(const char * name, boost::filesystem::path&_T);
-
-  /** Gets a value from the storage
-   * If the value is not present, an ASSERT is thrown unless optional is set to true.
-   * \param _T key of value
-   * \param optional whether this value is optional, i.e. may actually not be in the storage (i.e. may return false in this case).
-   * \return true - value present, false - value not present (only given when optional set to true)
-   */
-  template<typename T> void queryCurrentValue(const char * name, T &_T)
-  {
-    if (typeid( T ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) { // constructor of type_info is private, hence can only store by ref or ptr
-      if (CurrentValueMap.find(name) == CurrentValueMap.end())
-        throw MissingValueException() << ValueStorageOptionName(name);
-      _T = lexical_cast<T>(CurrentValueMap[name].c_str());
-      CurrentValueMap.erase(name);
-    } else
-      throw IllegalTypeException() << ValueStorageOptionName(name)
-          << ValueStoragePairTypeName(std::make_pair(
-              typeid(_T).name(),
-              OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-              );
-  }
-  template<typename T> void queryCurrentValue(const char * name, std::vector<T> &_T)
-  {
-    T temp;
-    if (typeid( std::vector<T> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) { // constructor of type_info is private, hence can only store by ref or ptr
-      if (CurrentValueMap.find(name) == CurrentValueMap.end())
-        throw MissingValueException() << ValueStorageOptionName(name);
-      std::istringstream stream(CurrentValueMap[name]);
-      CurrentValueMap.erase(name);
-      while (!stream.fail()) {
-        stream >> temp >> std::ws;
-        if (!stream.fail()) {
-          _T.push_back(temp);
-        }
-      }
-    } else
-      throw IllegalTypeException() << ValueStorageOptionName(name)
-          << ValueStoragePairTypeName(std::make_pair(
-              typeid(_T).name(),
-              OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-              );
-  }
-
-  void setCurrentValue(const char * name, const atom * &_T);
-  void setCurrentValue(const char * name, const element * &_T);
-  void setCurrentValue(const char * name, const molecule * &_T);
-  void setCurrentValue(const char * name, class Box &_T);
-  void setCurrentValue(const char * name, class Vector &_T);
-  void setCurrentValue(const char * name, class RandomNumberDistribution_Parameters &_T);
-  void setCurrentValue(const char * name, std::vector<const atom *>&_T);
-  void setCurrentValue(const char * name, std::vector<const element *>&_T);
-  void setCurrentValue(const char * name, std::vector<const molecule *>&_T);
-  void setCurrentValue(const char * name, boost::filesystem::path&_T);
-
-  /** Sets a value in the storage.
-   * \param name key of value
-   * \param _T value
-   */
-  template<class T> void setCurrentValue(const char * name, T &_T)
-  {
-    std::ostringstream stream;
-    if (typeid( T ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {  // constructor of type_info is private, hence can only store by ref or ptr
-      stream << _T;
-      CurrentValueMap[name] = stream.str();
-    } else
-      throw IllegalTypeException() << ValueStorageOptionName(name)
-          << ValueStoragePairTypeName(std::make_pair(
-              typeid(_T).name(),
-              OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-              );
-}
-  /** Sets a value in the storage.
-   * \param name key of value
-   * \param _T value
-   */
-  template<class T> void setCurrentValue(const char * name, std::vector<T> &_T)
-  {
-    std::ostringstream stream;
-    if (typeid( std::vector<T> ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {  // constructor of type_info is private, hence can only store by ref or ptr
-      std::ostringstream stream;
-      for (typename std::vector<T>::const_iterator iter = _T.begin(); iter != _T.end(); ++iter) {
-        stream << (*iter) << " ";
-      }
-      CurrentValueMap[name] = stream.str();
-    } else
-      throw IllegalTypeException() << ValueStorageOptionName(name)
-          << ValueStoragePairTypeName(std::make_pair(
-              typeid(_T).name(),
-              OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-              );
-  }
-
-  const std::string getCurrentValue(std::string actionname);
-
-  /** Sets a value in the storage directly from a string.
-   * We need the templated type to check for consistency
-   * \param name key of value
-   * \param _T value
-   */
-  template<class T> void setCurrentValueByString(const char * name, const std::string &_T)
-  {
-    std::ostringstream stream;
-    if (typeid( T ) == *(OptionRegistry_instance.getOptionByName(name)->getType())) {  // constructor of type_info is private, hence can only store by ref or ptr
-      CurrentValueMap[name] = _T;
-    } else
-      throw IllegalTypeException() << ValueStorageOptionName(name)
-          << ValueStoragePairTypeName(std::make_pair(
-              typeid(_T).name(),
-              OptionRegistry_instance.getOptionByName(name)->getTypeName().c_str())
-              );
-  }
-
-protected:
-  ValueStorage();
-  ~ValueStorage();
-
-  std::map<std::string, std::string> CurrentValueMap;
-
-  MoleCuilder::OptionRegistry &OptionRegistry_instance;
-};
-
-std::ostream & operator<<(std::ostream &ost, const ValueStorage &value);
-
-
-#endif /* VALUESTORAGE_HPP_ */
Index: src/cleanUp.cpp
===================================================================
--- src/cleanUp.cpp	(revision 5ca6b5f0669fee6abb940c6b02f384ca2f8a16c7)
+++ src/cleanUp.cpp	(revision a55e6f407eec642fe6ff7723a0966f78c9483eaa)
@@ -34,5 +34,4 @@
 #include "Actions/ActionRegistry.hpp"
 #include "Actions/OptionRegistry.hpp"
-#include "Actions/ValueStorage.hpp"
 
 #include "RandomNumbers/RandomNumberDistributionFactory.hpp"
@@ -79,5 +78,4 @@
   MenuDescription::purgeInstance();
   UIFactory::purgeInstance();
-  ValueStorage::purgeInstance();
   CommandLineParser::purgeInstance();
   MoleCuilder::ActionRegistry::purgeInstance();
