32 #include "../Resources/xml_resource_node.h"
33 #include "../IOData/file_system.h"
43 class XMLResourceNode;
45 class XMLResourceDocument_Impl;
111 bool default_value)
const;
116 int default_value)
const;
184 std::shared_ptr<XMLResourceDocument_Impl> impl;
XMLResourceNode create_resource(const std::string &resource_id, const std::string &type)
Construct a new resource object.
void destroy_resource(const std::string &resource_id)
Destroy resource object.
I/O Device interface.
Definition: iodevice.h:50
void load(const std::string &filename)
Load resource XML tree from file.
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.
std::vector< std::string > get_resource_names() const
Returns a list of all resources available.
XMLResourceNode get_resource(const std::string &resource_id) const
Returns Resource representing the given resource.
void save(const std::string &filename)
Save resource XML tree to file.
bool resource_exists(const std::string &resource_id) const
Returns true if a resource exists.
Virtual File System (VFS).
Definition: file_system.h:47
XMLResourceDocument()
Construct a XMLResourceDocument.
bool get_boolean_resource(const std::string &resource_id, bool default_value) const
Returns the value of a boolean resource. (using the value attribute)
void remove_resources(const XMLResourceDocument &additional_resources)
Remove resources from an other resource document.
XMLResourceDocument & operator=(const XMLResourceDocument ©)
int get_integer_resource(const std::string &resource_id, int default_value) const
Returns the value of an integer resource. (using the value attribute)
std::vector< std::string > get_section_names() const
Returns all the resource sections available.
XML Resource Document.
Definition: xml_resource_document.h:48
void add_resources(const XMLResourceDocument &additional_resources)
Add resources from an other resource document.
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)
Resource node for a XMLResourceDocument.
Definition: xml_resource_node.h:46
friend class XMLResourceDocument_Impl
Definition: xml_resource_document.h:187
bool operator==(const XMLResourceDocument &that) const