1 #ifndef _utl_ReadStream_h_
2 #define _utl_ReadStream_h_
4 #include <utl/ShadowPtrPolicy.h>
5 #include <boost/lexical_cast.hpp>
6 #include <boost/algorithm/string/trim.hpp>
82 template<
typename T>
bool Get(T& t)
91 if (!std::getline(*
fStream, line))
94 boost::algorithm::trim(line);
95 t = boost::lexical_cast<T>(line);
101 GetLines(std::vector<T>& v,
const bool filterComments =
true,
const bool trim =
false)
105 while (std::getline(*
fStream, line)) {
109 boost::algorithm::trim(line);
111 v.push_back(boost::lexical_cast<T>(line));
bool is(const double a, const double b)
std::istream & GetStream() const
static std::string FilterComments(const std::string &line)
static void Examine(T *const ptr)
ReadStream & operator=(const ReadStream &)
ReadStream(std::istream &is)
void SetStream(std::istream &is)
bool GetLine(T &t, const bool trim=false)
void GetLines(std::vector< T > &v, const bool filterComments=true, const bool trim=false)