VISH
0.2
|
Abstract base class for values which are used as input types, e.g. More...
#include </home/werner/origo/vish/ocean/plankton/VValueBase.hpp>
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.
virtual Ageable& Wizt::VValueBase::age | ( | ) | [pure virtual] |
Return the age of this value, i.e.
when was it modified the last time?
virtual RefPtr<VValueBase> Wizt::VValueBase::copy | ( | ) | const [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.
int Wizt::VValueBase::copyComponents | ( | const VValueBase & | source | ) | [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.
WeakPtr< InterfaceBase > Wizt::VValueBase::getInterface | ( | ) | const [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.
virtual WeakPtr<VValueCreator> Wizt::VValueBase::getValueCreator | ( | ) | const [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.
int Wizt::VValueBase::iterate | ( | ComponentIterator & | CI | ) | const [inline] |
Find out which components are contained in the certain compound type.
bool Wizt::VValueBase::setSource | ( | const WeakPtr< VManagedObject > & | Owner | ) | [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.
virtual RefPtr<VManagedObject> Wizt::VValueBase::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.