125 fFunction(cmd.fFunction)
153 stringstream stream(states);
155 const bool sep = stream.str().find(
',')==string::npos;
158 while (getline(stream, buffer, sep ?
' ' :
','))
200 return std::string(
GetText(), s+1);
223 out <<
kBold << str.substr(strip?str.find_first_of(
'/')+1:0) <<
kReset <<
"-";
227 if (!str.empty() && !fmt.empty())
231 out <<
"[" << fmt <<
"]";
238 for (vector<Description>::const_iterator j=v.begin()+1;
240 out <<
" <" << j->name <<
">";
270 out <<
" " << v[0].comment << endl;
272 for (vector<Description>::const_iterator j=v.begin()+1;
275 out <<
" ||" <<
kGreen << j->name;
276 if (!j->comment.empty())
278 if (!j->unit.empty())
279 out <<
kYellow <<
" [" << j->unit <<
"]";
void AddAllowedStates(const std::string &states)
virtual std::string GetDescription() const
uint64_t JavaDate() const
A general base-class describing events issues in a state machine.
const char * GetText() const
EventImp()
Constructor. Stores the target state given.
Adds some functionality to boost::posix_time::ptime for our needs.
std::vector< int > fAllowedStates
std::string GetString() const
virtual void Print(std::ostream &out, bool strip=false) const
virtual Time GetTime() const
virtual std::string GetFormat() const
bool IsStateAllowed(int state) const
static std::vector< Description > SplitDescription(const std::string &buffer)
static const Time None
A none-time, this can be used as a simple representation of an invalid time.
void AddAllowedState(int state)
uint64_t GetJavaDate() const
std::string GetTimeAsStr(const char *fmt) const
virtual std::string GetName() const
std::string GetAsStr(const char *fmt="%Y-%m-%d %H:%M:%S") const
virtual size_t GetSize() const