PandA-2024.02
|
#include <xml_node.hpp>
Public Types | |
using | node_list = std::list< xml_nodeRef > |
type for list of xml nodes More... | |
Public Member Functions | |
xml_node (const std::string &_name) | |
constructor More... | |
virtual | ~xml_node ()=default |
destructor More... | |
virtual void | print (std::ostream &os, bool formatted, simple_indent *pp) const =0 |
Print the class. 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... | |
Static Public Member Functions | |
static void | convert_unescaped (std::string &ioString) |
Convert unescaped characters. More... | |
static void | convert_escaped (std::string &ioString) |
Convert escaped characters. More... | |
Private Attributes | |
std::string | name |
name of the node More... | |
int | line |
The line number in the XML file (not unsigned because lineno function of the lexer returns an int) More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const xml_node &s) |
Friend definition of the << operator. More... | |
std::ostream & | operator<< (std::ostream &os, const xml_node *s) |
Friend definition of the << operator. More... | |
std::ostream & | operator<< (std::ostream &os, const xml_nodeRef &s) |
Friend definition of the << operator. More... | |
Definition at line 70 of file xml_node.hpp.
using xml_node::node_list = std::list<xml_nodeRef> |
type for list of xml nodes
Definition at line 90 of file xml_node.hpp.
|
inlineexplicit |
constructor
Definition at line 83 of file xml_node.hpp.
References ~xml_node().
|
virtualdefault |
|
inlinestatic |
Convert escaped characters.
Return a reference to the converted string. Supported characters are '&', '<', '>', "'", and '"'. Managed even strings with '
' character
ioString | is the converted string. |
Definition at line 197 of file xml_node.hpp.
Referenced by attribute::attribute(), structural_object::xload(), functional_unit_template::xload(), and module::xload().
|
inlinestatic |
Convert unescaped characters.
Return a reference to the converted string. Supported characters are '&', '<', '>', "'", and '"'.
ioString | is the converted string. |
Definition at line 162 of file xml_node.hpp.
Referenced by xml_text_node::print(), xml_comment_node::print(), and xml_attribute::print().
int xml_node::get_line | ( | ) | const |
Discover at what line number this node occurs in the XML file.
Definition at line 101 of file xml_node.cpp.
References line.
Referenced by set_name(), and structural_object::xload().
|
inline |
Get the name of this node.
Definition at line 132 of file xml_node.hpp.
References name.
Referenced by xml_script_node_t::create(), xml_script_node_t::find_type(), xml_comment_node::get_content(), xml_text_node::get_content(), DataXmlParser::Parse(), BackendFlow::parse_flow(), xml_text_node::print(), xml_comment_node::print(), xml_att_decl_node::print(), xml_element::print(), xml_attribute::print(), Translator::read_column_formats(), XilinxBackendFlow::vivado_xparse_utilization(), BackendFlow::xload(), SynthesisTool::xload(), xml_command_t::xml_command_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(), LatticeBackendFlow::xparse_utilization(), AlteraBackendFlow::xparse_utilization(), BashBackendFlow::xparse_utilization(), NanoXploreBackendFlow::xparse_utilization(), and XilinxBackendFlow::xparse_xst_utilization().
|
pure virtual |
Print the class.
os | is the stream. |
formatted | when true the xml is formatted in human readable way. |
pp | is the pretty print helper. |
Implemented in xml_child, xml_attribute, xml_document, xml_element, xml_att_decl_node, xml_comment_node, and xml_text_node.
void xml_node::set_line | ( | int | _line | ) |
Set the line this node occurs in the XML file.
_line | The line number. |
Definition at line 96 of file xml_node.cpp.
References line.
Referenced by set_name().
|
inline |
Set the name of this node.
_name | The new name for the node. |
Definition at line 141 of file xml_node.hpp.
References get_line(), and set_line().
Referenced by BackendFlow::create_xml_scripts(), xml_comment_node::set_content(), and xml_text_node::set_content().
|
friend |
Friend definition of the << operator.
Reference version
Definition at line 103 of file xml_node.hpp.
|
friend |
|
friend |
|
private |
The line number in the XML file (not unsigned because lineno function of the lexer returns an int)
Definition at line 77 of file xml_node.hpp.
Referenced by get_line(), and set_line().
|
private |
name of the node
Definition at line 74 of file xml_node.hpp.
Referenced by get_name(), xml_child::print(), and attribute_sequence::set_attribute().