ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapper/Page.hpp
Revision: 140
Committed: 2004-03-25T18:04:04-08:00 (21 years, 2 months ago) by Douglas Thrift
File size: 1833 byte(s)
Log Message:
There!

File Contents

# Content
1 // Site Mapper
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #ifndef _Page_hpp_
8 #define _Page_hpp_
9
10 #include "SiteMapper.hpp"
11
12 class Matcher;
13
14 class Page
15 {
16 private:
17 string address;
18 string path;
19 string title;
20 list<Page> children;
21 unsigned tab;
22 public:
23 Page(const Page& page);
24 Page(const string& address, const string& path, const string& title);
25 Page(const string& url, const string& title);
26 ~Page() {}
27 string& getAddress(void) { return address; }
28 string& getPath(void) { return path; }
29 string& getTitle(void) { return title; }
30 list<Page>& getChildren(void) { return children; }
31 string getUrl(void) { return "http://" + address + path; }
32 void setAddress(const string& address) { this->address = address; }
33 void setPath(const string& path) { this->path = path; }
34 void setTitle(const string& title) { this->title = title; }
35 void setChildren(list<Page>& children) { this->children = children; }
36 void setUrl(const string& url);
37 Page& operator()(unsigned tab) { this->tab = tab; return *this; }
38 bool operator==(const string& thing);
39 bool operator==(Matcher& matcher);
40 bool operator==(const Page& page) const;
41 bool operator!=(const string& thing) { return !(*this == thing); }
42 bool operator!=(Matcher& matcher) { return !(*this == matcher); }
43 bool operator!=(const Page& page) const { return !(*this == page); }
44 bool operator<(const Page& page) const;
45 bool operator>(const Page& page) const;
46 // friends:
47 friend bool operator==(const string& thing, Page& page) { return page ==
48 thing; }
49 friend bool operator==(Matcher& matcher, Page& page) { return page ==
50 matcher; }
51 friend bool operator!=(const string& thing, Page& page) { return page !=
52 thing; }
53 friend bool operator!=(Matcher& matcher, Page& page) { return page !=
54 matcher; }
55 friend ostream& operator<<(ostream& output, Page& page);
56 };
57
58 #endif // _Page_hpp_

Properties

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