XML Resource Document. More...
#include <xml_resource_document.h>
Public Member Functions | |
Construction | |
XMLResourceDocument () | |
Construct a XMLResourceDocument. More... | |
XMLResourceDocument (const std::string &filename) | |
Constructs a XMLResourceDocument. More... | |
XMLResourceDocument (const std::string &filename, FileSystem fs) | |
Constructs a XMLResourceDocument. More... | |
XMLResourceDocument (IODevice file, const std::string &base_path, FileSystem fs) | |
Constructs a XMLResourceDocument. More... | |
XMLResourceDocument (const XMLResourceDocument &other) | |
Constructs a XMLResourceDocument. More... | |
~XMLResourceDocument () | |
Attributes | |
bool | resource_exists (const std::string &resource_id) const |
Returns true if a resource exists. More... | |
std::vector< std::string > | get_section_names () const |
Returns all the resource sections available. More... | |
std::vector< std::string > | get_resource_names () const |
Returns a list of all resources available. More... | |
std::vector< std::string > | get_resource_names (const std::string §ion) const |
std::vector< std::string > | get_resource_names_of_type (const std::string &type) const |
Returns a list of all resources available matching a given type. More... | |
std::vector< std::string > | get_resource_names_of_type (const std::string &type, const std::string §ion) const |
XMLResourceNode | get_resource (const std::string &resource_id) const |
Returns Resource representing the given resource. More... | |
bool | get_boolean_resource (const std::string &resource_id, bool default_value) const |
Returns the value of a boolean resource. (using the value attribute) More... | |
int | get_integer_resource (const std::string &resource_id, int default_value) const |
Returns the value of an integer resource. (using the value attribute) More... | |
std::string | get_string_resource (const std::string &resource_id, const std::string &default_value) const |
Returns the value of an string resource. (using the value attribute) More... | |
Operations | |
XMLResourceDocument & | operator= (const XMLResourceDocument ©) |
bool | operator== (const XMLResourceDocument &that) const |
void | add_resources (const XMLResourceDocument &additional_resources) |
Add resources from an other resource document. More... | |
void | remove_resources (const XMLResourceDocument &additional_resources) |
Remove resources from an other resource document. More... | |
XMLResourceNode | create_resource (const std::string &resource_id, const std::string &type) |
Construct a new resource object. More... | |
void | destroy_resource (const std::string &resource_id) |
Destroy resource object. More... | |
void | save (const std::string &filename) |
Save resource XML tree to file. More... | |
void | save (const std::string &filename, const FileSystem &file_system) |
Save. More... | |
void | save (IODevice file) |
Save. More... | |
void | load (const std::string &filename) |
Load resource XML tree from file. More... | |
void | load (const std::string &filename, const FileSystem &file_system) |
Load. More... | |
void | load (IODevice file, const std::string &base_path=std::string(), const FileSystem &file_system=FileSystem()) |
Load. More... | |
Implementation | |
class | XMLResourceNode |
class | XMLResourceDocument_Impl |
XML Resource Document.