7 |
|
#ifndef _SiteMapper_hpp_ |
8 |
|
#define _SiteMapper_hpp_ |
9 |
|
|
10 |
< |
#ifdef _WIN32 |
11 |
< |
#pragma warning(disable:4267 4503 4786) |
10 |
> |
#include <cxx/platform.hpp> |
11 |
> |
|
12 |
> |
#ifdef MENES_PRAGMA_ONCE |
13 |
> |
#pragma once |
14 |
|
#endif |
15 |
|
|
16 |
< |
#include <iostream> |
17 |
< |
#include <fstream> |
16 |
> |
#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 |
> |
|
23 |
|
#include <string> |
17 |
– |
#include <sstream> |
18 |
– |
#include <vector> |
24 |
|
#include <map> |
25 |
|
|
21 |
– |
using std::cin; |
22 |
– |
using std::cout; |
23 |
– |
using std::cerr; |
24 |
– |
using std::ostream; |
25 |
– |
using std::ofstream; |
26 |
– |
using std::string; |
27 |
– |
using std::ostringstream; |
28 |
– |
using std::vector; |
29 |
– |
using std::map; |
30 |
– |
using std::multimap; |
31 |
– |
using std::pair; |
32 |
– |
|
33 |
– |
#include <menes-api/console.hpp> |
34 |
– |
#include <menes-xml/document.hpp> |
35 |
– |
#include <menes-xml/nodeset.hpp> |
36 |
– |
#include <menes-xml/parse.hpp> |
37 |
– |
|
38 |
– |
extern string program; |
39 |
– |
extern bool debug; |
40 |
– |
|
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, |
55 |
< |
Page>& newPages); |
31 |
> |
cse::String comment; |
32 |
> |
ext::Vector<Page> pages; |
33 |
> |
std::map<std::string, std::multimap<std::string, Page> > newPages; |
34 |
> |
void oldMap(const cse::String& siteMap); |
35 |
> |
void oldMap(ext::Vector<Page>& pages, xml::Node* list); |
36 |
> |
void newIndex(const cse::String& siteIndex); |
37 |
> |
bool newIndex(ext::Vector<Page>& pages, Page& page); |
38 |
> |
void newMap(const cse::String& siteMap); |
39 |
> |
void newMap(ext::Vector<Page>& pages, const cse::String& childOf, std::multimap<std::string, Page>& newPages); |
40 |
|
public: |
41 |
< |
SiteMapper(const string& siteIndex, const string& siteMap); |
42 |
< |
~SiteMapper() {} |
41 |
> |
SiteMapper(const cse::String& siteIndex, const cse::String& siteMap); |
42 |
> |
static cse::String program; |
43 |
> |
static bool debug; |
44 |
|
}; |
45 |
|
|
46 |
|
#endif // _SiteMapper_hpp_ |