Struct item_validator
Defined in File validate.hpp
Struct Documentation
-
struct item_validator
An item_validator binds a type_validator to an item in a category along with other information found in the dictionary.
mmCIF dictionaries may indicate an item is e.g. mandatory or consists of a certain list of allowed values. Even default values can be provided.
Public Functions
-
inline bool operator<(const item_validator &rhs) const
Compare based on the name.
-
inline bool operator==(const item_validator &rhs) const
Compare based on the name.
-
void operator()(std::string_view value) const
Validate the value in value for this item Will throw a validation_error exception if it fails.
Public Members
-
std::string m_tag
The item name.
-
bool m_mandatory
Flag indicating this item is mandatory.
-
const type_validator *m_type
The type for this item.
-
std::string m_default
If filled, a default value for this item.
-
category_validator *m_category = nullptr
The category_validator this item_validator belongs to.
-
inline bool operator<(const item_validator &rhs) const