PandA-2024.02
Public Member Functions | Private Attributes
xml_attribute Class Reference

#include <xml_attribute.hpp>

Inheritance diagram for xml_attribute:
Inheritance graph
[legend]
Collaboration diagram for xml_attribute:
Collaboration graph
[legend]

Public Member Functions

 xml_attribute (const std::string &_name)
 constructor More...
 
void print (std::ostream &os, bool, simple_indent *) const override
 Print the class. More...
 
std::string get_value () const
 Get the value of this attribute. More...
 
void set_value (const std::string &value)
 Set the value of this attribute. 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

std::string at_value
 

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...
 

Detailed Description

Definition at line 67 of file xml_attribute.hpp.

Constructor & Destructor Documentation

◆ xml_attribute()

xml_attribute::xml_attribute ( const std::string &  _name)
inlineexplicit

constructor

Definition at line 73 of file xml_attribute.hpp.

Referenced by attribute_sequence::set_attribute().

Here is the caller graph for this function:

Member Function Documentation

◆ get_value()

std::string xml_attribute::get_value ( ) const
inline

◆ print()

void xml_attribute::print ( std::ostream &  os,
bool  ,
simple_indent  
) const
inlineoverridevirtual

Print the class.

Parameters
osis the stream.
formattedwhen true the xml is formatted in human readable way.
ppis the pretty print helper.

replace '
' character with the escaped version "\\n"

Implements xml_node.

Definition at line 83 of file xml_attribute.hpp.

References xml_node::convert_unescaped(), and xml_node::get_name().

Here is the call graph for this function:

◆ set_value()

void xml_attribute::set_value ( const std::string &  value)
inline

Set the value of this attribute.

Parameters
Theattribute's value.

Definition at line 108 of file xml_attribute.hpp.

References symmetry::value.

Referenced by attribute_sequence::set_attribute().

Here is the caller graph for this function:

Field Documentation

◆ at_value

std::string xml_attribute::at_value
private

Definition at line 69 of file xml_attribute.hpp.

Referenced by get_value().


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

Generated on Mon Feb 12 2024 13:04:11 for PandA-2024.02 by doxygen 1.8.13