![]() |
Plasma Engine
2.0
|
This is the fall back default state provider which handles the default state set via the plDefaultAttribute on the reflected type. More...
#include <AttributeDefaultStateProvider.h>
Public Member Functions | |
virtual plInt32 | GetRootDepth () const override |
Returns the root depth of this provider instance. | |
virtual plColorGammaUB | GetBackgroundColor () const override |
Returns a color to be used in the property grid. Only the hue of the color is used. If alpha is 0, the color is ignored and no tinting of the property grid takes place. | |
virtual plString | GetStateProviderName () const override |
Returns the name of this state provider. Can be used to check what the outer most provider is for GUI purposes. | |
virtual plVariant | GetDefaultValue (SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plVariant index=plVariant()) override |
Returns the default value of an object's property at a given index. | |
virtual plStatus | CreateRevertContainerDiff (SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plDeque< plAbstractGraphDiffOperation > &out_diff) override |
Queries an array of diff operations that can be executed to revert the object container. | |
![]() | |
virtual bool | IsDefaultValue (SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plVariant index=plVariant()) |
virtual plStatus | RevertProperty (SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp, plVariant index=plVariant()) |
virtual plStatus | RevertObjectContainer (SuperArray superPtr, plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp) |
![]() | |
virtual | ~plRefCounted ()=default |
Adds a virtual destructor. | |
![]() | |
plRefCountingImpl ()=default | |
Constructor. | |
plRefCountingImpl (const plRefCountingImpl &rhs) | |
void | operator= (const plRefCountingImpl &rhs) |
plInt32 | AddRef () const |
Increments the reference counter. Returns the new reference count. | |
plInt32 | ReleaseRef () const |
Decrements the reference counter. Returns the new reference count. | |
bool | IsReferenced () const |
Returns true if the reference count is greater than 0, false otherwise. | |
plInt32 | GetRefCount () const |
Returns the current reference count. | |
Static Public Member Functions | |
static plSharedPtr< plDefaultStateProvider > | CreateProvider (plObjectAccessorBase *pAccessor, const plDocumentObject *pObject, const plAbstractProperty *pProp) |
![]() | |
static bool | DoesVariantMatchProperty (const plVariant &value, const plAbstractProperty *pProp, plVariant index=plVariant()) |
A sanity check function that verifies that a given variant's value matches that expected of the property at the given index. If index is invalid and the property a container, the value must be an array or dictionary of the property's type. | |
Additional Inherited Members | |
![]() | |
using | SuperArray = const plArrayPtr<const plSharedPtr<plDefaultStateProvider>> |
Parent hierarchy of state providers. | |
This is the fall back default state provider which handles the default state set via the plDefaultAttribute on the reflected type.
|
overridevirtual |
Queries an array of diff operations that can be executed to revert the object container.
superPtr | superPtr Parent hierarchy of inner providers that should be called of this instance cannot handle the request. See SuperArray definition for details. |
pAccessor | pAccessor Accessor to be used for querying object values if necessary. Always valid. |
pObject | pObject The object which is to be reverted. Always valid. |
pProp | pProp The container property which is to be reverted. Always valid. |
out_diff | An array of diff operations that should be executed via plDocumentObjectConverterReader::ApplyDiffToObject to revert the object / container to its default state. |
Implements plDefaultStateProvider.
|
overridevirtual |
Returns a color to be used in the property grid. Only the hue of the color is used. If alpha is 0, the color is ignored and no tinting of the property grid takes place.
Implements plDefaultStateProvider.
|
overridevirtual |
Returns the default value of an object's property at a given index.
superPtr | Parent hierarchy of inner providers that should be called of this instance cannot handle the request. See SuperArray definition for details. |
pAccessor | Accessor to be used for querying object values if necessary. Always valid. |
pObject | The object for which the default value should be queried. Always valid. |
pProp | The property for which the default value should be queried. Always valid. |
index | For containers: If the index is valid, the container element's default value is requested. If not, the entire container (either array or dictionary) is requested. |
Implements plDefaultStateProvider.
|
overridevirtual |
Returns the root depth of this provider instance.
This is through how many properties and objects we needed to pass through from the object and property passed into the factory method to find the root object / property that this provider represents. For example if we have this object hierarchy: A |-children- B |-elements- C
If A is a prefab and the factory method was called for C (with no property) then we need to walk up the hierarchy via elements container, the B object, the children container and then finally A. Thus, we need 4 hops to get the the prefab root which means the root depth for this provider instance is 4.
Implements plDefaultStateProvider.
|
inlineoverridevirtual |
Returns the name of this state provider. Can be used to check what the outer most provider is for GUI purposes.
Implements plDefaultStateProvider.