Iterator(const Path &);
public:
- Iterator &operator++();
- Iterator &operator--();
+ Iterator &operator++();
+ Iterator &operator--();
std::string operator*() const;
- bool operator==(const Iterator &i) const { return (start==i.start && end==i.end); }
- bool operator!=(const Iterator &i) const { return !(*this==i); }
+ bool operator==(const Iterator &i) const { return (start==i.start && end==i.end); }
+ bool operator!=(const Iterator &i) const { return !(*this==i); }
};
private:
const std::string &str() const { return path; }
/// Returns the number of components in the path.
- unsigned size() const;
+ unsigned size() const;
- bool empty() const { return path.empty(); }
+ bool empty() const { return path.empty(); }
/// Determines whether the path starts from the root directory
bool is_absolute() const;
*/
std::string operator[](int) const;
- bool operator==(const Path &) const;
- Iterator begin() const;
- Iterator end() const;
+ bool operator==(const Path &) const;
+ Iterator begin() const;
+ Iterator end() const;
private:
void init(const std::string &);
void add_component(const std::string &);