nw::ModifierRegistry
-
struct ModifierRegistry
Public Types
Public Functions
-
ModifierRegistry(MemoryResource *allocator = kernel::global_allocator())
-
ModifierRegistry(const ModifierRegistry&) = delete
-
ModifierRegistry &operator=(const ModifierRegistry&) = delete
-
const_iterator begin() const
-
const_iterator cbegin() const
-
void clear()
Clears all modifiers.
-
const_iterator end() const
-
const_iterator cend() const
-
int remove(StringView tag)
Removes modifiers by tag.
- Parameters:
tag – if
string_viewends with ‘*’ then matches any tag that starts withtag- Returns:
int number of modifiers affected
-
int replace(StringView tag, ModifierVariant value)
Replace modifier value.
- Parameters:
tag – if
string_viewends with ‘*’ then matches any tag that starts withtagvalue – new value
- Returns:
int number of modifiers affected
-
int replace(StringView tag, const Requirement &req)
Replace modifier requirement.
- Parameters:
tag – if
string_viewends with ‘*’ then matches any tag that starts withtagreq – new requirement
- Returns:
int number of modifiers affected
-
size_t size() const
Gets the number of modifiers.
-
ModifierRegistry(MemoryResource *allocator = kernel::global_allocator())