19template <
typename ATTRIBUTE_T>
123 template <
typename VALUE_T>
126 set(ATTRIBUTE_T &toSet,
const VALUE_T &setter);
129 template <
typename VALUE_T>
132 set(ATTRIBUTE_T &toSet,
const VALUE_T &setter);
135template <
typename ATTRIBUTE_T>
138 _doc = documentation;
142template <
typename ATTRIBUTE_T>
151template <
typename ATTRIBUTE_T>
160template <
typename ATTRIBUTE_T>
167 if (position == aAttributes.
end()) {
179 stream <<
"Invalid value \"" <<
_value <<
"\" of attribute \""
183 stream <<
"value must be \"" << *first <<
'"';
186 for (; first !=
_options.end(); ++first) {
187 stream <<
" or value must be \"" << *first <<
'"';
197template <
typename ATTRIBUTE_T>
198template <
typename VALUE_T>
203 const VALUE_T &setter)
208template <
typename ATTRIBUTE_T>
209template <
typename VALUE_T>
214 const VALUE_T &setter)
#define PRECICE_ERROR(...)
#define PRECICE_DEBUG(...)
#define PRECICE_TRACE(...)
#define PRECICE_CHECK(check,...)
#define PRECICE_ASSERT(...)
This class provides a lightweight logger.
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 non Eigen::VectorXd type values.
XMLAttribute & setOptions(std::initializer_list< T > &&options)
bool hasValidation() const
const ATTRIBUTE_T & getDefaultValue() const
const std::string & getUserDocumentation() const
void readValue(const std::map< std::string, std::string > &aAttributes)
const ATTRIBUTE_T & getValue() const
bool hasDefaultValue() const
XMLAttribute(std::string name)
XMLAttribute & setOptions(std::vector< ATTRIBUTE_T > options)
const std::vector< ATTRIBUTE_T > & getOptions() const
XMLAttribute(const XMLAttribute< ATTRIBUTE_T > &other)=default
XMLAttribute & setDefaultValue(const ATTRIBUTE_T &defaultValue)
const std::string & getName() const
std::vector< ATTRIBUTE_T > _options
ATTRIBUTE_T _defaultValue
XMLAttribute(std::string name, ATTRIBUTE_T defaultValue)
XMLAttribute & setDocumentation(std::string_view documentation)
Sets a documentation string for the attribute.
XMLAttribute & operator=(const XMLAttribute< ATTRIBUTE_T > &other)=default
bool isKebabStyle(std::string_view sv)
contains the XML configuration parser.
XMLAttribute< std::string > makeXMLAttribute(std::string name, const char *defaultValue)
std::string getName(const XMLTag::Attribute &attribute)
Returns the name of an Attribute.
void readValueSpecific(const std::string &rawValue, double &value)