mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-24 16:49:58 +01:00
Draft searchFileVisitor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#ifndef SEARCHVISITOR_H
|
||||
#define SEARCHVISITOR_H
|
||||
|
||||
#include <string>
|
||||
#include "Visitor.h"
|
||||
|
||||
class SearchVisitor: public Visitor
|
||||
@@ -14,12 +15,33 @@ public:
|
||||
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);
|
||||
void visit(Scene& n) override;
|
||||
void visit(Node& n) override;
|
||||
void visit(Primitive&) override {}
|
||||
void visit(Group& n) override;
|
||||
void visit(Switch& n) override;
|
||||
|
||||
};
|
||||
|
||||
class SearchFileVisitor: public Visitor
|
||||
{
|
||||
std::string filename_;
|
||||
bool found_;
|
||||
|
||||
public:
|
||||
SearchFileVisitor(std::string filename);
|
||||
inline bool found() const { return found_; }
|
||||
|
||||
// Elements of Scene
|
||||
void visit(Scene& n) override;
|
||||
void visit(Node& n) override;
|
||||
void visit(Primitive&) override {}
|
||||
void visit(Group& n) override;
|
||||
void visit(Switch& n) override;
|
||||
|
||||
// Sources
|
||||
void visit (MediaSource& s) override;
|
||||
void visit (SessionFileSource& s) override;
|
||||
};
|
||||
|
||||
#endif // SEARCHVISITOR_H
|
||||
|
||||
Reference in New Issue
Block a user