should provide a generic entry point for all "state mark" messages
This commit is contained in:
parent
3239ea1f87
commit
3c24b4f8e4
2 changed files with 21 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ namespace model {
|
|||
void markMsg (string m) { this->doMsg(m); }
|
||||
void markErr (string e) { this->doErr(e); }
|
||||
void markFlash() { this->doFlash();}
|
||||
void mark(GenNode const& n) { this->doMark(n);}
|
||||
void mark(GenNode const&);
|
||||
|
||||
protected:
|
||||
virtual void doReset() =0;
|
||||
|
|
@ -115,6 +115,24 @@ namespace model {
|
|||
private:
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** generic handler for all incoming "state mark" messages */
|
||||
inline void
|
||||
Tangible::mark (GenNode const& stateMark)
|
||||
{
|
||||
if (stateMark.idi.getSym() == "Flash")
|
||||
this->doFlash();
|
||||
else
|
||||
if (stateMark.idi.getSym() == "Error")
|
||||
this->doErr (stateMark.data.get<string>());
|
||||
else
|
||||
if (stateMark.idi.getSym() == "Message")
|
||||
this->doMsg (stateMark.data.get<string>());
|
||||
else
|
||||
this->doMark(stateMark);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}} // namespace gui::model
|
||||
|
|
|
|||
|
|
@ -284,8 +284,8 @@ namespace diff{
|
|||
bool contains (X const& elm) const;
|
||||
|
||||
|
||||
bool matches (GenNode const& o) const { return this->matches(o.idi); } ///< @note \em not comparing payload data. Use equality for that…
|
||||
bool matches (ID const& id) const { return idi == id; }
|
||||
bool matches (GenNode const& o) const { return this->matches(o.idi); } ///< @note _not_ comparing payload data. Use equality for that…
|
||||
bool matches (ID const& id) const { return idi == id; }
|
||||
bool matches (int number) const { return data.matchNum(number);}
|
||||
bool matches (int64_t number) const { return data.matchNum(number);}
|
||||
bool matches (short number) const { return data.matchNum(number);}
|
||||
|
|
|
|||
Loading…
Reference in a new issue