Go to the documentation of this file.
45 m_confsDoc = confsDoc;
65 if(m_fileName.length() == 0)
67 return m_confsDoc->
save(m_fileName);
86 void Config::setList(
const std::string& key,
const std::vector<std::string>& list)
94 for(
const std::string& value : list)
108 return child->
value();
115 std::vector<std::string> list;
119 list.push_back(subchild->value());
147 return m_confsDoc->
get(key);
152 return !m_fileName.empty() && m_confsDoc;
void setTag(const std::string &tag)
bool load(const std::string &file)
static OTMLDocumentPtr create()
Create a new OTML document for filling it with nodes.
void setList(const std::string &key, const std::vector< std::string > &list)
static OTMLDocumentPtr parse(const std::string &fileName)
Parse OTML from a file.
bool save(const std::string &fileName)
Save this document to a file.
bool removeChild(const OTMLNodePtr &oldChild)
void error(const std::string &what)
void setNode(const std::string &key, const OTMLNodePtr &node)
void addChild(const OTMLNodePtr &newChild)
std::vector< std::string > getList(const std::string &key)
ResourceManager g_resources
bool fileExists(const std::string &fileName)
void setUnique(bool unique)
void mergeNode(const std::string &key, const OTMLNodePtr &node)
OTMLNodePtr get(const std::string &childTag)
OTMLNodePtr getNode(const std::string &key)
std::string getFileName()
virtual const char * what() const
bool exists(const std::string &key)
bool hasChildAt(const std::string &childTag)
void setValue(const std::string &key, const std::string &value)
void remove(const std::string &key)
std::string getValue(const std::string &key)
static OTMLNodePtr create(std::string tag="", bool unique=false)