preCICE v3.2.0
Loading...
Searching...
No Matches
precice::xml::XMLAttribute< ATTRIBUTE_T > Class Template Reference

#include <XMLAttribute.hpp>

Collaboration diagram for precice::xml::XMLAttribute< ATTRIBUTE_T >:
[legend]

Public Member Functions

 XMLAttribute ()=delete
 XMLAttribute (std::string name)
 XMLAttribute (std::string name, ATTRIBUTE_T defaultValue)
 XMLAttribute (const XMLAttribute< ATTRIBUTE_T > &other)=default
XMLAttributeoperator= (const XMLAttribute< ATTRIBUTE_T > &other)=default
XMLAttributesetDocumentation (std::string_view documentation)
 Sets a documentation string for the attribute.
const std::stringgetUserDocumentation () const
XMLAttributesetOptions (std::vector< ATTRIBUTE_T > options)
template<class T>
XMLAttributesetOptions (std::initializer_list< T > &&options)
const std::vector< ATTRIBUTE_T > & getOptions () const
XMLAttributesetDefaultValue (const ATTRIBUTE_T &defaultValue)
const ATTRIBUTE_T & getDefaultValue () const
bool hasDefaultValue () const
bool hasValidation () const
void readValue (const std::map< std::string, std::string > &aAttributes)
const std::stringgetName () const
const ATTRIBUTE_T & getValue () const
void setRead (bool read)
bool isRead () const

Private Member Functions

template<typename VALUE_T>
std::enable_if< std::is_same< VALUE_T, ATTRIBUTE_T >::value &&notstd::is_same< VALUE_T, Eigen::VectorXd >::value, void >::type set (ATTRIBUTE_T &toSet, const VALUE_T &setter)
 Sets non Eigen::VectorXd type values.
template<typename VALUE_T>
std::enable_if< std::is_same< VALUE_T, ATTRIBUTE_T >::value &&std::is_same< VALUE_T, Eigen::VectorXd >::value, void >::type set (ATTRIBUTE_T &toSet, const VALUE_T &setter)
 Sets Eigen::VectorXd type values by clearing and copy.

Private Attributes

logging::Logger _log {"xml::XMLAttribute"}
std::string _name
std::string _doc
bool _read = false
ATTRIBUTE_T _value {}
bool _hasDefaultValue = false
ATTRIBUTE_T _defaultValue {}
bool _hasValidation = false
std::vector< ATTRIBUTE_T > _options

Detailed Description

template<typename ATTRIBUTE_T>
class precice::xml::XMLAttribute< ATTRIBUTE_T >

Definition at line 20 of file XMLAttribute.hpp.

Constructor & Destructor Documentation

◆ XMLAttribute() [1/4]

template<typename ATTRIBUTE_T>
precice::xml::XMLAttribute< ATTRIBUTE_T >::XMLAttribute ( )
delete

◆ XMLAttribute() [2/4]

template<typename ATTRIBUTE_T>
precice::xml::XMLAttribute< ATTRIBUTE_T >::XMLAttribute ( std::string name)
inlineexplicit

Definition at line 26 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ XMLAttribute() [3/4]

template<typename ATTRIBUTE_T>
precice::xml::XMLAttribute< ATTRIBUTE_T >::XMLAttribute ( std::string name,
ATTRIBUTE_T defaultValue )
inline

Definition at line 32 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ XMLAttribute() [4/4]

template<typename ATTRIBUTE_T>
precice::xml::XMLAttribute< ATTRIBUTE_T >::XMLAttribute ( const XMLAttribute< ATTRIBUTE_T > & other)
default
Here is the call graph for this function:

Member Function Documentation

◆ getDefaultValue()

template<typename ATTRIBUTE_T>
const ATTRIBUTE_T & precice::xml::XMLAttribute< ATTRIBUTE_T >::getDefaultValue ( ) const
inline

Definition at line 66 of file XMLAttribute.hpp.

◆ getName()

template<typename ATTRIBUTE_T>
const std::string & precice::xml::XMLAttribute< ATTRIBUTE_T >::getName ( ) const
inline

Definition at line 83 of file XMLAttribute.hpp.

◆ getOptions()

template<typename ATTRIBUTE_T>
const std::vector< ATTRIBUTE_T > & precice::xml::XMLAttribute< ATTRIBUTE_T >::getOptions ( ) const
inline

Definition at line 59 of file XMLAttribute.hpp.

◆ getUserDocumentation()

template<typename ATTRIBUTE_T>
const std::string & precice::xml::XMLAttribute< ATTRIBUTE_T >::getUserDocumentation ( ) const
inline

Definition at line 45 of file XMLAttribute.hpp.

◆ getValue()

template<typename ATTRIBUTE_T>
const ATTRIBUTE_T & precice::xml::XMLAttribute< ATTRIBUTE_T >::getValue ( ) const
inline

Definition at line 88 of file XMLAttribute.hpp.

◆ hasDefaultValue()

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::hasDefaultValue ( ) const
inline

