File tree Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 19
19
20
20
namespace BT
21
21
{
22
+
22
23
class ControlNode : public TreeNode
23
24
{
24
25
protected:
Original file line number Diff line number Diff line change 27
27
#pragma warning(disable : 4127)
28
28
#endif
29
29
30
+
30
31
namespace BT
31
32
{
33
+
34
+ class ControlNode ;
35
+
36
+
32
37
// / This information is used mostly by the XMLParser.
33
38
struct TreeNodeManifest
34
39
{
@@ -148,9 +153,9 @@ class TreeNode
148
153
static StringView stripBlackboardPointer (StringView str);
149
154
150
155
static Optional<StringView> getRemappedKey (StringView port_name, StringView remapping_value);
151
- void set_parent_prt (TreeNode *parent_ptr);
156
+ void set_parent_prt (ControlNode *parent_ptr);
152
157
153
- TreeNode* parent_prt () const ;
158
+ ControlNode * parent_prt () const ;
154
159
unsigned int child_index () const ;
155
160
void set_child_index (unsigned int child_index);
156
161
@@ -169,7 +174,7 @@ class TreeNode
169
174
void modifyPortsRemapping (const PortsRemapping& new_remapping);
170
175
unsigned int child_index_;
171
176
172
- TreeNode * parent_prt_ = nullptr ;
177
+ ControlNode * parent_prt_ = nullptr ;
173
178
174
179
private:
175
180
const std::string name_;
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ NodeStatus ReactiveFallback::tick()
46
46
// std::cout << name() << " is propagating halt to" << ((ControlNode*)parent_prt_)->name() << std::endl;
47
47
48
48
49
- ((ControlNode*) parent_prt_) ->propagateHalt (child_index_);
49
+ parent_prt_->propagateHalt (child_index_);
50
50
}
51
51
52
52
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ NodeStatus ReactiveSequence::tick()
50
50
// std::cout << name() << " is propagating halt to" << ((ControlNode*)parent_prt_)->name() << std::endl;
51
51
52
52
53
- ((ControlNode*) parent_prt_) ->propagateHalt (child_index_);
53
+ parent_prt_->propagateHalt (child_index_);
54
54
}
55
55
56
56
current_child_node->executeTick ();
Original file line number Diff line number Diff line change 13
13
14
14
#include " behaviortree_cpp/tree_node.h"
15
15
#include < cstring>
16
- // #include <behaviortree_cpp/control_node.h>
16
+ #include < behaviortree_cpp/control_node.h>
17
17
18
18
namespace BT
19
19
{
@@ -172,12 +172,12 @@ void TreeNode::set_child_index(unsigned int child_index)
172
172
child_index_ = child_index;
173
173
}
174
174
175
- void TreeNode::set_parent_prt (TreeNode *parent_ptr)
175
+ void TreeNode::set_parent_prt (ControlNode *parent_ptr)
176
176
{
177
177
parent_prt_ = parent_ptr;
178
178
}
179
179
180
- TreeNode *TreeNode::parent_prt () const
180
+ ControlNode *TreeNode::parent_prt () const
181
181
{
182
182
return parent_prt_;
183
183
}
You can’t perform that action at this time.
0 commit comments