25 typedef std::vector<path_impl>::iterator iterator;
26 typedef std::vector<path_impl>::const_iterator const_iterator;
29 m_paths.push_back(path_impl::getcwd());
32 size_t size()
const {
return m_paths.size(); }
34 iterator begin() {
return m_paths.begin(); }
35 iterator end() {
return m_paths.end(); }
37 const_iterator begin()
const {
return m_paths.begin(); }
38 const_iterator end()
const {
return m_paths.end(); }
40 void erase(iterator it) { m_paths.erase(it); }
42 void prepend(
const path_impl &path) { m_paths.insert(m_paths.begin(), path); }
43 void append(
const path_impl &path) { m_paths.push_back(path); }
44 const path_impl &operator[](
size_t index)
const {
return m_paths[index]; }
45 path_impl &operator[](
size_t index) {
return m_paths[index]; }
48 for (const_iterator it = m_paths.begin(); it != m_paths.end(); ++it) {
50 if (combined.exists())
56 friend std::ostream &operator<<(std::ostream &os,
const resolver &r) {
57 os <<
"resolver[" << std::endl;
58 for (
size_t i = 0; i < r.m_paths.size(); ++i) {
59 os <<
" \"" << r.m_paths[i] <<
"\"";
60 if (i + 1 < r.m_paths.size())
69 std::vector<path_impl> m_paths;
Simple class for resolving paths on Linux/Windows/Mac OS.
Definition: resolver.h:23
Simple class for manipulating paths on Linux/Windows/Mac OS.
Definition: path.h:33