Simple class for resolving paths on Linux/Windows/Mac OS. More...
#include <resolver.h>
Public Types | |
| typedef std::vector< path > ::const_iterator | const_iterator |
| typedef std::vector< path > ::iterator | iterator |
Public Member Functions | |
| void | append (const path &path) |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| void | erase (iterator it) |
| const path & | operator[] (size_t index) const |
| path & | operator[] (size_t index) |
| void | prepend (const path &path) |
| path | resolve (const path &value) const |
| resolver () | |
| size_t | size () const |
Private Attributes | |
| std::vector< path > | m_paths |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const resolver &r) |
Simple class for resolving paths on Linux/Windows/Mac OS.
This convenience class looks for a file or directory given its name and a set of search paths. The implementation walks through the search paths in order and stops once the file is found.
Definition at line 23 of file resolver.h.
| typedef std::vector<path>::const_iterator resolver::const_iterator |
Definition at line 26 of file resolver.h.
| typedef std::vector<path>::iterator resolver::iterator |
Definition at line 25 of file resolver.h.
| resolver::resolver | ( | ) | [inline] |
Definition at line 28 of file resolver.h.
| void resolver::append | ( | const path & | path | ) | [inline] |
Definition at line 43 of file resolver.h.
| iterator resolver::begin | ( | ) | [inline] |
Definition at line 34 of file resolver.h.
| const_iterator resolver::begin | ( | ) | const [inline] |
Definition at line 37 of file resolver.h.
| iterator resolver::end | ( | ) | [inline] |
Definition at line 35 of file resolver.h.
| const_iterator resolver::end | ( | ) | const [inline] |
Definition at line 38 of file resolver.h.
| void resolver::erase | ( | iterator | it | ) | [inline] |
Definition at line 40 of file resolver.h.
| const path& resolver::operator[] | ( | size_t | index | ) | const [inline] |
Definition at line 44 of file resolver.h.
| path& resolver::operator[] | ( | size_t | index | ) | [inline] |
Definition at line 45 of file resolver.h.
| void resolver::prepend | ( | const path & | path | ) | [inline] |
Definition at line 42 of file resolver.h.
| path resolver::resolve | ( | const path & | value | ) | const [inline] |
Definition at line 47 of file resolver.h.
| size_t resolver::size | ( | ) | const [inline] |
Definition at line 32 of file resolver.h.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const resolver & | r | ||
| ) | [friend] |
Definition at line 56 of file resolver.h.
std::vector<path> resolver::m_paths [private] |
Definition at line 69 of file resolver.h.