|
coan
6.0.1
A C/C++ Configuration Analyzer
|
A base for classes employed to traverse a file_tree.
More...
#include <file_tree.h>
Public Member Functions | |
| virtual | ~traverser ()=default |
| Destructor. | |
| void | operator() (entry const &entry) |
Apply the traverser function-wise to an element of a file_tree. More... | |
| virtual void | enter_dir (std::string const &dirname) |
| Do something (or nohting) on entering a directory. More... | |
| virtual void | at_file (std::string const &filename) |
| Do something (or nothing) on reaching a file. More... | |
| virtual void | leave_dir (std::string const &dirname) |
| Do something (or nohting) on leaving a directory. More... | |
Protected Attributes | |
| node const * | _cur_dir = nullptr |
| Pointer the node representing the latest directory that traversal has reached. | |
| path_t | _cur_path |
| The absolute path of the object that traversal has reached. | |
A base for classes employed to traverse a file_tree.
A traverser encapsulates the actions to be taken at the junctures of a file_tree traversal:-
Definition at line 285 of file file_tree.h.
|
inlinevirtual |
Do something (or nothing) on reaching a file.
| filename | The absolute name of the file. |
Reimplemented in dataset::driver.
Definition at line 306 of file file_tree.h.
|
inlinevirtual |
Do something (or nohting) on entering a directory.
| dirname | The absolute name of the directory. |
Definition at line 302 of file file_tree.h.
|
inlinevirtual |
Do something (or nohting) on leaving a directory.
| dirname | The absolute name of the directory. |
Definition at line 310 of file file_tree.h.
| void file_tree::traverser::operator() | ( | entry const & | entry | ) |
Apply the traverser function-wise to an element of a file_tree.
| entry | The element to which the traverser shall be applied. |
Definition at line 73 of file file_tree.cpp.