![]() |
XII Release 0.1.0
|
Object used to query and revert to the default state of all properties of an object. More...
#include <DefaultState.h>
Public Member Functions | |
xiiDefaultObjectState (xiiObjectAccessorBase *pAccessor, const xiiArrayPtr< xiiPropertySelection > selection) | |
Constructor. Will collect the appropriate xiiDefaultStateProviders to query the states. | |
xiiColorGammaUB | GetBackgroundColor () const |
Returns the color of the top-most xiiDefaultStateProvider of the first element of the selection. | |
xiiString | GetStateProviderName () const |
Returns the name of the top-most xiiDefaultStateProvider of the first element of the selection. | |
bool | IsDefaultValue (xiiStringView sProperty) const |
bool | IsDefaultValue (const xiiAbstractProperty *pProp) const |
xiiStatus | RevertProperty (xiiStringView sProperty) |
xiiStatus | RevertProperty (const xiiAbstractProperty *pProp) |
xiiStatus | RevertObject () |
xiiVariant | GetDefaultValue (xiiStringView sProperty, xiiUInt32 uiSelectionIndex=0) const |
xiiVariant | GetDefaultValue (const xiiAbstractProperty *pProp, xiiUInt32 uiSelectionIndex=0) const |
Object used to query and revert to the default state of all properties of an object.
This class should not be persisted in memory and just used on the stack to query all property states and then destroyed. It should also not be used across hierarchical changes of any kind (deleting objects etc).
xiiDefaultObjectState::xiiDefaultObjectState | ( | xiiObjectAccessorBase * | pAccessor, |
const xiiArrayPtr< xiiPropertySelection > | selection ) |
Constructor. Will collect the appropriate xiiDefaultStateProviders to query the states.
pAccessor | Used to revert properties and query their current value. |
selection | For which objects the default state should be queried. The xiiPropertySelection::m_Index should be invalid. |