tue_config
xml.h
Go to the documentation of this file.
1 #ifndef TUE_CONFIG_LOADERS_XML_H_
2 #define TUE_CONFIG_LOADERS_XML_H_
3 
4 #include <istream>
5 #include <string>
6 #include <tinyxml2.h>
7 
8 namespace tue
9 {
10 
11 namespace config
12 {
13 
17 class ReaderWriter;
18 
26 bool setValue(const std::string& key, const std::string& value, ReaderWriter& config);
27 
35 bool loadFromXMLText(const tinyxml2::XMLElement& element, ReaderWriter& config);
36 
43 bool loadFromXMLStream(std::istream& stream, ReaderWriter& config);
44 
51 bool loadFromXMLString(const std::string& string, ReaderWriter& config);
52 
59 bool loadFromXMLFile(const std::string& filename, ReaderWriter& config);
60 
61 } // End of namespace config
62 
63 } // End of namespace tue
64 
65 #endif // TUE_CONFIG_LOADERS_XML_H_
std::string
tue::config::loadFromXMLText
bool loadFromXMLText(const tinyxml2::XMLElement &element, ReaderWriter &config)
loadFromXMLText writes a value from xml element into config object. Stored as double,...
Definition: xml.cpp:48
tue::config::loadFromXMLFile
bool loadFromXMLFile(const std::string &filename, ReaderWriter &config)
loadFromXMLFile loads a xml file into a ReaderWriter class
Definition: xml.cpp:159
istream
tue::config::setValue
bool setValue(const std::string &key, const std::string &value, ReaderWriter &config)
setValue sets the value as a double, int or string
Definition: xml.cpp:18
tue::config::loadFromXMLString
bool loadFromXMLString(const std::string &string, ReaderWriter &config)
loadFromXMLString loads a xml string into a ReaderWriter class
Definition: xml.cpp:142
std::istream
tue
tue::config::loadFromXMLStream
bool loadFromXMLStream(std::istream &stream, ReaderWriter &config)
loadFromXMLStream loads a xml stream into a ReaderWriter class
Definition: xml.cpp:123
config
tue::config::ReaderWriter config
Definition: sdf_gtest.cpp:9
string