20 |
|
Page(const string& address, const string& path, const string& title); |
21 |
|
Page(const string& url); |
22 |
|
~Page() {} |
23 |
< |
string getAddress(void) const { return address; } |
24 |
< |
string getPath(void) const { return path; } |
25 |
< |
string getTitle(void) const { return title; } |
26 |
< |
vector<Page> getChildren(void) const { return children; } |
27 |
< |
string getUrl(void) const { return "http://" + address + path; } |
23 |
> |
string& getAddress(void) { return address; } |
24 |
> |
string& getPath(void) { return path; } |
25 |
> |
string& getTitle(void) { return title; } |
26 |
> |
vector<Page>& getChildren(void) { return children; } |
27 |
> |
string getUrl(void) { return "http://" + address + path; } |
28 |
|
void setAddress(const string& address) { this->address = address; } |
29 |
|
void setPath(const string& path) { this->path = path; } |
30 |
|
void setTitle(const string& title) { this->title = title; } |
31 |
|
void setChildren(vector<Page>& children) { this->children = children; } |
32 |
|
void setUrl(const string& url); |
33 |
< |
bool operator==(const string& thing) const; |
34 |
< |
bool operator==(const Page& page) const; |
35 |
< |
bool operator!=(const string& thing) const; |
36 |
< |
bool operator!=(const Page& page) const; |
37 |
< |
bool operator<(const Page& page) const; |
38 |
< |
bool operator>(const Page& page) const; |
33 |
> |
bool operator==(const string& thing); |
34 |
> |
bool operator==(Page& page); |
35 |
> |
bool operator!=(const string& thing) { return !(*this == thing); } |
36 |
> |
bool operator!=(Page& page) { return !(*this == page); } |
37 |
> |
bool operator<(Page& page); |
38 |
> |
bool operator>(Page& page); |
39 |
|
// friends: |
40 |
< |
friend bool operator==(const string& thing, const Page& page) { return page |
41 |
< |
== thing; } |
42 |
< |
friend bool operator!=(const string& thing, const Page& page) { return page |
43 |
< |
== thing; } |
40 |
> |
friend bool operator==(const string& thing, Page& page) { return page == |
41 |
> |
thing; } |
42 |
> |
friend bool operator!=(const string& thing, Page& page) { return page == |
43 |
> |
thing; } |
44 |
|
}; |
45 |
|
|
46 |
|
#endif // _Page_hpp_ |