/* * ValueStorage.hpp * * Created on: Jul 22, 2010 * Author: heber */ #ifndef VALUESTORAGE_HPP_ #define VALUESTORAGE_HPP_ #include "Actions/MapofActions.hpp" #include "Patterns/Singleton.hpp" /** ValueStorage serves as a mediator to MapOfActions. * This is needed to relax inter-dependencies between the Queries and the Actions. * I.e. this is the interface implemented in MapOfActions which both can safely rely on * to store&retrieve/exchange values. */ class ValueStorage : public Singleton { friend class Singleton; template queryCurrentValue(const char *name, T &_T) { MapOfActions::getInstance().queryCurrentValue(name, _T); } template setCurrentValue(const char *name, T &_T) { MapOfActions::getInstance().setCurrentValue(name, _T); } protected: ValueStorage(); ~ValueStorage(); }; #endif /* VALUESTORAGE_HPP_ */