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