ReactOS 0.4.15-dev-7953-g1f49173
hhp_reader.h
Go to the documentation of this file.
1
2// This file is part of hhpcomp, a free HTML Help Project (*.hhp) compiler.
3// Copyright (C) 2015 Benedikt Freisen
4//
5// This library is free software; you can redistribute it and/or
6// modify it under the terms of the GNU Lesser General Public
7// License as published by the Free Software Foundation; either
8// version 2.1 of the License, or (at your option) any later version.
9//
10// This library is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public
16// License along with this library; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19
20#include <string>
21#include <map>
22#include <list>
23#include <set>
24
25using namespace std; // using 'using' here for convenience
26
27class hhp_reader; // forward declaration
28
30{
31private:
32 string name;
33
34public:
35 virtual void process_line(string line) = 0;
36 string get_name();
37 void set_name(string name);
38};
39
41{
42private:
43 string key;
45 string value;
48
49public:
50 hhp_pair(string key, bool has_default_value = false, string default_value = "");
51 void set_value(string value);
52 string get_value();
53 string get_key();
54};
55
57{
58protected:
59 map<string, hhp_pair*> entries;
60
62
63public:
64 virtual void process_line(string line);
65};
66
68{
69 friend class hhp_reader;
70
71private:
91
92public:
95};
96
98{
99 friend class hhp_reader;
100
101private:
102 list<string> filenames;
103
104public:
106 virtual void process_line(string line);
107};
108
110{
111private:
112 string filename;
113 map<string, hhp_section*> sections;
117
119 void read();
121
122public:
123 hhp_reader(string filename);
124 ~hhp_reader();
125
126 string get_title_string();
128 string get_index_file_string();
130 unsigned int get_language_code();
132
135};
136
list< string > filenames
Definition: hhp_reader.h:102
virtual void process_line(string line)
Definition: hhp_reader.cpp:147
virtual void process_line(string line)
Definition: hhp_reader.cpp:73
void add_entry(hhp_pair *entry)
Definition: hhp_reader.cpp:86
map< string, hhp_pair * > entries
Definition: hhp_reader.h:59
hhp_pair * full_text_search_stop_list_file
Definition: hhp_reader.h:90
hhp_pair * display_compile_note
Definition: hhp_reader.h:88
hhp_pair * flat
Definition: hhp_reader.h:89
hhp_pair * errorlogfile
Definition: hhp_reader.h:85
hhp_pair * contents_file
Definition: hhp_reader.h:75
hhp_pair * binary_index
Definition: hhp_reader.h:73
hhp_pair * language
Definition: hhp_reader.h:81
hhp_pair * full_text_search
Definition: hhp_reader.h:86
hhp_pair * binary_TOC
Definition: hhp_reader.h:72
hhp_pair * createchifile
Definition: hhp_reader.h:83
hhp_pair * display_compile_progress
Definition: hhp_reader.h:87
hhp_pair * defaultwindow
Definition: hhp_reader.h:78
hhp_pair * compiled_file
Definition: hhp_reader.h:74
hhp_pair * index_file
Definition: hhp_reader.h:76
hhp_pair * defaultfont
Definition: hhp_reader.h:80
hhp_pair * compatibility
Definition: hhp_reader.h:84
hhp_pair * title
Definition: hhp_reader.h:82
hhp_pair * autoindex
Definition: hhp_reader.h:77
hhp_pair * default_topic
Definition: hhp_reader.h:79
bool has_default_value
Definition: hhp_reader.h:46
bool value_has_been_set
Definition: hhp_reader.h:44
string default_value
Definition: hhp_reader.h:47
string get_key()
Definition: hhp_reader.cpp:68
string get_value()
Definition: hhp_reader.cpp:55
void set_value(string value)
Definition: hhp_reader.cpp:49
string key
Definition: hhp_reader.h:43
string value
Definition: hhp_reader.h:45
void read()
Definition: hhp_reader.cpp:179
hhp_options_section * options
Definition: hhp_reader.h:114
string get_contents_file_string()
Definition: hhp_reader.cpp:229
string get_default_topic_string()
Definition: hhp_reader.cpp:239
set< string > unique_file_pathes
Definition: hhp_reader.h:116
void add_section(hhp_section *section)
Definition: hhp_reader.cpp:171
string get_compiled_file_string()
Definition: hhp_reader.cpp:249
string filename
Definition: hhp_reader.h:112
set< string >::iterator get_file_pathes_iterator_end()
Definition: hhp_reader.cpp:259
set< string >::iterator get_file_pathes_iterator_begin()
Definition: hhp_reader.cpp:254
string get_index_file_string()
Definition: hhp_reader.cpp:234
string get_title_string()
Definition: hhp_reader.cpp:224
map< string, hhp_section * > sections
Definition: hhp_reader.h:113
void compute_unique_file_pathes_set()
Definition: hhp_reader.cpp:216
hhp_files_section * files
Definition: hhp_reader.h:115
unsigned int get_language_code()
Definition: hhp_reader.cpp:244
void set_name(string name)
Definition: hhp_reader.cpp:36
string get_name()
Definition: hhp_reader.cpp:31
virtual void process_line(string line)=0
string name
Definition: hhp_reader.h:32
Definition: _set.h:50
_Rep_type::iterator iterator
Definition: _set.h:73
const char * filename
Definition: ioapi.h:137
uint32_t entry
Definition: isohybrid.c:63
Definition: features.h:417
Definition: copy.c:22
Definition: parser.c:49
Definition: name.c:39
Definition: parser.c:56
Definition: pdh_main.c:94