The Vish Visualization Shell 0.3
Vish
Public Member Functions | List of all members
Wizt::VAbstractValueParameter< Type > Class Template Reference

Making parameters for abstract values. More...

#include <ocean/plankton/VAbstractValue.hpp>

Inheritance diagram for Wizt::VAbstractValueParameter< Type >:
Wizt::VParameter Wizt::ValueNotifierList MemCore::Intercube MemCore::ReferenceBase< ValueNotifierList >

Public Member Functions

RefPtr< VValueBasecreateLocalVariable (const RefPtr< ValuePool > &GhostValues) const override
 Create a variable that is local relative to the specified ValuePool.
 
RefPtr< VValueBasenewValue () const override
 Create a new value with same value as this global one.
 
- Public Member Functions inherited from Wizt::VParameter
void AddAction (const RefPtr< ValueActionBase > &VAB)
 Add an action to the change of the underlying value.
 
const RefPtr< VCreationPreferences > & addCreationPreference (const string &p)
 The creation preferences.
 
void AddUndoAction (const RefPtr< VUndoAction > &what, int MaxActions)
 Add an undo action element to the undo stack.
 
Ageableage (const RefPtr< ValuePool > &VP) const
 The age of this parameter (it's the value's age)
 
const RefPtr< VCreationPreferences > & CreationPreferences () const
 The creation preferences.
 
const RefPtr< VValueBase > & DefaultValue () const override
 Return a reference to an eventually associated default or global value of the associated variable.
 
const WeakPtrToVSlotContainergetCreator () const
 Return the creator of this object, i.e.
 
RefPtr< VValueBasegetLocalValue (const RefPtr< ValuePool > &VP, const string &member, bool forceLocal) const
 Get the local shadow of the variable.
 
const SourceObject_tgetOwner () const
 Retrieve source object of the value (alias for Source() )
 
RefPtr< VValueBasegetProperty (const string &PropertyName) const
 Retrieve a certain property with yet unknown type.
 
template<typename T >
RefPtr< VTypedValueBase< T > > getProperty (const string &PropertyName) const
 Retrieve a certain property with known type.
 
template<typename T >
bool getProperty (const string &PropertyName, T &value) const
 Retrieve a certain property of a parameter.
 
const SourceObject_tgetSource () const
 Retrieve source object of the value (alias for Source() )
 
const type_info & getType () const
 Get the parameter type.
 
const type_info & getType (const string &member) const
 Get the parameter type.
 
template<class Type >
bool getValue (Type &Variable, const RefPtr< ValuePool > &Context, const string &theMember) const
 Get the current value of the parameter.
 
string getValueAsText (const RefPtr< ValuePool > &, const string &member, bool forceLocalCreation)
 Get the parameter to a certain value as some textual description.
 
RefPtr< VValueBasegetValueBase (const RefPtr< ValuePool > &Context, const string &member, bool forceLocal) const
 Retrieve a local value, if one exists, or the global value otherwise.
 
void Globalize (const RefPtr< ValuePool > &GhostValues)
 Make the values of this parameter global, initializing the values from the given value pool.
 
void includeUser (const WeakPtr< VManagedObject > &UsingObject, const string &alias)
 Inform the VParameter that some object will be using it under a specific name.
 
bool isLocal () const
 Tell if the current parameter is local relative to a given context.
 
int iterateProperties (ValueMap::iterator &it)
 Iterate over all properties of this parameter.
 
int iterateUserAliases (const UserIterator &, const WeakPtr< VManagedObject > &TheUsingObject) const
 Iterate over all aliases of this parameter as seen from a a specific object.
 
int iterateUsers (const UserIterator &) const
 Iterate over all users of this object, providing the alias names for this parameter.
 
void Localize ()
 Set a parameter to have local values relative to some value pool.
 
string Name () const
 Retrieve the name of this parameter.
 
void notifyInputs (const ValuePoolPtr &Context, const ValueNotifierList *Exclude, const WeakPtr< ValueNotifier > &issuer=NullPtr()) const
 Broadcast a value change event to all listening notifiers.
 
size_t NumberOfProperties () const
 How many properties are associated at this parameter.
 
void removeUser (const WeakPtr< VManagedObject > &UsingObject, const string &alias)
 Inform a VParameter that some object will no longer be using it under the given alias name.
 
void sendNotification (const WeakPtr< ValueNotifier > &issuer=NullPtr(), const ValueNotifierList *Exclude=0, const ValuePoolPtr &VP=NullPtr())
 If some parameter properties have been changed, send a notification event to all input instances.
 
void setCreator (VSlotContainer *Crec)
 Set the creator from a native pointer, which allows forward declaration of class VSlotContainer.
 
void setName (const string &s)
 Modify the name of this parameter.
 
void setProperty (const string &s, const RefPtr< VValueBase > &V, const WeakPtr< ValueNotifier > &issuer=nullptr, const ValueNotifierList *Exclude=0, const ValuePoolPtr &Ctx=nullptr)
 Set a property of this parameter, and issue a notification event relative to the global context to all listening input instances.
 
template<class Type >
void setPropertyValue (const string &s, const Type &V, const WeakPtr< ValueNotifier > &issuer=NullPtr(), const ValueNotifierList *Exclude=0)
 Set a typed property of this parameter and issue a notification event to all connected input instances.
 
