diff --git a/src/Base/Parameter.h b/src/Base/Parameter.h index 92a9fcb7d4..3579b0d767 100644 --- a/src/Base/Parameter.h +++ b/src/Base/Parameter.h @@ -164,18 +164,64 @@ public: }; static const char* TypeName(ParamType type); static ParamType TypeValue(const char*); + + /** + * Sets the value of an attribute. + * + * @param[in] Type The type of the attribute. + * @param[in] Name The name of the attribute. + * @param[in] Value The value to be set. + */ void SetAttribute(ParamType Type, const char* Name, const char* Value); + + /** + * Removes an attribute. + * + * @param[in] Type The type of the attribute. + * @param[in] Name The name of the attribute. + */ void RemoveAttribute(ParamType Type, const char* Name); + + /** + * Returns the value of the attribute. + * + * If the attribute can't be found, \n + * the fallback value is returned. + * + * @param[in] Type The type of the attribute. + * @param[in] Name The name of the attribute. + * @param[out] Value The value of attribute or the fallback value. + * @param[in] Default The fallback value. + */ const char* GetAttribute(ParamType Type, const char* Name, std::string& Value, const char* Default) const; + + /** + * Returns all attributes with the given type. + * + * Optionally filters them to only include attributes \n + * with names that contain a certain string. + * + * @param[in] Type The type of attributes to be returned + * @param[in] sFilter String that has to be present in the names of the attributes. + * @returns Vector of attribute name & value pairs. + */ std::vector> GetAttributeMap(ParamType Type, const char* sFilter = nullptr) const; - /** Return the type and name of all parameters with optional filter - * @param sFilter only strings which name includes sFilter are put in the vector - * @return std::vector of pair(type, name) + + + /** + * Returns all parameters. + * + * Optionally filters them to only include attributes \n + * with names that contain a certain string. + * + * @param[in] sFilter String that has to be present in the names of the attributes. + * @returns Vector of attribute type & name pairs. */ std::vector> GetParameterNames(const char* sFilter = nullptr) const; + //@} /** @name methods for bool handling */