File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ class AlgBase : public DLElement
42
42
template <typename Type>
43
43
Type *tool (const std::string &toolName);
44
44
45
+ // set the parent (ExecUnit implementation) pointer
46
+ virtual void setParent (ExecUnit *parent) override ;
47
+
45
48
// Declared in base class DLElement
46
49
// virtual bool initialize() = 0;
47
50
// virtual bool finalize() = 0;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class DLElement : public NamedElement
51
51
void setDescription (const std::string &desc) { m_description = desc; }
52
52
53
53
// set the parent (ExecUnit implementation) pointer
54
- void setParent (ExecUnit *parent);
54
+ virtual void setParent (ExecUnit *parent);
55
55
56
56
// get a property via its key-name
57
57
Property *property (const std::string &key);
Original file line number Diff line number Diff line change @@ -74,6 +74,15 @@ ToolBase *AlgBase::findTool(const std::string &toolName)
74
74
return nullptr ;
75
75
}
76
76
77
+ void AlgBase::setParent (ExecUnit *parent)
78
+ {
79
+ DLElement::setParent (parent);
80
+ for (auto &it : m_tools)
81
+ {
82
+ it.second ->setParentAlg (this );
83
+ }
84
+ }
85
+
77
86
SniperJSON AlgBase::json ()
78
87
{
79
88
SniperJSON j = DLElement::json ();
You can’t perform that action at this time.
0 commit comments