|
The Vish Visualization Shell 0.3
Vish
|
A node which serves to identify multiple instances of input alternatives for a certain value. More...
#include <ocean/plankton/ValueNotifier.hpp>
Classes | |
| struct | List |
Public Member Functions | |
| bool | addNotifier (const WeakPtr< ValueNotifier > &who) const |
| bool | addShadow (const WeakPtr< ValuePool, ValuePool > &ShadowPool) const |
| Add an optional shadow of a certain variable, which means to remember the ValuePool's which contains an instance of the related value. | |
| bool | contains (const WeakPtr< ValueNotifier > &who) const |
| Checks if a certain ValueNotifier is contained here. | |
| int | copyShadows (const ValueNotifierListPtr &Source) |
| For each shadow found in the source's ValuePool, create a shadow for the current ValueNotifierList as well. | |
| virtual const RefPtr< VValueBase > & | DefaultValue () const |
| Return a reference to an eventually associated default or global value of the associated variable. | |
| RefPtr< ValuePool, ValuePool > | findShadowByName (const string &ValuePoolName) const |
| Find a value pool from a name, if this variable has a shadow in this pool. | |
| int | iterate_shadows (const std::function< bool(const RefPtr< ValuePool, ValuePool > &ShadowPool, const RefPtr< VValueBase > &ShadowValue)> &ShadowValueIterator) const |
| Iterator function, traverses all shadows (i.e. ValuePools) | |
| int | iterateShadows (ValueShadowIterator &SI) const |
| Iterator function, traverses all shadows (i.e. ValuePools) | |
| int | iterateValues (NotifiedValueIterator &NVI) const |
| Iterate overall notified values. | |
| void | notify (const RefPtr< VValueBase > &value, const ValuePoolPtr &, const WeakPtr< ValueNotifier > &who, const ValueNotifierList *Exclude, const ValueMap *VP=0) const |
| Broadcast a value change event to all listening notifiers. | |
| bool | removeAllShadows () |
| Remove all shadows of a certain variable, i.e. | |
| ValueNotifierList () | |
| Constructor. | |
| ~ValueNotifierList () | |
| Destructor. | |
Public Member Functions inherited from MemCore::ReferenceBase< ValueNotifierList > | |
| auto | getObjectCountID () const noexcept |
| Get a unique ID for this object in the given domain. | |
| bool | isIdentical (const WeakPtr< ValueNotifierList, ValueNotifierList > &PossibleSelf) const noexcept |
| Check if this object is identical to the one used by the given pointer. | |
| void | mkAutoDestructive () |
| Marks this object as being automatically destructed, e.g. | |
| refcount_t | refcount () const noexcept |
| The strong reference count. | |
| ReferenceBase (ValueNotifierList *that) noexcept | |
| Constructor, initializes reference counter to zero. | |
| const auto & | self () const |
| Return weak pointer to the object self. | |
| refcount_t | wrefcount () const noexcept |
| The weak reference count. | |
Additional Inherited Members | |
Public Types inherited from MemCore::ReferenceBase< ValueNotifierList > | |
| using | reference_domain_t = ValueNotifierList |
| The type of the base class. | |
| using | SelfPtr_t = WeakPtr< ValueNotifierList, ValueNotifierList > |
| Type for a pointer to this object itself. | |
Protected Member Functions inherited from MemCore::ReferenceBase< ValueNotifierList > | |
| virtual void | extremeUnction () |
| A virtual function that will be called just before the object is destroyed. | |
| ReferenceBase & | operator= (const ReferenceBase &R) |
| Protected assignment operator (should not be called). | |
| void | suicide () |
| Delete this. | |
| virtual | ~ReferenceBase () |
| Virtual destructor. | |
A node which serves to identify multiple instances of input alternatives for a certain value.
It contains a set of weak pointers to VValueNotifier's which are called when a specific value is changed. It also contains a list of weak pointers to ValuePools, which each of them may host a shadow of the respective value. The data layout is basically like this:
| bool Wizt::ValueNotifierList::addNotifier | ( | const WeakPtr< ValueNotifier > & | who | ) | const |
Referenced by Wizt::VParameter::AddAction().
Add an optional shadow of a certain variable, which means to remember the ValuePool's which contains an instance of the related value.
Only weak pointers are stored, so if the ValuePool goes away on its own, there is already taken care of automatically.
Referenced by copyShadows(), Wizt::VValueParameter< Type >::createLocalVariable(), and Wizt::VValueParameter< Action >::createLocalVariable().
| int Wizt::ValueNotifierList::copyShadows | ( | const ValueNotifierListPtr & | Source | ) |
For each shadow found in the source's ValuePool, create a shadow for the current ValueNotifierList as well.
The values are copied.
References addShadow(), and MemCore::ReferenceBase< ValueNotifierList >::self().
| bool Wizt::ValueNotifierList::removeAllShadows | ( | ) |
Remove all shadows of a certain variable, i.e.
forget all ValuePools which had a relation to this ValueNotifierList.
References MemCore::ReferenceBase< ValueNotifierList >::self().
Referenced by Wizt::VParameter::Globalize().