Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

path.h

Go to the documentation of this file.
00001 #ifndef PATH_H
00002 #define PATH_H
00003 
00004 // $Id: path_h-source.html,v 1.1 2001/04/16 17:43:03 dvermeir Exp $
00005 #include <string>
00006 #include <vector>
00007 
00008 class Path {
00009 public:
00010   Path() {}
00012   Path(const Path& p,unsigned int l);
00013 
00015   bool parse(const string& path_string); 
00016 
00018   const string& str() const;
00019 
00020   const string& operator[](unsigned int i) const { return path_[i]; }
00021   unsigned int size() const { return path_.size(); }
00022 
00023   bool operator==(const Path& p) const { return path_ == p.path_; }
00024   bool operator<(const Path& p) const { return path_ < p.path_; }
00025   
00026   typedef vector<string>::const_iterator iterator;
00027   iterator begin() const { return path_.begin(); }
00028   iterator end() const { return path_.end(); }
00029 
00030   friend ostream& operator<<(ostream&,const Path& path);
00031 private:
00032   vector<string> path_;
00034   mutable string str_; 
00035 };
00036 
00037 #endif

httpstats-stage04 [ 7 April, 2001]