-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathDummyFileTree.h
More file actions
34 lines (28 loc) · 877 Bytes
/
DummyFileTree.h
File metadata and controls
34 lines (28 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef DUMMY_TREE_H
#define DUMMY_TREE_H
#include <uibase/ifiletree.h>
// filetree implementation for testing purpose
//
class DummyFileTree : public MOBase::IFileTree {
public:
DummyFileTree(std::shared_ptr<const IFileTree> parent, QString name)
: FileTreeEntry(parent, name), IFileTree()
{
}
protected:
std::shared_ptr<IFileTree> makeDirectory(std::shared_ptr<const IFileTree> parent,
QString name) const override
{
return std::make_shared<DummyFileTree>(parent, name);
}
bool doPopulate(std::shared_ptr<const IFileTree>,
std::vector<std::shared_ptr<FileTreeEntry>>&) const override
{
return true;
}
std::shared_ptr<IFileTree> doClone() const override
{
return std::make_shared<DummyFileTree>(nullptr, name());
}
};
#endif