From bd15cbd5aa5d6164af54e04a8f682b4d2cc49c92 Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Tue, 16 May 2023 10:28:14 -0400 Subject: [PATCH] reorder header --- protocol/osc/method.cpp | 41 ++++++++++++++++++++--------------------- protocol/osc/method.h | 4 ++-- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/protocol/osc/method.cpp b/protocol/osc/method.cpp index 36cb790..d164b4b 100644 --- a/protocol/osc/method.cpp +++ b/protocol/osc/method.cpp @@ -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 Method::onTrigger(const std::function msg) const; std::shared_ptr onTrigger(const std::function)>); - bool isRoot() const; - bool isContainer() const; private: Method *parent_;