COMP: provide NamedEnum::found() method for third-party code

- eg, swak4Foam uses it for NumericAccumulationNamedEnum
This commit is contained in:
Mark Olesen 2017-05-30 14:47:08 +02:00
parent 49129ba88b
commit d9072f527c
2 changed files with 13 additions and 0 deletions

View File

@ -117,6 +117,9 @@ public:
// Query
//- Test if there is an enumeration corresponding to the given name.
inline bool found(const word& enumName) const;
//- Test if there is an enumeration corresponding to the given name.
inline bool hasEnum(const word& enumName) const;

View File

@ -46,6 +46,16 @@ inline Foam::wordList Foam::NamedEnum<EnumType, nEnum>::sortedToc() const
}
template<class EnumType, int nEnum>
inline bool Foam::NamedEnum<EnumType, nEnum>::found
(
const word& enumName
) const
{
return lookup_.found(enumName);
}
template<class EnumType, int nEnum>
inline bool Foam::NamedEnum<EnumType, nEnum>::hasEnum
(