MIRA
|
Preprocesses XML documents and resolves all special tags like , <if>, <warning> and so on. More...
#include <xml/XMLDomPreprocessor.h>
Public Types | |
typedef boost::function< std::string(const std::string &)> | Callback |
typedef std::list< Path > | IncludePathStack |
Public Member Functions | |
XMLDomPreprocessor () | |
XMLDomPreprocessor (const XMLVariablesMap &iVariables) | |
void | preprocessXML (XMLDom &ioXml) |
void | registerXMLVariableCallback (const std::string &pattern, Callback &&callback) |
Public Attributes | |
XMLVariablesMap | variables |
Protected Member Functions | |
std::string | resolveXMLVariables (const std::string &pattern, const std::string &var) |
std::string | resolveContent (std::string content) |
void | preprocessAllLowLevel (XMLDom::iterator &iNode, IncludePathStack &ioPathStack) |
void | preprocessAll (XMLDom::iterator &iNode, IncludePathStack &ioPathStack) |
void | processSpecialVariables (XMLDom::iterator &node) |
bool | parseCondition (XMLDom::iterator &node) |
bool | parseConditionsRequireAll (XMLDom::iterator &node) |
bool | parseConditionsRequireAny (XMLDom::iterator &node) |
bool | parseExists (XMLDom::iterator &node) |
bool | parseExistsRequireAll (XMLDom::iterator &node) |
bool | parseExistsRequireAny (XMLDom::iterator &node) |
XMLDom::iterator | parseInclude (XMLDom::iterator &ioNode, IncludePathStack &ioPathStack) |
Protected Attributes | |
std::map< std::string, Callback > | mCallbacks |
bool | mAddedInfoToException |
Preprocesses XML documents and resolves all special tags like , <if>, <warning> and so on.
It also parses variable declarations via the tag. See help about XML config files. The member variables contains a key value variables map that will be altered if an <define> or tag is found and the variable name is not already in the map. It also processes special xml variables like find, findpkg or env. Additionally the user can add callbacks for user defined patterns that are called whenever the pattern is found anywhere in the document.
typedef boost::function<std::string (const std::string&)> Callback |
typedef std::list<Path> IncludePathStack |
|
inline |
|
inline |
void preprocessXML | ( | XMLDom & | ioXml | ) |
void registerXMLVariableCallback | ( | const std::string & | pattern, |
Callback && | callback | ||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
XMLVariablesMap variables |
|
protected |
|
protected |