Skip to content

Commit

Permalink
Allow for changing of system tree parent
Browse files Browse the repository at this point in the history
Makes it possible to update the parent if the information arrives lates
  • Loading branch information
cvonelm committed Feb 11, 2025
1 parent 746e082 commit a277dc6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/otf2xx/definition/detail/system_tree_node_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ namespace definition
return std::make_pair(parent_.get(), pref_);
}

void parent(system_tree_node_impl* parent, reference_type pref)
{
parent_ = otf2::intrusive_ptr<system_tree_node_impl>(parent);
pref_ = pref;
}

private:
otf2::definition::string name_;
otf2::definition::string class_name_;
Expand Down
5 changes: 5 additions & 0 deletions include/otf2xx/definition/system_tree_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ namespace definition
return data_->class_name();
}

void parent(otf2::definition::system_tree_node parent)
{
data_->parent(parent.get(), parent.ref());
}

/**
* \brief returns the parent
* \returns otf2::definition::system_tree_node
Expand Down

0 comments on commit a277dc6

Please sign in to comment.