Definition at line 71 of file XMLAttribute.hpp.

◆ hasValidation()

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::hasValidation ( ) const
inline

Definition at line 76 of file XMLAttribute.hpp.

◆ isRead()

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::isRead ( ) const
inline

Definition at line 98 of file XMLAttribute.hpp.

◆ operator=()

template<typename ATTRIBUTE_T>
XMLAttribute & precice::xml::XMLAttribute< ATTRIBUTE_T >::operator= ( const XMLAttribute< ATTRIBUTE_T > & other)
default
Here is the call graph for this function:

◆ readValue()

template<typename ATTRIBUTE_T>
void precice::xml::XMLAttribute< ATTRIBUTE_T >::readValue ( const std::map< std::string, std::string > & aAttributes)

Definition at line 161 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ set() [1/2]

template<typename ATTRIBUTE_T>
template<typename VALUE_T>
std::enable_if< std::is_same< VALUE_T, ATTRIBUTE_T >::value &&std::is_same< VALUE_T, Eigen::VectorXd >::value, void >::type precice::xml::XMLAttribute< ATTRIBUTE_T >::set ( ATTRIBUTE_T & toSet,
const VALUE_T & setter )
private

Sets non Eigen::VectorXd type values.

Definition at line 201 of file XMLAttribute.hpp.

◆ set() [2/2]

template<typename ATTRIBUTE_T>
template<typename VALUE_T>
std::enable_if< std::is_same< VALUE_T, ATTRIBUTE_T >::value &&std::is_same< VALUE_T, Eigen::VectorXd >::value, void >::type precice::xml::XMLAttribute< ATTRIBUTE_T >::set ( ATTRIBUTE_T & toSet,
const VALUE_T & setter )
private

Sets Eigen::VectorXd type values by clearing and copy.

◆ setDefaultValue()

template<typename ATTRIBUTE_T>
XMLAttribute< ATTRIBUTE_T > & precice::xml::XMLAttribute< ATTRIBUTE_T >::setDefaultValue ( const ATTRIBUTE_T & defaultValue)

Definition at line 152 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ setDocumentation()

template<typename ATTRIBUTE_T>
XMLAttribute< ATTRIBUTE_T > & precice::xml::XMLAttribute< ATTRIBUTE_T >::setDocumentation ( std::string_view documentation)

Sets a documentation string for the attribute.

Definition at line 136 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ setOptions() [1/2]

template<typename ATTRIBUTE_T>
template<class T>
XMLAttribute & precice::xml::XMLAttribute< ATTRIBUTE_T >::setOptions ( std::initializer_list< T > && options)
inline

Definition at line 53 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ setOptions() [2/2]

template<typename ATTRIBUTE_T>
XMLAttribute< ATTRIBUTE_T > & precice::xml::XMLAttribute< ATTRIBUTE_T >::setOptions ( std::vector< ATTRIBUTE_T > options)

Definition at line 143 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ setRead()

template<typename ATTRIBUTE_T>
void precice::xml::XMLAttribute< ATTRIBUTE_T >::setRead ( bool read)
inline

Definition at line 93 of file XMLAttribute.hpp.

Member Data Documentation

◆ _defaultValue

template<typename ATTRIBUTE_T>
ATTRIBUTE_T precice::xml::XMLAttribute< ATTRIBUTE_T >::_defaultValue {}
private

Definition at line 116 of file XMLAttribute.hpp.

◆ _doc

template<typename ATTRIBUTE_T>
std::string precice::xml::XMLAttribute< ATTRIBUTE_T >::_doc
private

Definition at line 108 of file XMLAttribute.hpp.

◆ _hasDefaultValue

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::_hasDefaultValue = false
private

Definition at line 114 of file XMLAttribute.hpp.

◆ _hasValidation

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::_hasValidation = false
private

Definition at line 118 of file XMLAttribute.hpp.

◆ _log

template<typename ATTRIBUTE_T>
logging::Logger precice::xml::XMLAttribute< ATTRIBUTE_T >::_log {"xml::XMLAttribute"}
private

Definition at line 104 of file XMLAttribute.hpp.

◆ _name

template<typename ATTRIBUTE_T>
std::string precice::xml::XMLAttribute< ATTRIBUTE_T >::_name
private

Definition at line 106 of file XMLAttribute.hpp.

◆ _options

template<typename ATTRIBUTE_T>
std::vector<ATTRIBUTE_T> precice::xml::XMLAttribute< ATTRIBUTE_T >::_options
private

Definition at line 120 of file XMLAttribute.hpp.

◆ _read

template<typename ATTRIBUTE_T>
bool precice::xml::XMLAttribute< ATTRIBUTE_T >::_read = false
private

Definition at line 110 of file XMLAttribute.hpp.

◆ _value

template<typename ATTRIBUTE_T>
ATTRIBUTE_T precice::xml::XMLAttribute< ATTRIBUTE_T >::_value {}
private

Definition at line 112 of file XMLAttribute.hpp.


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