Plasma Engine  2.0
Loading...
Searching...
No Matches
plDefaultObjectState Class Reference

Object used to query and revert to the default state of all properties of an object. More...

#include <DefaultState.h>

Public Member Functions

 plDefaultObjectState (plObjectAccessorBase *pAccessor, const plArrayPtr< plPropertySelection > selection)
 Constructor. Will collect the appropriate plDefaultStateProviders to query the states.
 
plColorGammaUB GetBackgroundColor () const
 Returns the color of the top-most plDefaultStateProvider of the first element of the selection.
 
plString GetStateProviderName () const
 Returns the name of the top-most plDefaultStateProvider of the first element of the selection.
 
bool IsDefaultValue (const char *szProperty) const
 
bool IsDefaultValue (const plAbstractProperty *pProp) const
 
plStatus RevertProperty (const char *szProperty)
 
plStatus RevertProperty (const plAbstractProperty *pProp)
 
plStatus RevertObject ()
 
plVariant GetDefaultValue (const char *szProperty, plUInt32 uiSelectionIndex=0) const
 
plVariant GetDefaultValue (const plAbstractProperty *pProp, plUInt32 uiSelectionIndex=0) const
 

Detailed Description

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).

Constructor & Destructor Documentation

◆ plDefaultObjectState()

plDefaultObjectState::plDefaultObjectState ( plObjectAccessorBase * pAccessor,
const plArrayPtr< plPropertySelection > selection )

Constructor. Will collect the appropriate plDefaultStateProviders to query the states.

Parameters
pAccessorUsed to revert properties and query their current value.
selectionFor which objects the default state should be queried. The plPropertySelection::m_Index should be invalid.

The documentation for this class was generated from the following files: