1 |
// Site Mapper |
2 |
// |
3 |
// Douglas Thrift |
4 |
// |
5 |
// $Id$ |
6 |
|
7 |
#ifndef _SiteMapper_hpp_ |
8 |
#define _SiteMapper_hpp_ |
9 |
|
10 |
#include <iostream> |
11 |
#include <fstream> |
12 |
#include <string> |
13 |
#include <sstream> |
14 |
#include <vector> |
15 |
#include <map> |
16 |
|
17 |
using namespace std; |
18 |
|
19 |
#include <menes-xml/document.hpp> |
20 |
#include <menes-xml/nodeset.hpp> |
21 |
#include <menes-xml/parse.hpp> |
22 |
|
23 |
extern string program; |
24 |
extern bool debug; |
25 |
|
26 |
#include "Page.hpp" |
27 |
|
28 |
class SiteMapper |
29 |
{ |
30 |
private: |
31 |
string comment; |
32 |
vector<Page> pages; |
33 |
map<string, multimap<string, Page> > newPages; |
34 |
void oldMap(const string& siteMap); |
35 |
void oldMap(vector<Page>& pages, xml::Node* list); |
36 |
void newIndex(const string& siteIndex); |
37 |
bool newIndex(vector<Page>& pages, Page& page); |
38 |
void newMap(const string& siteMap); |
39 |
void newMap(vector<Page>& pages, const string& childOf, multimap<string, |
40 |
Page>& newPages); |
41 |
public: |
42 |
SiteMapper(const string& siteIndex, const string& siteMap); |
43 |
~SiteMapper() {} |
44 |
}; |
45 |
|
46 |
#endif // _SiteMapper_hpp_ |