37 #ifndef _uhal_utilities_xml_hpp_ 38 #define _uhal_utilities_xml_hpp_ 45 #include <boost/filesystem/path.hpp> 54 struct xml_parse_result;
63 UHAL_DEFINE_EXCEPTION_CLASS ( StringNumberWillNotFitInto32BitNumber ,
"Exception class to handle the case where the string will not fit into a 32-bit number." )
76 void PugiXMLParseResultPrettifier (
const pugi::xml_parse_result& aLoadResult ,
const boost::filesystem::path& aPath ,
const std::vector<uint8_t>& aFile );
86 template <
bool DebugInfo >
87 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName , std::string& aTarget );
97 template <
bool DebugInfo >
98 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName ,
const char* aTarget );
108 template <
bool DebugInfo >
109 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName , int32_t& aTarget );
119 template <
bool DebugInfo >
120 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName , uint32_t& aTarget );
130 template <
bool DebugInfo >
131 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName ,
double& aTarget );
141 template <
bool DebugInfo >
142 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName ,
float& aTarget );
152 template <
bool DebugInfo >
153 bool GetXMLattribute (
const pugi::xml_node& aNode ,
const char* aAttrName ,
bool& aTarget );
bool GetXMLattribute(const pugi::xml_node &aNode, const char *aAttrName, bool &aTarget)
Helper function to retrieve a named attribute from a PugiXML node and cast it to the correct type...
#define UHAL_DEFINE_EXCEPTION_CLASS(ClassName, ClassDescription)
void PugiXMLParseResultPrettifier(const pugi::xml_parse_result &aLoadResult, const boost::filesystem::path &aPath, const std::vector< uint8_t > &aFile)
Helper function to make debugging failures when parsing XML files easier.