47 #ifndef _MIRA_XMLDOMPREPROCESSOR_H_ 48 #define _MIRA_XMLDOMPREPROCESSOR_H_ 54 #include <boost/function.hpp> 69 template<
typename Reflector>
71 r.property(
"value",
value,
"Variable value");
72 r.property(
"annotation",
annotation,
"Source annotation");
82 operator std::string()
const {
return value; }
112 typedef boost::function<std::string (const std::string&)>
Callback;
A STL conform DOM reader/writer for XML.
boost::function< std::string(const std::string &)> Callback
Definition: XMLDomPreprocessor.h:112
bool parseCondition(XMLDom::iterator &node)
A STL conform wrapper for libxml2 to read XML files as DOM.
Definition: XMLDom.h:74
std::string annotation
Definition: XMLDomPreprocessor.h:87
bool parseExistsRequireAll(XMLDom::iterator &node)
void processSpecialVariables(XMLDom::iterator &node)
bool operator!=(const std::string &s) const
Definition: XMLDomPreprocessor.h:78
XMLDomPreprocessor(bool expandOnly=false)
std::string value
Definition: XMLDomPreprocessor.h:86
IncludePathStack mIncludePathStack
Definition: XMLDomPreprocessor.h:152
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
std::unique_ptr< XMLMacroProcessor > mMacroProcessor
Definition: XMLDomPreprocessor.h:150
bool parseConditionsRequireAll(XMLDom::iterator &node)
bool parseExistsRequireAny(XMLDom::iterator &node)
void preprocessAllLowLevel(XMLDom::iterator &iNode)
bool expandMacrosOnly() const
Definition: XMLDomPreprocessor.h:125
std::ostream & operator<<(std::ostream &s, const LibraryVersion &version)
XMLDom::iterator parseInclude(XMLDom::iterator &ioNode)
bool operator==(const char *s) const
Definition: XMLDomPreprocessor.h:79
std::list< Path > IncludePathStack
Definition: XMLDomPreprocessor.h:113
void preprocessXML(XMLDom &ioXml, XMLVariablesMap &ioVariables)
Shortcut for processing a XML document without creating a XMLDomPreprocessor yourself.
std::string resolveContent(std::string content)
std::map< std::string, XMLVariableValue > XMLVariablesMap
Definition: XMLDomPreprocessor.h:92
friend std::ostream & operator<<(std::ostream &s, const XMLVariableValue &x)
XMLVariablesMap variables
Definition: XMLDomPreprocessor.h:121
Iterator for iterating over xml nodes that have the same parent (sibligs)
Definition: XMLDom.h:850
bool operator==(const std::string &s) const
Definition: XMLDomPreprocessor.h:77
bool parseExists(XMLDom::iterator &node)
void reflect(Reflector &r)
Definition: XMLDomPreprocessor.h:70
void registerXMLVariableCallback(const std::string &pattern, Callback &&callback)
std::string resolveXMLVariables(const std::string &pattern, const std::string &var)
bool operator!=(const char *s) const
Definition: XMLDomPreprocessor.h:80
bool mExpandMacrosOnly
Definition: XMLDomPreprocessor.h:154
Preprocesses XML documents and resolves all special tags like , <if>, <warning> and so on...
Definition: XMLDomPreprocessor.h:109
Variables defined in xml documents.
Definition: XMLDomPreprocessor.h:64
Definition: XMLMacroProcessor.h:62
bool parseConditionsRequireAny(XMLDom::iterator &node)
XMLMacroProcessor & getMacroProcessor()
Definition: XMLDomPreprocessor.h:123
std::map< std::string, Callback > mCallbacks
Definition: XMLDomPreprocessor.h:146
void preprocessAll(XMLDom::iterator &iNode)
void preprocessXML(XMLDom &ioXml)
bool mAddedInfoToException
Definition: XMLDomPreprocessor.h:148
XMLVariableValue(const std::string &v="", const std::string &a="")
Definition: XMLDomPreprocessor.h:66
XMLVariableValue & operator=(const char *s)
Definition: XMLDomPreprocessor.h:75