ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapper/Page.hpp
(Generate patch)

Comparing SiteMapper/Page.hpp (file contents):
Revision 128 by Douglas Thrift, 2004-03-23T22:15:08-08:00 vs.
Revision 135 by Douglas Thrift, 2004-03-25T01:02:24-08:00

# Line 16 | Line 16 | private:
16          string path;
17          string title;
18          vector<Page> children;
19 +        unsigned tab;
20   public:
21          Page(const string& address, const string& path, const string& title);
22 <        Page(const string& url);
22 >        Page(const string& url, const string& title);
23          ~Page() {}
24 <        string getAddress(void) const { return address; }
25 <        string getPath(void) const { return path; }
26 <        string getTitle(void) const { return title; }
27 <        vector<Page> getChildren(void) const { return children; }
28 <        string getUrl(void) const { return "http://" + address + path; }
24 >        string& getAddress(void) { return address; }
25 >        string& getPath(void) { return path; }
26 >        string& getTitle(void) { return title; }
27 >        vector<Page>& getChildren(void) { return children; }
28 >        string getUrl(void) { return "http://" + address + path; }
29          void setAddress(const string& address) { this->address = address; }
30          void setPath(const string& path) { this->path = path; }
31          void setTitle(const string& title) { this->title = title; }
32          void setChildren(vector<Page>& children) { this->children = children; }
33          void setUrl(const string& url);
34 <        bool operator==(const string& thing) const;
35 <        bool operator==(const Page& page) const;
36 <        bool operator!=(const string& thing) const;
37 <        bool operator!=(const Page& page) const;
38 <        bool operator<(const Page& page) const;
39 <        bool operator>(const Page& page) const;
34 >        Page& operator()(unsigned tab) { this->tab = tab; return *this; }
35 >        bool operator==(const string& thing);
36 >        bool operator==(Page& page);
37 >        bool operator!=(const string& thing) { return !(*this == thing); }
38 >        bool operator!=(Page& page) { return !(*this == page); }
39 >        bool operator<(Page& page);
40 >        bool operator>(Page& page);
41   // friends:
42 <        friend bool operator==(const string& thing, const Page& page) { return page
43 <                == thing; }
44 <        friend bool operator!=(const string& thing, const Page& page) { return page
45 <                == thing; }
42 >        friend bool operator==(const string& thing, Page& page) { return page ==
43 >                thing; }
44 >        friend bool operator!=(const string& thing, Page& page) { return page ==
45 >                thing; }
46 >        friend ostream& operator<<(ostream& output, Page& page);
47   };
48  
49   #endif // _Page_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines