PandA-2024.02
Public Types | Public Member Functions | Private Attributes
attribute_sequence Struct Reference

#include <xml_attribute.hpp>

Inheritance diagram for attribute_sequence:
Inheritance graph
[legend]

Public Types

using attribute_list = std::list< xml_attribute * >
 

Public Member Functions

void print_attributes (std::ostream &os) const
 Print the class. More...
 
xml_attributeset_attribute (const std::string &name, const std::string &value)
 Set the value of the attribute with this name, and optionally with this namespace. More...
 
xml_attributeget_attribute (const std::string &name) const
 Obtain the attribute with this name. More...
 
attribute_list get_attributes ()
 Remove the attribute with this name. More...
 
const attribute_listget_attributes () const
 Obtain the list of attributes for this element. More...
 
bool has_attributes () const
 

Private Attributes

attribute_list a_list
 
std::map< std::string, xml_attributeRef > a_map
 

Detailed Description

Definition at line 114 of file xml_attribute.hpp.

Member Typedef Documentation

◆ attribute_list

Definition at line 116 of file xml_attribute.hpp.

Member Function Documentation

◆ get_attribute()

xml_attribute* attribute_sequence::get_attribute ( const std::string &  name) const
inline

Obtain the attribute with this name.

Parameters
nameThe name of the attribute searched.
Returns
the searched attribute, or 0 if no suitable attribute was found.

Definition at line 161 of file xml_attribute.hpp.

Referenced by DataXmlParser::Parse(), CompilerWrapper::ReadXml(), attribute::xload(), xml_command_t::xml_command_t(), xml_foreach_t::xml_foreach_t(), xml_parameter_t::xml_parameter_t(), xml_set_entry_t::xml_set_entry_t(), xml_set_variable_t::xml_set_variable_t(), and xml_shell_t::xml_shell_t().

Here is the caller graph for this function:

◆ get_attributes() [1/2]

attribute_list attribute_sequence::get_attributes ( )
inline

Remove the attribute with this name.

Parameters
nameThe name of the attribute to be removed Obtain the list of attributes for this element.
Returns
The list of attributes.

Definition at line 188 of file xml_attribute.hpp.

Referenced by NP_functionality::xload().

Here is the caller graph for this function:

◆ get_attributes() [2/2]

const attribute_list& attribute_sequence::get_attributes ( ) const
inline

Obtain the list of attributes for this element.

Constant version.

Returns
The list of attributes.

Definition at line 196 of file xml_attribute.hpp.

◆ has_attributes()

bool attribute_sequence::has_attributes ( ) const
inline
Returns
Whether this node has attributes, or is empty.

Definition at line 204 of file xml_attribute.hpp.

Referenced by xml_att_decl_node::print(), and xml_element::print().

Here is the caller graph for this function:

◆ print_attributes()

void attribute_sequence::print_attributes ( std::ostream &  os) const
inline

Print the class.

Parameters
osis the stream.

Definition at line 121 of file xml_attribute.hpp.

Referenced by xml_att_decl_node::print(), and xml_element::print().

Here is the caller graph for this function:

◆ set_attribute()

xml_attribute* attribute_sequence::set_attribute ( const std::string &  name,
const std::string &  value 
)
inline

Set the value of the attribute with this name, and optionally with this namespace.

A matching attribute will be added if no matching attribute already exists.

Parameters
nameThe name of the attribute whose value will change.
valueThe new value for the attribute
Returns
The attribute that was changed or created.

Definition at line 137 of file xml_attribute.hpp.

References xml_node::name, xml_attribute::set_value(), and xml_attribute::xml_attribute().

Referenced by CompilerWrapper::WriteXml(), and attribute::xwrite().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ a_list

attribute_list attribute_sequence::a_list
private

Definition at line 210 of file xml_attribute.hpp.

◆ a_map

std::map<std::string, xml_attributeRef> attribute_sequence::a_map
private

Definition at line 211 of file xml_attribute.hpp.


The documentation for this struct was generated from the following file:

Generated on Mon Feb 12 2024 13:03:44 for PandA-2024.02 by doxygen 1.8.13