1 |
Douglas Thrift |
126 |
// Site Mapper |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _SiteMapper_hpp_ |
8 |
|
|
#define _SiteMapper_hpp_ |
9 |
|
|
|
10 |
douglas |
635 |
#include <cxx/platform.hpp> |
11 |
douglas |
312 |
|
12 |
douglas |
299 |
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
douglas |
635 |
#include <api/files.hpp> |
17 |
|
|
#include <ios/string.hpp> |
18 |
|
|
#include <xml/document.hpp> |
19 |
|
|
#include <xml/nodeset.hpp> |
20 |
|
|
#include <xml/parse.hpp> |
21 |
|
|
#include <xml/textwriter.hpp> |
22 |
Douglas Thrift |
154 |
|
23 |
douglas |
299 |
#include <string> |
24 |
|
|
#include <map> |
25 |
|
|
|
26 |
Douglas Thrift |
128 |
#include "Page.hpp" |
27 |
|
|
|
28 |
Douglas Thrift |
126 |
class SiteMapper |
29 |
|
|
{ |
30 |
|
|
private: |
31 |
douglas |
559 |
cse::String comment; |
32 |
douglas |
285 |
ext::Vector<Page> pages; |
33 |
|
|
std::map<std::string, std::multimap<std::string, Page> > newPages; |
34 |
douglas |
559 |
void oldMap(const cse::String& siteMap); |
35 |
douglas |
285 |
void oldMap(ext::Vector<Page>& pages, xml::Node* list); |
36 |
douglas |
559 |
void newIndex(const cse::String& siteIndex); |
37 |
douglas |
285 |
bool newIndex(ext::Vector<Page>& pages, Page& page); |
38 |
douglas |
559 |
void newMap(const cse::String& siteMap); |
39 |
|
|
void newMap(ext::Vector<Page>& pages, const cse::String& childOf, std::multimap<std::string, Page>& newPages); |
40 |
Douglas Thrift |
126 |
public: |
41 |
douglas |
559 |
SiteMapper(const cse::String& siteIndex, const cse::String& siteMap); |
42 |
|
|
static cse::String program; |
43 |
douglas |
348 |
static bool debug; |
44 |
Douglas Thrift |
126 |
}; |
45 |
|
|
|
46 |
|
|
#endif // _SiteMapper_hpp_ |