App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange Class Reference

#include <Property.h>

Public Member Functions

void aboutToChange ()
 Mark the property as changed. More...
 
 AtomicPropertyChange (P &prop, bool markChange=true)
 Constructor. More...
 
void tryInvoke ()
 Check and invoke property's hasSetValue() More...
 
 ~AtomicPropertyChange ()
 Destructor. More...
 

Constructor & Destructor Documentation

◆ AtomicPropertyChange()

template<class P >
App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::AtomicPropertyChange ( P &  prop,
bool  markChange = true 
)

Constructor.

Parameters
propthe property
markChangeIf true, marks the property as changed if it hasn't been marked before, and calls its aboutToSetValue().

References App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::aboutToChange().

◆ ~AtomicPropertyChange()

template<class P >
App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::~AtomicPropertyChange ( )

Destructor.

If the property is marked as changed, and this is the last instance of the class in current call stack, it will call property's hasSetValue()

Member Function Documentation

◆ aboutToChange()

template<class P >
void App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::aboutToChange ( )

Mark the property as changed.

It will mark the property as changed only if it has been marked before, and only then will it call the property's aboutToSetValue().

Referenced by App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::AtomicPropertyChange().

◆ tryInvoke()

template<class P >
void App::AtomicPropertyChangeInterface< P >::AtomicPropertyChange::tryInvoke ( )

Check and invoke property's hasSetValue()

Check if this is the last instance and the property has been marked as changed. If so, invoke property's hasSetValue().

Referenced by App::PropertyListsT< T, ListT, ParentT >::set1Value(), App::PropertyListsT< T, ListT, ParentT >::setPyValues(), and App::PropertyListsT< T, ListT, ParentT >::setValues().


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