Struct category_validator
Defined in File validate.hpp
Struct Documentation
-
struct category_validator
A validator for categories.
Categories can have a key, a set of items that in combination should be unique.
Public Functions
-
inline bool operator<(const category_validator &rhs) const
return true if this category sorts before rhs
-
void addItemValidator(item_validator &&v)
Add item_validator v to the list of item validators.
-
const item_validator *get_validator_for_item(std::string_view tag) const
Return the item_validator for item tag, may return nullptr.
Public Members
-
std::string m_name
The name of the category.
-
std::vector<std::string> m_keys
The list of items that make up the key.
-
std::set<item_validator> m_item_validators
The item validators for the items in this category.
-
inline bool operator<(const category_validator &rhs) const