KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
List of all members
Kratos::XmlExpressionElement Class Reference

#include <xml_expression_element.h>

Collaboration diagram for Kratos::XmlExpressionElement:

Public Member Functions

Life cycle
 XmlExpressionElement (const std::string &rTagName)
 Constructor. More...
 
 XmlExpressionElement (const std::string &rDataName, const std::vector< Expression::ConstPointer > &rExpressions)
 Constructor. More...
 
Public operations
const std::string GetTagName () const
 Get the tag name of the XML element. More...
 
void AddAttribute (const std::string &rName, const std::string &rValue)
 Add an attribute to the XML element. More...
 
const std::vector< std::pair< std::string, std::string > > & GetAttributes () const
 Get the attributes of the XML element. More...
 
void ClearAttributes ()
 Clear the attributes of the XML element. More...
 
void AddElement (const XmlExpressionElement::Pointer pXmlElement)
 Add a sub-element to the XML element. More...
 
std::vector< XmlExpressionElement::Pointer > GetElements (const std::string &rTagName) const
 Get sub-elements with a specific tag name. More...
 
const std::vector< XmlExpressionElement::Pointer > & GetElements () const
 Get all sub-elements of the XML element. More...
 
void ClearElements ()
 Clear all sub-elements of the XML element. More...
 
const std::vector< Expression::ConstPointerGetExpressions () const
 

Type definitions

using IndexType = std::size_t
 
 KRATOS_CLASS_POINTER_DEFINITION (XmlExpressionElement)
 

Member Typedef Documentation

◆ IndexType

Constructor & Destructor Documentation

◆ XmlExpressionElement() [1/2]

Kratos::XmlExpressionElement::XmlExpressionElement ( const std::string &  rTagName)

Constructor.

Parameters
rTagNameThe tag name of the XML element.

◆ XmlExpressionElement() [2/2]

Kratos::XmlExpressionElement::XmlExpressionElement ( const std::string &  rDataName,
const std::vector< Expression::ConstPointer > &  rExpressions 
)

Constructor.

Parameters
rDataNameThe name of the data element.
rExpressionsThe expressions to write as data.

Member Function Documentation

◆ AddAttribute()

void Kratos::XmlExpressionElement::AddAttribute ( const std::string &  rName,
const std::string &  rValue 
)

Add an attribute to the XML element.

Parameters
rNameThe name of the attribute.
rValueThe value of the attribute.

◆ AddElement()

void Kratos::XmlExpressionElement::AddElement ( const XmlExpressionElement::Pointer  pXmlElement)

Add a sub-element to the XML element.

Parameters
pXmlElementThe sub-element to add.

◆ ClearAttributes()

void Kratos::XmlExpressionElement::ClearAttributes ( )

Clear the attributes of the XML element.

◆ ClearElements()

void Kratos::XmlExpressionElement::ClearElements ( )

Clear all sub-elements of the XML element.

◆ GetAttributes()

const std::vector< std::pair< std::string, std::string > > & Kratos::XmlExpressionElement::GetAttributes ( ) const

Get the attributes of the XML element.

Returns
The attributes.

◆ GetElements() [1/2]

const std::vector< XmlExpressionElement::Pointer > & Kratos::XmlExpressionElement::GetElements ( ) const

Get all sub-elements of the XML element.

Returns
The vector of sub-elements.

◆ GetElements() [2/2]

std::vector< XmlExpressionElement::Pointer > Kratos::XmlExpressionElement::GetElements ( const std::string &  rTagName) const

Get sub-elements with a specific tag name.

Parameters
rTagNameThe tag name of the sub-elements.
Returns
The vector of sub-elements.

◆ GetExpressions()

const std::vector< Expression::ConstPointer > Kratos::XmlExpressionElement::GetExpressions ( ) const

◆ GetTagName()

const std::string Kratos::XmlExpressionElement::GetTagName ( ) const

Get the tag name of the XML element.

Returns
The tag name.

◆ KRATOS_CLASS_POINTER_DEFINITION()

Kratos::XmlExpressionElement::KRATOS_CLASS_POINTER_DEFINITION ( XmlExpressionElement  )

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