Magnum::Ui::AbstractStorageQuery class new in Git master

Base for DataLayer storage queries.

Used through the StorageQuery subclass which is returned from AbstractStorage implementations.

Derived classes

template<class T>
class StorageQuery new in Git master
DataLayer storage query

Public functions

auto layer() const -> DataLayer&
Data layer reference.
auto storage() const -> StorageHandle
Storage handle.
auto index() const -> Containers::Size3D
Data index.
auto isMutable() const -> bool
Whether the query is mutable.
auto operations() const -> StorageOperations
Available storage operations.
auto reset() const -> StorageUpdateState
Reset the storage value.
auto toggle() const -> StorageUpdateState
Toggle the storage value.
auto increment() const -> StorageUpdateState
Increment the storage value.
auto decrement() const -> StorageUpdateState
Decrement the storage value.
auto setToMin() const -> StorageUpdateState
Set the storage value to a minimum.
auto setToMax() const -> StorageUpdateState
Set the storage value to a maximum.

Function documentation

StorageHandle Magnum::Ui::AbstractStorageQuery::storage() const

Storage handle.

Guaranteed to be associated with layer() and never StorageHandle::Null.

bool Magnum::Ui::AbstractStorageQuery::isMutable() const

Whether the query is mutable.

Mutable queries allow StorageQuery::set(), reset(), toggle(), increment(), decrement(), setToMin() and setToMax() to be called based on which operations() are available. Immutable queries allow only getting the current value, potentially along with StorageQuery::min() and StorageQuery::max() if operations() expose them.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::reset() const

Reset the storage value.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Reset. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::toggle() const

Toggle the storage value.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Toggle. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::increment() const

Increment the storage value.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Increment. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::decrement() const

Decrement the storage value.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Decrement. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::setToMin() const

Set the storage value to a minimum.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Min. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.

StorageUpdateState Magnum::Ui::AbstractStorageQuery::setToMax() const

Set the storage value to a maximum.

Expects that storage() is still valid in the layer() and operations() list StorageOperation::Max. The return value describes whether the update succeeded, see the StorageUpdateState enum values for an overview of possible conditions and documentation of a concrete storage implementation for detailed update behavior.

Calling this function causes the storage to get marked as dirty and LayerState::NeedsCommonDataUpdate to be set on the layer if the stored value actually changed.