1
0
Fork 0

optional method naming in constructor

This commit is contained in:
Kevin Matz 2023-05-13 11:32:58 -04:00
parent e1faba699e
commit 49a446c5aa
2 changed files with 4 additions and 2 deletions

View File

@ -30,13 +30,15 @@ namespace OSC {
/**
* @brief Method::Method
* @param parent
* @param name
*/
Method::Method(Method *parent)
Method::Method(Method *parent, std::string name)
: parent_(parent)
, name_("")
{
if (parent)
parent->addChild(this);
setName(name);
}

View File

@ -39,7 +39,7 @@ namespace OSC {
class Method
{
public:
explicit Method(Method *parent = nullptr);
explicit Method(Method *parent = nullptr, std::string name = "");
virtual ~Method();
virtual void addChild(Method *child);