1
0
Fork 0

check if method is root

This commit is contained in:
Kevin Matz 2023-05-15 11:12:45 -04:00
parent 767c0a9e34
commit 0c22c70b38
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -56,6 +56,7 @@ public:
protected:
void trigger(std::shared_ptr<Message>) const;
bool isRoot() const;
private:
Method *parent_;