2020-12-30 15:31:36 +08:00
|
|
|
#ifndef TRAVERSE_BFS_H
|
|
|
|
#define TRAVERSE_BFS_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QQueue>
|
|
|
|
|
|
|
|
class Traverse_BFS
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void Traverse();
|
2021-01-21 21:05:53 +08:00
|
|
|
virtual ~Traverse_BFS() = default;
|
2020-12-30 15:31:36 +08:00
|
|
|
virtual void DoSomething(const QFileInfo&) = 0;
|
|
|
|
void setPath(const QString&);
|
2021-01-09 11:25:07 +08:00
|
|
|
protected:
|
|
|
|
explicit Traverse_BFS(const QString&);
|
2020-12-30 15:31:36 +08:00
|
|
|
private:
|
2021-01-09 11:25:07 +08:00
|
|
|
Traverse_BFS(const Traverse_BFS&) = delete;
|
|
|
|
void operator=(const Traverse_BFS&) = delete;
|
2020-12-30 15:31:36 +08:00
|
|
|
QString path = "/home";
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TRAVERSE_BFS_H
|