COMP: provide NamedEnum::found() method for third-party code
- eg, swak4Foam uses it for NumericAccumulationNamedEnum
This commit is contained in:
parent
49129ba88b
commit
d9072f527c
@ -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;
|
||||
|
||||
|
@ -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
|
||||
(
|
||||
|
Loading…
Reference in New Issue
Block a user