[core] Add drinking water ftraits

Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
David Martinez 2024-02-25 17:07:15 +01:00 committed by Viktor Govako
parent 0dd0741943
commit 70d1a018e7

View file

@ -101,4 +101,24 @@ class Wheelchair : public TraitsBase<Wheelchair, WheelchairAvailability>
}
};
enum class DrinkingWaterAvailability
{
No,
Yes,
};
class DrinkingWater : public TraitsBase<DrinkingWater, DrinkingWaterAvailability>
{
friend class TraitsBase;
using TypesInitializer = std::initializer_list<std::initializer_list<char const *>>;
DrinkingWater()
{
m_matcher.Append<TypesInitializer>({{"drinking_water", "no"}}, DrinkingWaterAvailability::No);
m_matcher.Append<TypesInitializer>({{"drinking_water", "yes"}}, DrinkingWaterAvailability::Yes);
m_matcher.Append<TypesInitializer>({{"amenity", "drinking_water"}}, DrinkingWaterAvailability::Yes);
}
};
} // namespace ftraits