PandA-2024.02
|
Some macro used to interface with the XML library. More...
#include "string_manipulation.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/typeof/typeof.hpp>
Go to the source code of this file.
Macros | |
#define | WRITE_XVM(variable, node) (node)->set_attribute(#variable, STR(variable)) |
WRITE XML Value Macro. Insert a value in an XML tree. More... | |
#define | WRITE_XNVM(variable, value, node) (node)->set_attribute(#variable, value) |
WRITE XML Name Value Macro. More... | |
#define | WRITE_XNVM2(name, value, node) (node)->set_attribute(name, value) |
WRITE XML Name Value Macro second version. Insert a value in an XML tree given the name of the attribute. More... | |
#define | WRITE_VALUE(variable, node) WRITE_XNVM(value, STR(variable), (node)->add_child(#variable)) |
WRITE XML Name Value Macro third version. More... | |
#define | LOAD_XVM(variable, node) variable = boost::lexical_cast<BOOST_TYPEOF_TPL(variable)>((node)->get_attribute(#variable)->get_value()) |
LOAD XML Value Macro. Set a variable starting from an XML value. Conversion is performed if needed. More... | |
#define | LOAD_XVFM(variable, node, field) variable = boost::lexical_cast<BOOST_TYPEOF_TPL(variable)>((node)->get_attribute(#field)->get_value()) |
LOAD XML Value for field Macro. Set a variable starting from an XML value. Conversion is performed if needed. More... | |
#define | LOAD_XVM_LD(variable, node) variable = strtold(((node)->get_attribute(#variable)->get_value()).c_str(), nullptr) |
under windows long double numbers are not correctly managed. This hack solves the problem More... | |
#define | LOAD_VALUE(variable, node) |
LOAD XML Value Macro. More... | |
#define | GET_STRING_VALUE(node) STR((node)->get_attribute("value")->get_value()) |
LOAD XML Value Macro. More... | |
#define | GET_NODE_NAME(node) ((node)->get_name()) |
#define | CE_XVM(variable, node) (node)->get_attribute(#variable) |
Check existence XML Value Macro. Check if an XML attribute is present in the XML tree. More... | |
Some macro used to interface with the XML library.
Definition in file xml_helper.hpp.
#define CE_XVM | ( | variable, | |
node | |||
) | (node)->get_attribute(#variable) |
Check existence XML Value Macro. Check if an XML attribute is present in the XML tree.
Definition at line 88 of file xml_helper.hpp.
Referenced by HLS_constraints::HLS_constraints(), mem_dominator_allocation::Initialize(), Parameter::load_xml_configuration_file(), Parameter::load_xml_configuration_file_rec(), DataXmlParser::Parse(), Translator::read_column_formats(), CompilerWrapper::readExternalSymbols(), XilinxBackendFlow::vivado_xparse_utilization(), BackendFlow::xload(), hls::xload(), HLS_constraints::xload(), structural_type_descriptor::xload(), SynthesisTool::xload(), operation::xload(), structural_object::xload(), port_o::xload(), action_o::xload(), constant_o::xload(), module::xload(), generic_device::xload_device_parameters(), AlteraBackendFlow::xparse_utilization(), LatticeBackendFlow::xparse_utilization(), BashBackendFlow::xparse_utilization(), NanoXploreBackendFlow::xparse_utilization(), and XilinxBackendFlow::xparse_xst_utilization().
#define GET_NODE_NAME | ( | node | ) | ((node)->get_name()) |
Definition at line 85 of file xml_helper.hpp.
Referenced by Parameter::load_xml_configuration_file(), and Parameter::load_xml_configuration_file_rec().
#define GET_STRING_VALUE | ( | node | ) | STR((node)->get_attribute("value")->get_value()) |
LOAD XML Value Macro.
Set a variable starting from an XML attribute composed of name and value. Conversion is performed if needed.
Definition at line 83 of file xml_helper.hpp.
Referenced by Parameter::load_xml_configuration_file(), and Parameter::load_xml_configuration_file_rec().
#define LOAD_VALUE | ( | variable, | |
node | |||
) |
LOAD XML Value Macro.
Set a variable starting from an XML attribute composed of name and value. Conversion is performed if needed.
Definition at line 77 of file xml_helper.hpp.
#define LOAD_XVFM | ( | variable, | |
node, | |||
field | |||
) | variable = boost::lexical_cast<BOOST_TYPEOF_TPL(variable)>((node)->get_attribute(#field)->get_value()) |
LOAD XML Value for field Macro. Set a variable starting from an XML value. Conversion is performed if needed.
Definition at line 69 of file xml_helper.hpp.
Referenced by BackendFlow::xload(), structural_type_descriptor::xload(), operation::xload(), port_o::xload(), action_o::xload(), constant_o::xload(), and module::xload().
#define LOAD_XVM | ( | variable, | |
node | |||
) | variable = boost::lexical_cast<BOOST_TYPEOF_TPL(variable)>((node)->get_attribute(#variable)->get_value()) |
LOAD XML Value Macro. Set a variable starting from an XML value. Conversion is performed if needed.
Definition at line 65 of file xml_helper.hpp.
Referenced by Translator::get_normalization(), HLS_constraints::HLS_constraints(), mem_dominator_allocation::Initialize(), BackendFlow::parse_flow(), Translator::read_column_formats(), CompilerWrapper::readExternalSymbols(), XilinxBackendFlow::vivado_xparse_utilization(), BackendFlow::xload(), hls::xload(), HLS_constraints::xload(), structural_type_descriptor::xload(), SynthesisTool::xload(), operation::xload(), structural_object::xload(), port_o::xload(), action_o::xload(), constant_o::xload(), generic_device::xload_device_parameters(), AlteraBackendFlow::xparse_utilization(), LatticeBackendFlow::xparse_utilization(), BashBackendFlow::xparse_utilization(), NanoXploreBackendFlow::xparse_utilization(), and XilinxBackendFlow::xparse_xst_utilization().
#define LOAD_XVM_LD | ( | variable, | |
node | |||
) | variable = strtold(((node)->get_attribute(#variable)->get_value()).c_str(), nullptr) |
under windows long double numbers are not correctly managed. This hack solves the problem
Definition at line 73 of file xml_helper.hpp.
#define WRITE_VALUE | ( | variable, | |
node | |||
) | WRITE_XNVM(value, STR(variable), (node)->add_child(#variable)) |
WRITE XML Name Value Macro third version.
Insert a value in an XML tree given the name of the attribute; it sets the attribute with "value" field. It adds a child to node with variable name
Definition at line 62 of file xml_helper.hpp.
#define WRITE_XNVM | ( | variable, | |
value, | |||
node | |||
) | (node)->set_attribute(#variable, value) |
WRITE XML Name Value Macro.
Insert a value in an XML tree given the name of the attribute. The name is converted in a string.
Definition at line 55 of file xml_helper.hpp.
Referenced by structural_type_descriptor::xwrite(), operation::xwrite(), memory::xwrite(), port_o::xwrite(), action_o::xwrite(), and memory::xwrite2().
#define WRITE_XNVM2 | ( | name, | |
value, | |||
node | |||
) | (node)->set_attribute(name, value) |
WRITE XML Name Value Macro second version. Insert a value in an XML tree given the name of the attribute.
Definition at line 58 of file xml_helper.hpp.
Referenced by Evaluation::Exec(), Parameter::write_xml_configuration_file(), ProfilingInformation::WriteToXml(), generic_device::xwrite(), NP_functionality::xwrite(), structural_object::xwrite(), functional_unit::xwrite(), port_o::xwrite(), constant_o::xwrite(), signal_o::xwrite(), channel_o::xwrite(), and RTLCharacterization::xwrite_characterization().
#define WRITE_XVM | ( | variable, | |
node | |||
) | (node)->set_attribute(#variable, STR(variable)) |
WRITE XML Value Macro. Insert a value in an XML tree.
Definition at line 51 of file xml_helper.hpp.
Referenced by hls::xwrite(), structural_type_descriptor::xwrite(), operation::xwrite(), structural_object::xwrite(), memory::xwrite(), port_o::xwrite(), action_o::xwrite(), constant_o::xwrite(), memory::xwrite2(), HLS_constraints::xwriteBindingConstraints(), HLS_constraints::xwriteFUConstraints(), HLS_constraints::xwriteHLSConstraints(), and HLS_constraints::xwriteSchedulingConstraints().