64 : debug_level(Param->get_class_debug_level(
GET_CLASS(*this)))
75 for(
const auto& file_name : file_names)
86 if(!
CE_XVM(benchmark_name, root))
88 THROW_ERROR(
"Name of benchmark not found in file " + file_name);
94 xml_node::node_list::const_iterator child, child_end = list.end();
95 for(child = list.begin(); child != child_end; ++child)
97 const auto* child_element = GetPointer<const xml_element>(*child);
102 const std::string child_name = child_element->get_name();
110 catch(
const char* msg)
112 THROW_ERROR(
"Error during parsing of data xml file: " + std::string(msg));
114 catch(
const std::string& msg)
116 THROW_ERROR(
"Error during parsing of data xml file: " + msg);
118 catch(
const std::exception& ex)
120 THROW_ERROR(
"Error during parsing of data xml file: " + std::string(ex.what()));
124 THROW_ERROR(
"Error during parsing of data xml file");
std::string get_value() const
Get the value of this attribute.
xml nodes used in file specifying latex table format
xml nodes for generic data xml files
#define GET_CLASS(obj)
Macro returning the actual type of an object.
CustomOrderedMap< T, U > CustomMap
exceptions managed by PandA
#define CE_XVM(variable, node)
Check existence XML Value Macro. Check if an XML attribute is present in the XML tree.
void Parse(const CustomSet< std::string > &file_names, std::map< std::string, CustomMap< std::string, std::string >> &output) const
Parse xml file.
~DataXmlParser()
Destructor.
volatile int output[DIM_Y][DIM_X]
Auxiliary methods for manipulating string.
#define STR_XML_data_xml_benchmark_name
The benchmark name attribute.
#define STR_XML_experimental_setup_root
The root node.
unsigned map[NUM_VERTICES]
std::string get_name() const
Get the name of this node.
utility function used to read files.
xml_attribute * get_attribute(const std::string &name) const
Obtain the attribute with this name.
void Exec()
Parse an XML document from a file.
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
#define STR_XML_latex_table_root
The root node.
std::string GetPath(std::filesystem::path path)
xml nodes used in file specifying experimental setup
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
xml_documentRef get_document()
Obtain the parsed document.
DataXmlParser(const ParameterConstRef ¶meters)
Constructor.
this class is used to manage the command-line or XML options.
#define STR_XML_data_xml_value
The attribute containing the value of a node.
Some macro used to interface with the XML library.
node_list const & get_children()
Obtain the list of child nodes.
Parse xml file containing generic data.