mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: provide NamedEnum::found() method for third-party code
- eg, swak4Foam uses it for NumericAccumulationNamedEnum
This commit is contained in:
@ -117,6 +117,9 @@ public:
|
|||||||
|
|
||||||
// Query
|
// 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.
|
//- Test if there is an enumeration corresponding to the given name.
|
||||||
inline bool hasEnum(const word& enumName) const;
|
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>
|
template<class EnumType, int nEnum>
|
||||||
inline bool Foam::NamedEnum<EnumType, nEnum>::hasEnum
|
inline bool Foam::NamedEnum<EnumType, nEnum>::hasEnum
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user