PandA-2024.02
Public Member Functions | Data Fields
xml_parameter_t Class Reference

Command line parameter. More...

#include <xml_script_command.hpp>

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

Public Member Functions

 xml_parameter_t (const std::string *_name, const std::string *_singleValue, const std::string *_condition, const std::string &_separator, bool _curlyBrackets)
 
 xml_parameter_t (const xml_element *element)
 
 ~xml_parameter_t () override
 
std::string get_xml_name () const override
 Gets the XML element name of this node type. More...
 
xml_nodeRef create_xml_node () const override
 Creates an XML node for polixml data structures. More...
 
void clean () override
 Cleans object attributes. More...
 
bool checkCondition (const DesignParametersRef &dp) const override
 If the node has a compile-time condition, this method evaluates it. More...
 
- Public Member Functions inherited from xml_script_node_t
 xml_script_node_t (xml_script_node_enum_t _type)
 
virtual ~xml_script_node_t ()
 

Data Fields

std::string * name
 
std::string * singleValue
 
std::vector< xml_set_entry_tRefmultiValues
 
std::string * condition
 
std::string separator
 
bool curlyBrackets
 
- Data Fields inherited from xml_script_node_t
xml_script_node_enum_t nodeType
 

Additional Inherited Members

- Static Public Member Functions inherited from xml_script_node_t
static xml_script_node_enum_t find_type (const xml_element *element)
 Finds the type of an XML element. More...
 
static xml_script_node_tcreate (const xml_element *element)
 Creates a script node by parsing the XML element. More...
 
static bool evaluate_condition (const std::string *condition)
 Evaluates a string condition. More...
 
static bool evaluate_condition (const std::string *condition, const DesignParametersRef &dp)
 Evaluates a string condition. More...
 

Detailed Description

Command line parameter.

Just like a variable, it can be either a single value or a set of entries.

Definition at line 199 of file xml_script_command.hpp.

Constructor & Destructor Documentation

◆ xml_parameter_t() [1/2]

xml_parameter_t::xml_parameter_t ( const std::string *  _name,
const std::string *  _singleValue,
const std::string *  _condition,
const std::string &  _separator,
bool  _curlyBrackets 
)

Definition at line 400 of file xml_script_command.cpp.

References condition, curlyBrackets, multiValues, name, separator, and singleValue.

◆ xml_parameter_t() [2/2]

xml_parameter_t::xml_parameter_t ( const xml_element element)
explicit

◆ ~xml_parameter_t()

xml_parameter_t::~xml_parameter_t ( )
override

Definition at line 474 of file xml_script_command.cpp.

References clean().

Here is the call graph for this function:

Member Function Documentation

◆ checkCondition()

bool xml_parameter_t::checkCondition ( const DesignParametersRef dp) const
overridevirtual

If the node has a compile-time condition, this method evaluates it.

Parameters
dpDesign parameters, used to check conditions at compile time.
Returns
The condition evaluation if any, otherwise is true by default.

Reimplemented from xml_script_node_t.

Definition at line 520 of file xml_script_command.cpp.

References condition, and xml_script_node_t::evaluate_condition().

Here is the call graph for this function:

◆ clean()

void xml_parameter_t::clean ( )
overridevirtual

Cleans object attributes.

Implements xml_script_node_t.

Definition at line 479 of file xml_script_command.cpp.

References multiValues, name, and singleValue.

Referenced by ~xml_parameter_t().

Here is the caller graph for this function:

◆ create_xml_node()

xml_nodeRef xml_parameter_t::create_xml_node ( ) const
overridevirtual

Creates an XML node for polixml data structures.

Implements xml_script_node_t.

Definition at line 494 of file xml_script_command.cpp.

References condition, curlyBrackets, get_xml_name(), multiValues, name, and singleValue.

Here is the call graph for this function:

◆ get_xml_name()

std::string xml_parameter_t::get_xml_name ( ) const
overridevirtual

Gets the XML element name of this node type.

Implements xml_script_node_t.

Definition at line 489 of file xml_script_command.cpp.

References TAG_PARAMETER.

Referenced by create_xml_node().

Here is the caller graph for this function:

Field Documentation

◆ condition

std::string* xml_parameter_t::condition

◆ curlyBrackets

bool xml_parameter_t::curlyBrackets

◆ multiValues

std::vector<xml_set_entry_tRef> xml_parameter_t::multiValues

◆ name

std::string* xml_parameter_t::name

◆ separator

std::string xml_parameter_t::separator

◆ singleValue

std::string* xml_parameter_t::singleValue

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

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