2 #include "config_file.h"
3 #include "gdipp_lib/helper.h"
8 config_file::config_file(const wchar_t *filename
)
11 // get config file path
12 wchar_t config_path
[MAX_PATH
];
13 if (!get_dir_file_path(NULL
, filename
, config_path
))
16 pugi::xml_document
*config_xml_doc
= new pugi::xml_document();
17 _config_xml
= config_xml_doc
;
19 config_xml_doc
->load_file(config_path
);
22 config_file::~config_file()
24 if (_config_xml
!= NULL
)
28 const void *config_file::get_config_xml() const
33 bool config_file::empty() const
35 if (_config_xml
== NULL
)
38 pugi::xml_document
*config_xml_doc
= reinterpret_cast<pugi::xml_document
*>(_config_xml
);
39 return config_xml_doc
->empty();