|
The Vish Visualization Shell 0.3
Vish
|
Abstract base class for values which are used as input types, e.g. More...
#include <ocean/plankton/VValueBase.hpp>
Public Member Functions | |
| virtual const Ageable & | age () const =0 |
| Constant read-only version to the age. | |
| virtual Ageable & | age ()=0 |
| Return the age of this value, i.e. | |
| VValueBasePtr_t | component (const string &name) const |
| Retrieve a certain component from a compound value. | |
| virtual VValueBasePtr_t | copy () const =0 |
| Create a copy by value of this data variable. | |
| int | copyComponents (const VValueBase &ValueSource) |
| Copy the components from another VValueBase. | |
| virtual RefPtr< ChunkBase > | getChunk (size_t N=1) const =0 |
| Create an array of type instances filled with values of the given count. | |
| virtual WeakPtr< InterfaceBase > | getInterface () const |
| In case this value refers to the interface of some VObject, then this function may return such. | |
| virtual const type_info & | getType () const =0 |
| Retrieve the type info of this value. | |
| virtual WeakPtr< VValueCreator > | getValueCreator () const =0 |
| Return the associated value creator. | |
| virtual bool | getValueFrom (const WeakVValueBasePtr_t &V)=0 |
| Copy or cast a value from a possibly compatible type. | |
| virtual bool | isDifferentFrom (const WeakPtr< VValueBase, VValueBase > &V) const =0 |
| Compare two values. | |
| int | iterate (ComponentIterator &CI) const |
| Find out which components are contained in the certain compound type. | |
| size_t | nComponents () const |
| How many components are available here? | |
| bool | operator!= (const VValueBase &V) const |
| Test for inequality. | |
| bool | operator!= (const WeakPtr< VValueBase, VValueBase > &V) const |
| Compare for equality with a value. | |
| bool | operator== (const VValueBase &V) const |
| Test for equality. | |
| virtual bool | setSource (const WeakPtr< VManagedObject > &Owner) |
| For special values which refer to the interface of another object, this function may allow to set another source for referencing such an interface. | |
| virtual bool | setValueFromText (const string &s)=0 |
| Generic interface to set a value from a text. | |
| virtual RefPtr< VManagedObject > | source ()=0 |
| This value might be related to some other object and for instance be part of a structure instead of a variable by its own. | |
| virtual string | Text () const =0 |
| Convert the value into some text, which is interpretable via setValueFromText(). | |
| VValueBase () | |
| Default Constructor. | |
| VValueBase (const VValueBase &) | |
| Copy Constructor. | |
| ~VValueBase () | |
| Destructor. | |
Public Member Functions inherited from MemCore::ReferenceBase< VValueBase > | |
| auto | getObjectCountID () const noexcept |
| Get a unique ID for this object in the given domain. | |
| bool | isIdentical (const WeakPtr< VValueBase, VValueBase > &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 (VValueBase *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< VValueBase > | |
| using | reference_domain_t = VValueBase |
| The type of the base class. | |
| using | SelfPtr_t = WeakPtr< VValueBase, VValueBase > |
| Type for a pointer to this object itself. | |
Protected Member Functions inherited from MemCore::ReferenceBase< VValueBase > | |
| 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. | |
Abstract base class for values which are used as input types, e.g.
integer numbers or floats. The reduction to a specific type has to be done via instances of the template child class VTypedValue<Type>.
| Wizt::VValueBase::VValueBase | ( | const VValueBase & | VB | ) |
Copy Constructor.
Note that components are not copied, we still need to call copyComponents() from the source value.
|
pure virtual |
Return the age of this value, i.e.
when was it modified the last time?
Implemented in Wizt::VComponentValue< Type, ComponentType >, Wizt::VAbstractValue< Type >, Wizt::VAbstractValue< VSocketAction >, Wizt::VValue< VThreadManager >, Wizt::VValue< Type >, Wizt::VValue< MemCore::StrongPtr >, and Wizt::VValue< Wizt::VThreadManager >.
|
pure virtual |
Create a copy by value of this data variable.
Note that the resulting type is not necessarily the same as the source type. In particular, if the source type refers to a member variable of a structure, then the resulting copied type will be a independent variable with no relation to the original data structure. This situation can be checked by inspecting the source() member function.
Implemented in Wizt::VAbstractValue< Type >, Wizt::VAbstractValue< VSocketAction >, Wizt::VValue< VThreadManager >, Wizt::VValue< Type >, Wizt::VValue< MemCore::StrongPtr >, Wizt::VValue< Wizt::VThreadManager >, and Wizt::VComponentValue< Type, ComponentType >.
|
inline |
Copy the components from another VValueBase.
This is usually done only in the constructor of derived classes. Note that it cannot be called in the base class destructor because the getType() function is still pure virtual there. It can only be called in child classes of VValueBase where the getType() function is already implemented.
Referenced by Wizt::VTypedValueBase< Type >::VTypedValueBase().
|
virtual |
In case this value refers to the interface of some VObject, then this function may return such.
Otherwise, for usual values, it is just a null pointer.
|
pure virtual |
Return the associated value creator.
Mostly used to enforce creation of static class members in the derived class, because implementations of virtual functions must not be optimized away by the compiler.
Implemented in Wizt::VAbstractValue< Type >, Wizt::VAbstractValue< VSocketAction >, Wizt::VValue< VThreadManager >, Wizt::VValue< Type >, Wizt::VValue< MemCore::StrongPtr >, Wizt::VValue< Wizt::VThreadManager >, and Wizt::VComponentValue< Type, ComponentType >.
|
inline |
Find out which components are contained in the certain compound type.
|
inline |
Compare for equality with a value.
If the pointer is invalid, it will always be considered unrequal.
|
virtual |
For special values which refer to the interface of another object, this function may allow to set another source for referencing such an interface.
Note that the interface itself will not be stored, just some type information is remembered. As such, the interface will always be dynamically queried from the source.
|
pure virtual |
This value might be related to some other object and for instance be part of a structure instead of a variable by its own.
If so, this function will return the owner of this value, i.e. its source.
Implemented in Wizt::VAbstractValue< Type >, Wizt::VAbstractValue< VSocketAction >, Wizt::VValue< VThreadManager >, Wizt::VValue< Type >, Wizt::VValue< MemCore::StrongPtr >, Wizt::VValue< Wizt::VThreadManager >, and Wizt::VComponentValue< Type, ComponentType >.