Elaztek Developer Hub
Blamite Game Engine - Strings  00449.01.12.26.0555.blamite
A library containing general purpose utilities and classes for use in multiple projects.
xml.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
5 
6 #ifdef STRINGS_EXPORTS
7 #define STRINGS_API __declspec(dllexport)
8 #else
9 #define STRINGS_API __declspec(dllimport)
10 #endif
11 
16 {
25  STRINGS_API std::string FormatXMLString(std::string xml_contents, int spaces_per_indent = 4);
26 
39  STRINGS_API std::string GetChildNodeValue(rapidxml::xml_node<>* parent_node, std::string child_node_name,
40  std::string _default = "", bool treat_as_directory = false);
41 
52  STRINGS_API bool GetChildNodeValueBool(rapidxml::xml_node<>* parent_node, std::string child_node_name, bool _default = false);
53 }
logger.h
BlamStrings::Utils::XML::GetChildNodeValue
STRINGS_API std::string GetChildNodeValue(rapidxml::xml_node<> *parent_node, std::string child_node_name, std::string _default="", bool treat_as_directory=false)
Retrieves the value of a child node within an XML node.
Definition: xml.cpp:120
GenerateNodeString
std::string GenerateNodeString(rapidxml::xml_node<> *node, int indent_level, int spaces_per_indent)
Generates a string for the given XML node.
Definition: xml.cpp:52
BlamStrings::Utils::XML::GetChildNodeValueBool
STRINGS_API bool GetChildNodeValueBool(rapidxml::xml_node<> *parent_node, std::string child_node_name, bool _default=false)
Retrieves the value of a child node within an XML node.
Definition: xml.cpp:147
BlamStrings::Logger::LogEvent
STRINGS_API void LogEvent(BlamBasicLogMessage message)
Logs an event to the logger.
Definition: logger.cpp:41
BlamStrings::Utils::XML
Namespace containing functions for working with XML files and data.
Definition: xml.h:15
xml.h
BlamStrings::Utils::XML::FormatXMLString
STRINGS_API std::string FormatXMLString(std::string xml_contents, int spaces_per_indent=4)
Formats a string containing XML data into a human-readable format.
Definition: xml.cpp:92
rapidxml::xml_attribute
Class representing attribute node of XML document.
Definition: rapidxml.hpp:138
GenerateIndentPrefix
std::string GenerateIndentPrefix(int indent_level, int spaces_per_indent)
Generates a string prefix for the given indentation level.
Definition: xml.cpp:22
rapidxml::xml_node::first_node
xml_node< Ch > * first_node(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets first child node, optionally matching node name.
Definition: rapidxml.hpp:936
rapidxml::xml_node::type
node_type type() const
Gets type of node.
Definition: rapidxml.hpp:913
rapidxml::xml_document
This class represents root of the DOM hierarchy.
Definition: rapidxml.hpp:139
rapidxml::node_data
@ node_data
A data node. Name is empty. Value contains data text.
Definition: rapidxml.hpp:147
NEWLINE_MARKER
#define NEWLINE_MARKER
Definition: xml.cpp:9
rapidxml::xml_node
Class representing a node of XML document.
Definition: rapidxml.hpp:137
BlamStrings::Converters::StringToBool
STRINGS_API bool StringToBool(std::string string)
Converts a string to a boolean.
Definition: converters.cpp:67
rapidxml::xml_attribute::next_attribute
xml_attribute< Ch > * next_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets next attribute, optionally matching attribute name.
Definition: rapidxml.hpp:856
converters.h
rapidxml.hpp
rapidxml::xml_node::first_attribute
xml_attribute< Ch > * first_attribute(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets first attribute of node, optionally matching attribute name.
Definition: rapidxml.hpp:1025
BlamLogLevel::Warning
@ Warning
Indicates a warning message. Not something critical, but something that could cause unexpected behavi...
rapidxml::xml_document::parse
void parse(Ch *text)
Parses zero-terminated XML string according to given flags.
Definition: rapidxml.hpp:1381
STRINGS_API
#define STRINGS_API
Definition: xml.h:9
rapidxml::xml_node::next_sibling
xml_node< Ch > * next_sibling(const Ch *name=0, std::size_t name_size=0, bool case_sensitive=true) const
Gets next sibling node, optionally matching node name.
Definition: rapidxml.hpp:1004