/* * toCLIString.hpp * * Created on: Aug 23, 2013 * Author: heber */ #ifndef TOCLISTRING_HPP_ #define TOCLISTRING_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include class element; struct KeyValuePair; class RealSpaceMatrix; class Vector; template inline const std::string toCLIString( const T& _value) { std::stringstream output; output << _value; return output.str(); } template inline const std::string toCLIString( const T *& _value) { std::stringstream output; output << toCLIString(*_value); return output.str(); } template inline const std::string toCLIString( const T * _value) { std::stringstream output; output << toCLIString(*_value); return output.str(); } template inline const std::string toCLIString( const std::vector& _values) { std::stringstream output; for (typename std::vector::const_iterator iter = _values.begin(); iter != _values.end(); ++iter) { const T& _value = *iter; if (iter != _values.begin()) output << " "; output << toCLIString(_value); } return output.str(); } template <> const std::string toCLIString( const element & _value); template <> const std::string toCLIString( const boost::filesystem::path & _value); template <> const std::string toCLIString( const RealSpaceMatrix& _value); template <> const std::string toCLIString( const Vector& _value); template <> const std::string toCLIString( const std::string& _value); template <> const std::string toCLIString( const KeyValuePair& _value); #endif /* TOCLISTRING_HPP_ */