Class InputParameters

Inheritance Relationships

Base Type

Class Documentation

class InputParameters : public opensn::ParameterBlock

Class for handling input parameters.

Public Functions

InputParameters() = default
InputParameters &operator+=(InputParameters other)
void SetObjectType(const std::string &obj_type)

Sets the object type string for more descriptive error messages.

std::string GetObjectType() const

Returns the object type string.

inline void SetClassName(const std::string &class_name)

Sets the class name to be applied to this object. If not used a default will be generated.

inline void SetGeneralDescription(const std::string &description)

Sets a general description of the object that should be included with the object’s documentation.

inline std::string GetGeneralDescription() const
void LinkParameterToBlock(const std::string &param_name, const std::string &block_name)

Space separated list of doxygen group names to which this documentation should belong.

Sets a link to the documentation of a different object.

std::string GetParameterDocumentationLink(const std::string &param_name) const

Gets any linkage information of a parameter.

std::string GetParameterDocString(const std::string &param_name)

Returns the parameter’s doc string.

template<typename T>
inline void AddOptionalParameter(const std::string &name, T value, const std::string &doc_string)
void AddOptionalParameterBlock(const std::string &name, const ParameterBlock &block, const std::string &doc_string)

Specialization for block type parameters.

template<typename T>
inline void AddOptionalParameterArray(const std::string &name, const std::vector<T> &array, const std::string &doc_string)
void AddOptionalParameterArray(const std::string &name, const std::vector<ParameterBlock> &array, const std::string &doc_string)

Specialization for block type parameters.

template<typename T>
inline void AddRequiredParameter(const std::string &name, const std::string &doc_string)
void AddRequiredParameterBlock(const std::string &name, const std::string &doc_string)

Specialization for block type parameters.

void AddRequiredParameterArray(const std::string &name, const std::string &doc_string)

Specialization for array type parameters.

template<typename T>
inline void ChangeExistingParamToOptional(const std::string &name, T value, const std::string &doc_string = "")
template<typename T>
inline void ChangeExistingParamToRequired(const std::string &name, const std::string &doc_string = "")
void AssignParameters(const ParameterBlock &params)

Assigns parameters with thorough type checks, deprecation checks, unused parameter checks.

inline const ParameterBlock &GetParametersAtAssignment() const

Returns the raw parameter block used at assignment. This can be used to see if a user supplied an optional parameter or not.

bool IsParameterValid(const std::string &param_name) const
void MarkParameterDeprecatedWarning(const std::string &param_name, const std::string &deprecation_message = "")

Marks a parameters as deprecated but will only produce a warning.

void MarkParameterDeprecatedError(const std::string &param_name, const std::string &deprecation_message = "")

Marks a parameters as deprecated and will produce an error if the parameter is specified.

void MarkParameterRenamed(const std::string &param_name, const std::string &renaming_description)

Marks a parameters as renamed and will produce an error if the parameter is specified.

void ConstrainParameterRange(const std::string &param_name, std::shared_ptr<AllowableRange> allowable_range)

Creates a range based constraint for a given parameter.

void SetParameterTypeMismatchAllowed(const std::string &param_name)

Sets a tag for the given parameter that will allow its type to be mismatched upon assignment.

void DumpParameters() const

Dumps the input parameters to stdout.

Public Static Functions

template<typename T>
static inline InputParameters MakeForObject(const ParameterBlock &params)