00001 #ifndef PATH_H
00002 #define PATH_H
00003
00004
00005 #include <string>
00006 #include <vector>
00007
00008 class Path {
00009 public:
00010 Path() {}
00012 Path(const Path& p,unsigned int l);
00013
00014 bool parse(const string& path_string);
00015
00016 const string& operator[](unsigned int i) const { return path_[i]; }
00017 unsigned int size() const { return path_.size(); }
00018
00019 bool operator==(const Path& p) const { return path_ == p.path_; }
00020 bool operator<(const Path& p) const { return path_ < p.path_; }
00021
00022 friend ostream& operator<<(ostream&,const Path& path);
00023 private:
00024 vector<string> path_;
00025 };
00026
00027 #endif