reorder header
This commit is contained in:
parent
7029286883
commit
bd15cbd5aa
|
@ -34,7 +34,6 @@ namespace OSC {
|
|||
*/
|
||||
Method::Method(Method *parent, std::string name)
|
||||
: parent_(parent)
|
||||
, name_("")
|
||||
{
|
||||
if (parent)
|
||||
parent->addChild(this);
|
||||
|
@ -49,6 +48,26 @@ Method::~Method()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::isRoot
|
||||
* @return
|
||||
*/
|
||||
bool Method::isRoot() const
|
||||
{
|
||||
return !parent_;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::isContainer
|
||||
* @return
|
||||
*/
|
||||
bool Method::isContainer() const
|
||||
{
|
||||
return !children_.empty();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::addChild
|
||||
* @param child
|
||||
|
@ -198,24 +217,4 @@ std::shared_ptr<void> Method::onTrigger(const std::function<void(std::shared_ptr
|
|||
return sp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::isRoot
|
||||
* @return
|
||||
*/
|
||||
bool Method::isRoot() const
|
||||
{
|
||||
return !parent_;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Method::isContainer
|
||||
* @return
|
||||
*/
|
||||
bool Method::isContainer() const
|
||||
{
|
||||
return !children_.empty();
|
||||
}
|
||||
|
||||
} // namespace OSC
|
||||
|
|
|
@ -42,6 +42,8 @@ public:
|
|||
explicit Method(Method *parent = nullptr, std::string name = "");
|
||||
virtual ~Method();
|
||||
|
||||
bool isRoot() const;
|
||||
bool isContainer() const;
|
||||
void addChild(Method *child);
|
||||
|
||||
std::string name() const;
|
||||
|
@ -54,8 +56,6 @@ public:
|
|||
void trigger(std::shared_ptr<Message> msg) const;
|
||||
std::shared_ptr<void> onTrigger(const std::function<void(std::shared_ptr<Message>)>);
|
||||
|
||||
bool isRoot() const;
|
||||
bool isContainer() const;
|
||||
|
||||
private:
|
||||
Method *parent_;
|
||||
|
|
Loading…
Reference in New Issue