67 |
|
return false; |
68 |
|
} |
69 |
|
|
70 |
< |
bool Page::operator==(Page& page) |
70 |
> |
bool Page::operator==(Matcher& matcher) |
71 |
|
{ |
72 |
< |
if (address == page.address) |
72 |
> |
if (address == matcher) |
73 |
|
{ |
74 |
< |
if (path == page.path || title == page.title) return true; |
74 |
> |
return true; |
75 |
> |
} |
76 |
> |
else if (path == matcher) |
77 |
> |
{ |
78 |
> |
return true; |
79 |
> |
} |
80 |
> |
else if (title == matcher) |
81 |
> |
{ |
82 |
> |
return true; |
83 |
|
} |
84 |
|
|
85 |
|
return false; |
86 |
|
} |
87 |
|
|
88 |
< |
bool Page::operator<(Page& page) |
81 |
< |
{ |
82 |
< |
if (address < page.address) if (path < page.path) return true; |
83 |
< |
|
84 |
< |
return false; |
85 |
< |
} |
86 |
< |
|
87 |
< |
bool Page::operator>(Page& page) |
88 |
> |
bool Page::operator==(const Page& page) const |
89 |
|
{ |
90 |
< |
if (address > page.address) if (path > page.path) return true; |
90 |
> |
if (address == page.address) |
91 |
> |
{ |
92 |
> |
return path == page.path || title == page.title; |
93 |
> |
} |
94 |
|
|
95 |
|
return false; |
96 |
|
} |
99 |
|
{ |
100 |
|
string tab(page.tab, '\t'); |
101 |
|
|
102 |
< |
output << tab << "<item><link address=\"" << page.getUrl() << "\"\n" |
102 |
> |
output << tab << "<item><link address=\"" << page.getUrl() << "\">" |
103 |
|
<< page.title << "</link>\n"; |
104 |
|
|
105 |
|
if (!page.children.empty()) |
106 |
|
{ |
107 |
|
output << tab << "\t<list>\n"; |
108 |
|
|
109 |
< |
for (int index = 0; index < page.children.size(); index++) |
109 |
> |
for (unsigned index = 0; index < page.children.size(); index++) |
110 |
|
{ |
111 |
|
output << page.children[index](page.tab + 1) << '\n'; |
112 |
|
} |