preCICE v3.1.2
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 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_TgetDefaultValue () const
 
bool hasDefaultValue () const
 
bool hasValidation () const
 
void readValue (const std::map< std::string, std::string > &aAttributes)
 
const std::stringgetName () const
 
const ATTRIBUTE_TgetValue () 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.

◆ XMLAttribute() [3/4]

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

Definition at line 29 of file XMLAttribute.hpp.

◆ XMLAttribute() [4/4]

template<typename ATTRIBUTE_T >
precice::xml::XMLAttribute< ATTRIBUTE_T >::XMLAttribute ( const XMLAttribute< ATTRIBUTE_T > & other)
default

Member Function Documentation

◆ getDefaultValue()

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

Definition at line 60 of file XMLAttribute.hpp.

◆ getName()

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

Definition at line 77 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 53 of file XMLAttribute.hpp.

◆ getUserDocumentation()

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

Definition at line 39 of file XMLAttribute.hpp.

◆ getValue()

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

Definition at line 82 of file XMLAttribute.hpp.

◆ hasDefaultValue()

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

Definition at line 65 of file XMLAttribute.hpp.

◆ hasValidation()

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

Definition at line 70 of file XMLAttribute.hpp.

◆ isRead()

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

Definition at line 92 of file XMLAttribute.hpp.

◆ operator=()

◆ readValue()

Definition at line 155 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 195 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ 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()

Definition at line 146 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 documentation)

Sets a documentation string for the attribute.

Definition at line 130 of file XMLAttribute.hpp.

◆ 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 47 of file XMLAttribute.hpp.

Here is the call graph for this function:

◆ setOptions() [2/2]

Definition at line 137 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 87 of file XMLAttribute.hpp.

Member Data Documentation

◆ _defaultValue

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

Definition at line 110 of file XMLAttribute.hpp.

◆ _doc

Definition at line 102 of file XMLAttribute.hpp.

◆ _hasDefaultValue

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

Definition at line 108 of file XMLAttribute.hpp.

◆ _hasValidation

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

Definition at line 112 of file XMLAttribute.hpp.

◆ _log

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

Definition at line 98 of file XMLAttribute.hpp.

◆ _name

Definition at line 100 of file XMLAttribute.hpp.

◆ _options

Definition at line 114 of file XMLAttribute.hpp.

◆ _read

Definition at line 104 of file XMLAttribute.hpp.

◆ _value

Definition at line 106 of file XMLAttribute.hpp.


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