27 using namespace Tools;
63 stringstream stream(buffer);
64 while (getline(stream, buf,
'\n'))
69 const size_t p1 = buf.find_first_of(
':');
70 const size_t p2 = buf.find_first_of(
'=');
72 stringstream s(buf.substr(0, p1));
77 const string name = buf.substr(p1+1, p2-p1-1);
78 const string comment = p2==string::npos ?
"" : buf.substr(p2+1);
80 vec.emplace_back(index, name, comment);
std::string comment
Name (e.g. 'Connected')
Adds some functionality to boost::posix_time::ptime for our needs.
static bool Compare(const State &i, const State &j)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
State(int i=-256, const std::string &n="", const std::string &c="", const Time &t=Time(Time::none))
std::string name
Index (e.g. 1)
static std::vector< State > SplitStates(const std::string &buffer)
Time of state change.