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

Comparing SiteMapper/Page.cpp (file contents):
Revision 128 by Douglas Thrift, 2004-03-23T22:15:08-08:00 vs.
Revision 132 by Douglas Thrift, 2004-03-24T15:58:55-08:00

# Line 4 | Line 4
4   //
5   // $Id$
6  
7 + #include "Matcher.hpp"
8   #include "Page.hpp"
9  
10   Page::Page(const string& address, const string& path, const string& title)
# Line 38 | Line 39 | void Page::setUrl(const string& url)
39          else
40          {
41                  cerr << program << ": Page.setUrl(" << url << ") failure.\n";
42 +
43 +                exit(1);
44          }
45   }
46 +
47 + bool Page::operator==(const string& thing)
48 + {
49 +        if (address == thing)
50 +        {
51 +                return true;
52 +        }
53 +        else if (path == thing)
54 +        {
55 +                return true;
56 +        }
57 +        else if (title == thing)
58 +        {
59 +                return true;
60 +        }
61 +
62 +        return false;
63 + }
64 +
65 + bool Page::operator==(Page& page)
66 + {
67 +        if (address == page.address)
68 +        {
69 +                if (path == page.path || title == page.title) return true;
70 +        }
71 +
72 +        return false;
73 + }
74 +
75 + bool Page::operator<(Page& page)
76 + {
77 +        if (address < page.address) if (path < page.path) return true;
78 +
79 +        return false;
80 + }
81 +
82 + bool Page::operator>(Page& page)
83 + {
84 +        if (address > page.address) if (path > page.path) return true;
85 +
86 +        return false;
87 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines