*/
class WakeupTreeNode {
private:
- explicit WakeupTreeNode(std::shared_ptr<Transition> u) : action_(u) {}
-
WakeupTreeNode* parent_ = nullptr;
/** An ordered list of children of for this node in the tree */
friend WakeupTreeIterator;
public:
+ explicit WakeupTreeNode(std::shared_ptr<Transition> u) : action_(u) {}
+
+ WakeupTreeNode() = default;
~WakeupTreeNode() = default;
WakeupTreeNode(const WakeupTreeNode&) = delete;
WakeupTreeNode(WakeupTreeNode&&) = default;
std::shared_ptr<Transition> get_action() const { return action_; }
const std::list<WakeupTreeNode*>& get_ordered_children() const { return children_; }
+ std::string string_of_whole_tree(int indentation_level) const;
+
/** Insert a node `node` as a new child of this node */
void add_child(WakeupTreeNode* node);
};
void insert_node(std::unique_ptr<WakeupTreeNode> node);
void insert_sequence_after(WakeupTreeNode* node, const PartialExecution& w);
void remove_node(WakeupTreeNode* node);
- bool contains(WakeupTreeNode* node) const;
+ bool contains(const WakeupTreeNode* node) const;
/**
* @brief Removes the node `root` and all of its descendants from
std::vector<std::string> get_single_process_texts() const;
+ std::string string_of_whole_tree() const;
+
/**
* @brief Remove the subtree of the smallest (with respect
* to the tree's "<" relation) single-process node.
*/
void remove_min_single_process_subtree();
+ void remove_subtree_at_aid(aid_t proc);
+
/**
* @brief Whether or not this tree is considered empty
*