ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapperOld/Page.cpp
Revision: 129
Committed: 2004-03-23T22:49:41-08:00 (21 years, 3 months ago) by Douglas Thrift
Original Path: SiteMapper/Page.cpp
File size: 829 byte(s)
Log Message:
It compiles!

File Contents

# Content
1 // Site Mapper
2 //
3 // Douglas Thrift
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)
11 {
12 setAddress(address);
13 setPath(path);
14 setTitle(title);
15 }
16
17 Page::Page(const string& url)
18 {
19 setUrl(url);
20 }
21
22 void Page::setUrl(const string& url)
23 {
24 Matcher matcher("^http://(.+)(/.*)?$");
25
26 if (url == matcher)
27 {
28 address = matcher[1];
29
30 if (matcher.size() > 2)
31 {
32 path = matcher[2];
33 }
34 else
35 {
36 path = '/';
37 }
38 }
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 //
50
51 return false;
52 }
53
54 bool Page::operator==(Page& page)
55 {
56 //
57
58 return false;
59 }
60
61 bool Page::operator<(Page& page)
62 {
63 //
64
65 return false;
66 }
67
68 bool Page::operator>(Page& page)
69 {
70 //
71
72 return false;
73 }

Properties

Name Value
svn:eol-style native
svn:keywords Id