template<class Type >
bool setPropertyValueIfNotExists (const string &theName, const Type &defaultValue, const WeakPtr< ValueNotifier > &issuer=NullPtr(), const ValueNotifierList *Exclude=0)
 Set a certain property of this parameter if it does not exist yet, and issue a notification event for the parameter's input object if it was created.
 
void setSilentProperty (const string &s, const RefPtr< VValueBase > &V)
 Set a parameter's property without sending out a notification event.
 
template<class Type >
bool setValue (const Type &Variable, const RefPtr< ValuePool > &Context, const string &member, bool forceLocalCreation, const WeakPtr< ValueNotifier > &issuer, const ValueNotifierList *Exclude=0, const ValueMap *vParam=0) const
 Set the parameter to a certain value and inform all input listeners about this change.
 
bool setValueFromText (const string &VariableText, const RefPtr< ValuePool > &VP, const string &member, bool forceLocalCreation, const WeakPtr< ValueNotifier > &issuer, const ValueNotifierList *Exclude=0, const ValueMap *vParam=0) const
 Set the parameter to a certain value from some textual description and inform all input listeners about this change.
 
const SourceObject_tSource () const
 Retrieve source object of the value.
 
void touchValue (const RefPtr< ValuePool > &Context) const
 Touch the parameter.
 
time_t update (const RefPtr< ValuePool > &Context, const Ageable &Other)
 Update from time parameter.
 
void updateProperties (const ValueMap &ThePropertyList, const WeakPtr< ValueNotifier > &issuer=NullPtr(), const ValueNotifierList *Exclude=0)
 Update all properties from the given list.
 
 VParameter (const RefPtr< VValueBase > &value, const string &initial_name, const RefPtr< VCreationPreferences > &CP)
 
 ~VParameter ()
 Destructor.
 
- Public Member Functions inherited from Wizt::ValueNotifierList
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.
 
RefPtr< ValuePool, ValuePoolfindShadowByName (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.
 
- Public Member Functions inherited from MemCore::Intercube
void addInterface (const RefPtr< InterfaceBase > &I) const
 Add an interface class object.
 
template<class Data >
void addInterfaceData (const Data &D)
 Add data via an interface class object.
 
template<class Data , typename TypeSelector >
void addInterfaceData (const Data &D)
 Add data via an interface class object.
 
void clearInterfaces ()
 Remove all interfaces.
 
bool const_iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP) const
 Constant iterator.
 
virtual RefPtr< InterfaceBasecreateInterface (const type_info &) const
 Virtual function which allows derived objects to create Interface objects on demand.
 
RefPtr< InterfaceBasefindInterface (const type_info &t) const
 Find a certain interface of specified type.
 
RefPtr< InterfaceBasegetInterface (const type_info &t)
 Retrieve an interface object from a certain type.
 
std::string getInterfaceNames (const char delim=';') const
 Debug function retrieving all interfaces as human-readable string.
 
template<class Data >
bool gotNewInterfaceData (const Data &D)
 Check whether data on the given interface have changed, and if so, set new data as interface.
 
template<class Data >
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector &S)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data , typename Selector >
bool gotNewInterfaceData (mutex &M, const Data &D, const Selector *S)
 Check whether interface data have changed, if so, then set new interface data and return true.
 
template<class Data >
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D, const Selector &) const
 Check whether interface data have changed.
 
template<class Data , typename Selector >
bool hasChangedInterfaceData (const Data &D, const Selector *) const
 Check whether interface data have changed.
 
bool hasInterface (const type_info &t) const
 Check if some Interface might exist.
 
 Intercube ()
 Constructor.
 
bool iterateInterfaces (const RefPtr< InterfaceIterationParameter > &IIP)
 Modifyable iterator.
 
void printInterfaces () const
 Debug function that prints the names of all interfaces.
 
void registerInterface (const type_info &t)
 Register an interface type; when the interface is actually required, the virtual createInterface() function will be called.
 
template<class InterfaceType >
void removeInterface ()
 Remove an interface.
 
void removeInterfaceBase (const type_info &InterfaceBaseID)
 Remove an interface.
 
virtual ~Intercube ()
 Destructor.
 

Additional Inherited Members

- Public Types inherited from Wizt::VParameter
using UserIterator = std::function< bool(const WeakPtr< VManagedObject > &TheUsingObject, const string &alias)>
 Iterator object that allows to inspect the objects that (might) be using the current VParameter under a given alias name.
 
- 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.
 
- Public Attributes inherited from Wizt::VParameter
int relevance = 0
 An optional setting to specify how relevant this parameter is for the entire scene.
 
- Protected Member Functions inherited from MemCore::ReferenceBase< ValueNotifierList >
virtual void extremeUnction ()
 A virtual function that will be called just before the object is destroyed.
 
ReferenceBaseoperator= (const ReferenceBase &R)
 Protected assignment operator (should not be called).
 
void suicide ()
 Delete this.
 
virtual ~ReferenceBase ()
 Virtual destructor.
 

Detailed Description

template<class Type>
class Wizt::VAbstractValueParameter< Type >

Making parameters for abstract values.

Parameters
Theabstract type, its VValue<Type> must export a Creator_t typename with a get() member function that provides access to the global instance of the abstract type.

Member Function Documentation

◆ createLocalVariable()

template<class Type >
RefPtr< VValueBase > Wizt::VAbstractValueParameter< Type >::createLocalVariable ( const RefPtr< ValuePool > &  GhostValues) const
inlineoverridevirtual

Create a variable that is local relative to the specified ValuePool.

The return value is false only if the specified pointer is invalid.

Implements Wizt::VParameter.