PandA-2024.02
Public Member Functions
xml_comment_node Class Reference

#include <xml_comment_node.hpp>

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

Public Member Functions

 xml_comment_node (const std::string &comment)
 constructor More...
 
void print (std::ostream &os, bool formatted, simple_indent *pp) const override
 Print the class. More...
 
std::string get_content () const
 Get the text of this content node. More...
 
void set_content (const std::string &content)
 Set the text of this content node. 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...
 

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 52 of file xml_comment_node.hpp.

Constructor & Destructor Documentation

◆ xml_comment_node()

xml_comment_node::xml_comment_node ( const std::string &  comment)
inlineexplicit

constructor

Definition at line 56 of file xml_comment_node.hpp.

Member Function Documentation

◆ get_content()

std::string xml_comment_node::get_content ( ) const
inline

Get the text of this content node.

Returns
The text. Note that the 5 predefined entities (&, ", <, &qt, ') are always resolved, so this content will show their human-readable equivalents.

Definition at line 81 of file xml_comment_node.hpp.

References xml_node::get_name().

Here is the call graph for this function:

◆ print()

void xml_comment_node::print ( std::ostream &  os,
bool  formatted,
simple_indent pp 
) const
inlineoverridevirtual

Print the class.

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

Implements xml_node.

Definition at line 66 of file xml_comment_node.hpp.

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

Here is the call graph for this function:

◆ set_content()

void xml_comment_node::set_content ( const std::string &  content)
inline

Set the text of this content node.

Parameters
contentThe text. This must be unescaped, meaning that the predefined entities will be created for you where necessary. See get_content().

Definition at line 90 of file xml_comment_node.hpp.

References xml_node::set_name().

Here is the call graph for this function:

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