class NodeVisitor
{
protected:
- NodeVisitor() { }
+ NodeVisitor() = default;
public:
- virtual ~NodeVisitor() { }
+ virtual ~NodeVisitor() = default;
virtual void visit(Block &) { }
virtual void visit(Literal &) { }
class TraversingVisitor: public NodeVisitor
{
protected:
- Block *current_block;
+ Block *current_block = 0;
- TraversingVisitor(): current_block(0) { }
+ TraversingVisitor() = default;
public:
virtual void enter(Block &) { }
class NodeRemover: private TraversingVisitor
{
private:
- Stage *stage;
- const std::set<Node *> *to_remove;
- bool recursive_remove;
+ Stage *stage = 0;
+ const std::set<Node *> *to_remove = 0;
+ bool recursive_remove = false;
public:
- NodeRemover();
-
void apply(Stage &, const std::set<Node *> &);
private:
class NodeReorderer: private TraversingVisitor
{
private:
- Node *reorder_before;
- const std::set<Node *> *to_reorder;
+ Node *reorder_before = 0;
+ const std::set<Node *> *to_reorder = 0;
public:
- NodeReorderer();
-
void apply(Stage &, Node &, const std::set<Node *> &);
private: