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 129 by Douglas Thrift, 2004-03-23T22:49:41-08:00 vs.
Revision 141 by Douglas Thrift, 2004-03-25T19:21:58-08:00

# Line 9 | Line 9
9  
10   #include "SiteMapper.hpp"
11  
12 + class Matcher;
13 +
14   class Page
15   {
16   private:
# Line 16 | Line 18 | private:
18          string path;
19          string title;
20          vector<Page> children;
21 +        unsigned tab;
22   public:
23          Page(const string& address, const string& path, const string& title);
24 <        Page(const string& url);
24 >        Page(const string& url, const string& title);
25          ~Page() {}
26          string& getAddress(void) { return address; }
27          string& getPath(void) { return path; }
# Line 30 | Line 33 | public:
33          void setTitle(const string& title) { this->title = title; }
34          void setChildren(vector<Page>& children) { this->children = children; }
35          void setUrl(const string& url);
36 +        Page& operator()(unsigned tab) { this->tab = tab; return *this; }
37          bool operator==(const string& thing);
38 <        bool operator==(Page& page);
38 >        bool operator==(Matcher& matcher);
39 >        bool operator==(const Page& page) const;
40          bool operator!=(const string& thing) { return !(*this == thing); }
41 <        bool operator!=(Page& page) { return !(*this == page); }
42 <        bool operator<(Page& page);
43 <        bool operator>(Page& page);
41 >        bool operator!=(Matcher& matcher) { return !(*this == matcher); }
42 >        bool operator!=(const Page& page) const { return !(*this == page); }
43 >        bool operator<(const Page& page) const;
44 >        bool operator>(const Page& page) const;
45   // friends:
46          friend bool operator==(const string& thing, Page& page) { return page ==
47                  thing; }
48 <        friend bool operator!=(const string& thing, Page& page) { return page ==
48 >        friend bool operator==(Matcher& matcher, Page& page) { return page ==
49 >                matcher; }
50 >        friend bool operator!=(const string& thing, Page& page) { return page !=
51                  thing; }
52 +        friend bool operator!=(Matcher& matcher, Page& page) { return page !=
53 +                matcher; }
54 +        friend ostream& operator<<(ostream& output, Page& page);
55   };
56  
57   #endif // _Page_hpp_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines