ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapper/Page.hpp
Revision: 135
Committed: 2004-03-25T01:02:24-08:00 (21 years, 2 months ago) by Douglas Thrift
File size: 1479 byte(s)
Log Message:
This is nerve-wracking!

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 Page
13 {
14 private:
15 string address;
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, const string& title);
23 ~Page() {}
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 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, 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_

Properties

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