22 #ifndef QDENGINE_PARSER_XML_PARSER_H 23 #define QDENGINE_PARSER_XML_PARSER_H 25 #include "common/system.h" 26 #include "common/hashmap.h" 27 #include "common/stack.h" 29 #include "qdengine/parser/xml_tag_buffer.h" 43 bool parse_file(
const char *fname);
45 bool read_binary_script(
const char *fname);
46 bool is_script_binary(
const char *fname)
const;
47 bool is_script_binary()
const {
48 return _binary_script;
51 const tag &root_tag()
const {
57 void resize_data_pool(uint32 pool_sz) {
58 _data_pool.
resize(pool_sz);
61 bool register_tag_format(
const char *tag_name,
const tag &tg) {
62 tag_format_t::iterator it = _tag_format.find(tag_name);
63 if (it != _tag_format.end())
66 _tag_format[tag_name] = tg;
69 const tag *get_tag_format(
const char *tag_name)
const {
70 tag_format_t::const_iterator it = _tag_format.find(tag_name);
71 if (it != _tag_format.end())
77 int num_tag_formats()
const {
78 return _tag_format.size();
90 tag_stack_t _tag_stack;
91 tag_format_t _tag_format;
100 #endif // QDENGINE_PARSER_XML_PARSER_H Definition: xml_parser.h:35
XML тег.
Definition: xml_tag.h:33
Базовый класс для игровых ресурсов.
Definition: console.h:28
void resize(size_type newSize)
Definition: array.h:411