22 #ifndef NANDRAD_KeywordListH 23 #define NANDRAD_KeywordListH 28 #include <IBK_Parameter.h> 29 #include <IBK_IntPara.h> 56 static const char *
Keyword(
const char *
const enumtype,
int t);
66 static const char *
Description(
const char *
const enumtype,
int t,
bool * no_description =
nullptr);
74 static const char *
Unit(
const char *
const enumtype,
int t);
82 static const char *
Color(
const char *
const enumtype,
int t);
90 static double DefaultValue(
const char *
const enumtype,
int t);
98 static int Enumeration(
const char *
const enumtype,
const std::string & kw,
bool * deprecated =
nullptr);
105 static int MaxIndex(
const char *
const enumtype);
112 static unsigned int Count(
const char *
const enumtype);
117 static bool KeywordExists(
const char *
const enumtype,
const std::string & kw);
150 static void setParameter(IBK::Parameter para[],
const char *
const enumtype,
int n,
const double &val);
153 static void setIntPara(IBK::IntPara para[],
const char *
const enumtype,
int n,
const int &val);
164 #endif // NANDRAD_KeywordListH static bool CategoryExists(const char *const enumtype)
Checks whether a category of type enumtype exists.
static const char * Keyword(const char *const enumtype, int t)
Returns a keyword for an enum value t of type enumtype.
static unsigned int Count(const char *const enumtype)
Returns the number of keywords in this category.
static int MaxIndex(const char *const enumtype)
Returns the maximum index for entries of a category in the keyword list.
static int Enumeration(const char *const enumtype, const std::string &kw, bool *deprecated=nullptr)
Returns an enumeration value for a given keyword kw of type enumtype.
static const char * Color(const char *const enumtype, int t)
Returns a color string for an enum value t of type enumtype.
static const char * Unit(const char *const enumtype, int t)
Returns a default unit for an enum value t of type enumtype.
static void setIntPara(IBK::IntPara para[], const char *const enumtype, int n, const int &val)
As setParameter(), but for IBK::IntPara.
static void setParameter(IBK::Parameter para[], const char *const enumtype, int n, const double &val)
Convenience function to set an IBK::Parameter inside a static C-array of IBK::Parameters with correct...
static double DefaultValue(const char *const enumtype, int t)
Returns a default value for an enum value t of type enumtype.
static bool KeywordExists(const char *const enumtype, const std::string &kw)
Checks whether a keyword exists in the enumeration of type enumtype.
The namespace NANDRAD contains the data model classes that make up the NANDRAD solver input data...
static const char * Description(const char *const enumtype, int t, bool *no_description=nullptr)
Returns a description for an enum value t of type enumtype.
The class KeywordList provides conversion functionality between keyword strings and their respective ...