ModuleParams: add setParent() method

This commit is contained in:
Beat Küng
2018-03-20 11:10:16 +01:00
parent 408cfd6ce1
commit e32d8ea8b6
+9
View File
@@ -48,6 +48,15 @@ class ModuleParams : public ListNode<ModuleParams *>
public:
ModuleParams(ModuleParams *parent)
{
setParent(parent);
}
/**
* Set the parent module. This is typically not required, only in cases where
* the parent cannot be set via constructor.
*/
void setParent(ModuleParams *parent)
{
if (parent) {
parent->_children.add(this);