mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 15:30:00 +01:00
26 lines
490 B
C++
26 lines
490 B
C++
#ifndef SEARCHVISITOR_H
|
|
#define SEARCHVISITOR_H
|
|
|
|
#include "Visitor.h"
|
|
|
|
class SearchVisitor: public Visitor
|
|
{
|
|
Node *node_;
|
|
bool found_;
|
|
|
|
public:
|
|
SearchVisitor(Node *node);
|
|
inline bool found() const { return found_; }
|
|
inline Node *node() const { return found_ ? node_ : nullptr; }
|
|
|
|
// Elements of Scene
|
|
void visit(Scene& n);
|
|
void visit(Node& n);
|
|
void visit(Primitive&) {}
|
|
void visit(Group& n);
|
|
void visit(Switch& n);
|
|
|
|
};
|
|
|
|
#endif // SEARCHVISITOR_H
|