remove EWOMS_END_PARAM_REGISTRATION macro

it adds no simplicity and only obfuscates
This commit is contained in:
Arne Morten Kvarving 2024-03-22 12:24:18 +01:00
parent 81c62e18f2
commit 783eaa2882
2 changed files with 12 additions and 16 deletions

View File

@ -84,18 +84,6 @@
#define EWOMS_HIDE_PARAM(TypeTag, ParamName) \
::Opm::Parameters::hideParam<TypeTag>(#ParamName, getPropValue<TypeTag, Properties::ParamName>())
/*!
* \ingroup Parameter
*
* \brief Indicate that all parameters are registered for a given type tag.
*
* If \c EWOMS_REGISTER_PARAM is called after the invokation of
* \c END_PARAM_REGISTRATION, a <tt>std::logic_error</tt> exception
* will be thrown.
*/
#define EWOMS_END_PARAM_REGISTRATION(TypeTag) \
::Opm::Parameters::endParamRegistration<TypeTag>()
/*!
* \ingroup Parameter
*
@ -963,7 +951,7 @@ public:
{
return retrieve_<ParamType>(propTagName, paramName, getPropValue<TypeTag, PropTag>(), errorIfNotRegistered);
}
template <class ParamType>
static ParamType get(const char *propTagName,
const char *paramName,
@ -972,7 +960,7 @@ public:
{
return retrieve_<ParamType>(propTagName, paramName, defaultValue, errorIfNotRegistered);
}
static void clear()
{
ParamsMeta::clear();
@ -1199,6 +1187,13 @@ void hideParam(const char *paramName, const ParamType&)
paramInfo.isHidden = true;
}
/*!
* \brief Indicate that all parameters are registered for a given type tag.
*
* If registerParam is called after the invocation of
* \c endParamRegistration, a <tt>std::logic_error</tt> exception
* will be thrown.
*/
template <class TypeTag>
void endParamRegistration()
{

View File

@ -91,8 +91,9 @@ static inline void registerAllParameters_(bool finalizeRegistration = true)
Simulator::registerParameters();
ThreadManager::registerParameters();
if (finalizeRegistration)
EWOMS_END_PARAM_REGISTRATION(TypeTag);
if (finalizeRegistration) {
Parameters::endParamRegistration<TypeTag>();
}
}
/*!