PandA-2024.02
|
#include <xml_node.hpp>
Public Member Functions | |
xml_child (const std::string &_name) | |
constructor More... | |
void | print (std::ostream &os, bool formatted, simple_indent *pp) const override |
Print the class. More... | |
xml_element * | add_child_element (const std::string &name) |
Add a child element to this node. More... | |
xml_element * | add_child_element (const xml_nodeRef &node) |
Add a child element to this node starting from a given node. More... | |
xml_text_node * | add_child_text (const std::string &content) |
Append a new text node. More... | |
xml_text_node * | get_child_text () |
Get the first child text content node. More... | |
const xml_text_node * | get_child_text () const |
Get the first child text content node. More... | |
xml_comment_node * | add_child_comment (const std::string &content) |
Append a new comment node. More... | |
xml_att_decl_node * | add_child_attribute_declaration (const std::string &name) |
Append a new attribute declaration node. More... | |
void | remove_child (xml_node *el) |
Remove the child node. More... | |
node_list const & | get_children () |
Obtain the list of child nodes. More... | |
const node_list & | get_children () const |
Obtain the list of child nodes. More... | |
bool | has_child () const |
const CustomSet< xml_nodeRef > | CGetDescendants (const std::string &path) const |
Return the set of descendants with a specific path. More... | |
Public Member Functions inherited from xml_node | |
xml_node (const std::string &_name) | |
constructor More... | |
virtual | ~xml_node ()=default |
destructor More... | |
std::string | get_name () const |
Get the name of this node. More... | |
void | set_name (const std::string &_name) |
Set the name of this node. More... | |
int | get_line () const |
Discover at what line number this node occurs in the XML file. More... | |
void | set_line (int _line) |
Set the line this node occurs in the XML file. More... | |
Private Attributes | |
node_list | child_list |
xml_text_node * | first_text |
Additional Inherited Members | |
Public Types inherited from xml_node | |
using | node_list = std::list< xml_nodeRef > |
type for list of xml nodes More... | |
Static Public Member Functions inherited from xml_node | |
static void | convert_unescaped (std::string &ioString) |
Convert unescaped characters. More... | |
static void | convert_escaped (std::string &ioString) |
Convert escaped characters. More... | |
Definition at line 227 of file xml_node.hpp.
|
inlineexplicit |
constructor
Definition at line 233 of file xml_node.hpp.
xml_att_decl_node * xml_child::add_child_attribute_declaration | ( | const std::string & | name | ) |
Append a new attribute declaration node.
name | The name of the declaration. |
Definition at line 88 of file xml_node.cpp.
References child_list.
xml_comment_node * xml_child::add_child_comment | ( | const std::string & | content | ) |
Append a new comment node.
content | The text. This should be unescaped - see xml_comment_node::set_content(). |
Definition at line 80 of file xml_node.cpp.
References child_list.
xml_element * xml_child::add_child_element | ( | const std::string & | _name | ) |
Add a child element to this node.
STL include.
name | The new node name |
utility include
Definition at line 54 of file xml_node.cpp.
References child_list.
Referenced by xml_document::create_root_node(), xml_ite_block_t::create_xml_node(), BackendFlow::create_xml_scripts(), WriteTechnology::Exec(), Evaluation::Exec(), TestVectorParser::ParseXMLFile(), Parameter::write_xml_configuration_file(), ProfilingInformation::WriteToXml(), CompilerWrapper::WriteXml(), generic_device::xwrite(), attribute::xwrite(), NP_functionality::xwrite(), hls::xwrite(), library_manager::xwrite(), HLS_constraints::xwrite(), structural_type_descriptor::xwrite(), structural_manager::xwrite(), operation::xwrite(), structural_object::xwrite(), functional_unit::xwrite(), functional_unit_template::xwrite(), memory::xwrite(), port_o::xwrite(), event_o::xwrite(), data_o::xwrite(), action_o::xwrite(), constant_o::xwrite(), signal_o::xwrite(), module::xwrite(), component_o::xwrite(), channel_o::xwrite(), bus_connection_o::xwrite(), memory::xwrite2(), RTLCharacterization::xwrite_characterization(), HLS_constraints::xwriteBindingConstraints(), HLS_constraints::xwriteFUConstraints(), and HLS_constraints::xwriteSchedulingConstraints().
xml_element * xml_child::add_child_element | ( | const xml_nodeRef & | node | ) |
Add a child element to this node starting from a given node.
node | is the given data-structure to be added |
Definition at line 62 of file xml_node.cpp.
References child_list.
xml_text_node * xml_child::add_child_text | ( | const std::string & | content | ) |
Append a new text node.
content | The text. This should be unescaped - see ContentNode::set_content(). |
Definition at line 68 of file xml_node.cpp.
References child_list, and first_text.
Referenced by attribute::xwrite(), library_manager::xwrite(), structural_object::xwrite(), functional_unit::xwrite(), functional_unit_template::xwrite(), port_o::xwrite(), module::xwrite(), and RTLCharacterization::xwrite_characterization().
const CustomSet< xml_nodeRef > xml_child::CGetDescendants | ( | const std::string & | path | ) | const |
Return the set of descendants with a specific path.
path | is the / separated list of the tags to be crossed from the current node to the ancestor |
Definition at line 106 of file xml_node.cpp.
References get_children(), level, and SplitString().
|
inline |
Get the first child text content node.
This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly.
Definition at line 272 of file xml_node.hpp.
Referenced by xml_element::print(), and attribute::xload().
|
inline |
Get the first child text content node.
This is a convenience method, meant as an alternative to iterating over all the child nodes to find the first suitable node then and getting the text directly.
Definition at line 282 of file xml_node.hpp.
|
inline |
Obtain the list of child nodes.
Definition at line 310 of file xml_node.hpp.
Referenced by HLS_constraints::add_builtin_constraints(), CGetDescendants(), HLS_device::factory(), get_connections(), Translator::get_normalization(), HLS_constraints::HLS_constraints(), Parameter::load_xml_configuration_file(), Parameter::load_xml_configuration_file_rec(), DataXmlParser::Parse(), BackendFlow::parse_flow(), TestVectorParser::ParseXMLFile(), xml_element::print(), Translator::read_column_formats(), HLS_constraints::read_HLS_constraints_File(), CompilerWrapper::readExternalSymbols(), CompilerWrapper::ReadXml(), XilinxBackendFlow::vivado_xparse_utilization(), Translator::write_to_latex(), generic_device::xload(), attribute::xload(), BackendFlow::xload(), hls::xload(), library_manager::xload(), HLS_constraints::xload(), SynthesisTool::xload(), technology_manager::xload(), structural_manager::xload(), operation::xload(), structural_object::xload(), functional_unit::xload(), functional_unit_template::xload(), port_o::xload(), action_o::xload(), signal_o::xload(), module::xload(), channel_o::xload(), generic_device::xload_device_parameters(), SynthesisTool::xload_scripts(), xml_command_t::xml_command_t(), xml_foreach_t::xml_foreach_t(), xml_ite_block_t::xml_ite_block_t(), xml_parameter_t::xml_parameter_t(), xml_set_variable_t::xml_set_variable_t(), xml_shell_t::xml_shell_t(), XilinxBackendFlow::xparse_timing(), AlteraBackendFlow::xparse_utilization(), LatticeBackendFlow::xparse_utilization(), BashBackendFlow::xparse_utilization(), NanoXploreBackendFlow::xparse_utilization(), and XilinxBackendFlow::xparse_xst_utilization().
|
inline |
Obtain the list of child nodes.
Definition at line 318 of file xml_node.hpp.
|
inline |
Definition at line 326 of file xml_node.hpp.
Referenced by xml_element::print().
|
inlineoverridevirtual |
Print the class.
Implements xml_node.
Definition at line 240 of file xml_node.hpp.
References xml_node::name.
Referenced by xml_element::print(), and xml_document::print().
|
inline |
Remove the child node.
el | The child node to remove. This Node will be deleted and therefore unusable after calling this method. |
Definition at line 302 of file xml_node.hpp.
|
private |
Definition at line 339 of file xml_node.hpp.
Referenced by add_child_attribute_declaration(), add_child_comment(), add_child_element(), and add_child_text().
|
private |
Definition at line 340 of file xml_node.hpp.
Referenced by add_child_text().