check if method is root
This commit is contained in:
parent
767c0a9e34
commit
0c22c70b38
|
@ -205,4 +205,14 @@ void Method::trigger(std::shared_ptr<Message> msg) const
|
|||
(*sp)(msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::isRoot
|
||||
* @return
|
||||
*/
|
||||
bool Method::isRoot() const
|
||||
{
|
||||
return !parent_;
|
||||
}
|
||||
|
||||
} // namespace OSC
|
||||
|
|
|
@ -56,6 +56,7 @@ public:
|
|||
|
||||
protected:
|
||||
void trigger(std::shared_ptr<Message>) const;
|
||||
bool isRoot() const;
|
||||
|
||||
private:
|
||||
Method *parent_;
|
||||
|
|
Loading…
Reference in New Issue