44 this->has_default_value = has_default_value;
45 this->default_value = default_value;
46 value_has_been_set =
false;
52 value_has_been_set =
true;
57 if (value_has_been_set)
61 if (has_default_value)
75 int pos_equals_sign =
line.find_first_of(
'=');
77 throw runtime_error(
"key-value pair does not contain an equals sign");
79 string value =
line.substr(pos_equals_sign + 1);
80 if (
key.length() == 0)
83 entries.find(
key)->second->set_value(
value);
89 if (entries.count(upper_case_key) != 0)
90 throw logic_error(
"trying to redundantly add key '" + upper_case_key +
"'");
113 add_entry(display_compile_progress =
new hhp_pair(
"Display compile progress",
true,
"Yes"));
114 add_entry(display_compile_note =
new hhp_pair(
"Display compile note",
true,
"Yes"));
116 add_entry(full_text_search_stop_list_file =
new hhp_pair(
"Full text search stop list file",
true,
""));
123 delete compiled_file;
124 delete contents_file;
127 delete defaultwindow;
128 delete default_topic;
132 delete createchifile;
133 delete compatibility;
135 delete full_text_search;
136 delete display_compile_progress;
137 delete display_compile_note;
139 delete full_text_search_stop_list_file;
149 filenames.push_back(
line);
162 compute_unique_file_pathes_set();
174 if (
sections.count(upper_case_name) != 0)
175 throw logic_error(
"trying to redundantly add section '" + upper_case_name +
"'");
187 while (hhp_file.good())
191 if (
line[
line.length() - 1] ==
'\015')
206 else if (
line[0] !=
';' && !
line.empty())
226 return options->title->get_value();
231 return options->contents_file->get_value();
236 return options->index_file->get_value();
241 return options->default_topic->get_value();
251 return options->compiled_file->get_value();
256 return unique_file_pathes.begin();
261 return unique_file_pathes.end();
string get_contents_file_string()
void add_section(hhp_section *section)
UINT32 strtoul(const char *String, char **Terminator, UINT32 Base)
set< string >::iterator get_file_pathes_iterator_begin()
static void set_name(msft_typelib_t *typelib)
hhp_reader(string filename)
string to_upper(string s)
basic_ostream< _CharT, _Traits > &_STLP_CALL endl(basic_ostream< _CharT, _Traits > &__os)
virtual void process_line(string line)
struct section sections[2]
string get_default_topic_string()
string real_path(const char *path)
basic_ifstream< char, char_traits< char > > ifstream
void add_entry(hhp_pair *entry)
void compute_unique_file_pathes_set()
string replace_backslashes(string s)
static int add_section(struct inf_file *file, const WCHAR *name)
string get_compiled_file_string()
_Rep_type::iterator iterator
virtual void process_line(string line)
_STLP_PRIV _List_iterator< _Tp, _Nonconst_traits< _Tp > > iterator
string get_index_file_string()
GLsizei const GLfloat * value
set< string >::iterator get_file_pathes_iterator_end()
hhp_pair(string key, bool has_default_value=false, string default_value="")
void set_value(string value)
unsigned int get_language_code()
void set_name(string name)
string get_title_string()
_CRTIMP int __cdecl read(_In_ int _FileHandle, _Out_writes_bytes_(_MaxCharCount) void *_DstBuf, _In_ unsigned int _MaxCharCount)
BOOL add_entry(LPINT ac, LPSTR **arg, LPCSTR entry)
GLuint const GLchar * name