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

#include <ocean/plankton/VValue.hpp>

Inheritance diagram for Wizt::VComponentValue< Type, ComponentType >:
Wizt::VTypedValueBase< ComponentType > Wizt::VValueBase MemCore::ReferenceBase< VValueBase >

Public Member Functions

Ageableage ()
 Return the age of this value.
 
const Ageableage () const
 Return the age of this value, constant version.
 
RefPtr< VValueBasecopy () const override
 Create a copy of the respective value.
 
const type_info & getType () const override
 Implement the virtual function to query the type ID of this value.
 
bool getValue (ComponentType &Variable) const override
 Implement the virtual function to get the current value.
 
WeakPtr< VValueCreatorgetValueCreator () const override
 no value creator here
 
 operator ComponentType & ()
 Implicit type conversion allows modification of the associated value.
 
 operator const Type & () const
 Read-only retrieval of the associated value.
 
bool request (const VRequest &theRequest, double precision) override
 Ask to fullfill a request in a certain precision.
 
bool setValue (const ComponentType &Variable) override
 Implement the assignment of the current value.
 
bool setValueFromText (const string &s)
 Generic interface to set a value from a text.
 
RefPtr< VManagedObjectsource () override
 In case this object is memory-managed, return its container.
 
string Text () const
 Convert the value into some text, which is interpretable via setValueFromText().
 
 VComponentValue (const VComponentValue &V)
 Copy constructor: copies just the value, all reference pointing stuff is not duplicated.
 
 VComponentValue (const WeakPtr< ValueType > &V, ComponentType Type::*ValueMember)
 Construct a value from a given value instance.
 
- Public Member Functions inherited from Wizt::VTypedValueBase< ComponentType >
const type_info & getType () const override
 Implement the type information function.
 
bool isDifferentFrom (const WeakPtr< VValueBase, VValueBase > &V) const override
 Implement the comparison function from the VValueBase class utilizing the VValueCompareTrait type trait class.
 
 VTypedValueBase ()
 Default Constructor.
 
 VTypedValueBase (const Ageable &A, const VTypedValueBase &V)
 Copy constructor, takes care of exported members.
 
- Public Member Functions inherited from Wizt::VValueBase
VValueBasePtr_t component (const string &name) const
 Retrieve a certain component from a compound value.
 
int copyComponents (const VValueBase &ValueSource)
 Copy the components from another VValueBase.
 
virtual WeakPtr< InterfaceBasegetInterface () const
 In case this value refers to the interface of some VObject, then this function may return such.
 
virtual bool getValueFrom (const WeakVValueBasePtr_t &V)=0
 Copy or cast a value from a possibly compatible type.
 
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.
 
 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.
 
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 ComponentType>
class Wizt::VComponentValue< Type, ComponentType >
Todo:
Think hard whether tha VComponentValue shouldn't rather refer to VValueType<> instead of an VValue<Type>, because then we can described structures recursively as components of each other

Constructor & Destructor Documentation

◆ VComponentValue()

template<class Type , class ComponentType >
Wizt::VComponentValue< Type, ComponentType >::VComponentValue ( const VComponentValue< Type, ComponentType > &  V)
inline

Copy constructor: copies just the value, all reference pointing stuff is not duplicated.

Also, the age of the new object is recent.

Member Function Documentation

◆ getType()

template<class Type , class ComponentType >
const type_info & Wizt::VComponentValue< Type, ComponentType >::getType ( ) const
inlineoverridevirtual

Implement the virtual function to query the type ID of this value.

For this value, the type is fixed throughout its lifetime and corresponds to the type of the template argument.

Implements Wizt::VValueBase.

◆ getValue()

template<class Type , class ComponentType >
bool Wizt::VComponentValue< Type, ComponentType >::getValue ( ComponentType &  Variable) const
inlineoverridevirtual

Implement the virtual function to get the current value.

Returns
True on successfull retrieval, which is always the case in the default implementation of a stored value. However, derived values which implement a procedural value might return false here as well.
Parameters
VariableThe external storage space where to assign this value.

Implements Wizt::VTypedValueBase< ComponentType >.

◆ request()

template<class Type , class ComponentType >
bool Wizt::VComponentValue< Type, ComponentType >::request ( const VRequest theRequest,
double  precision 
)
inlineoverride

Ask to fullfill a request in a certain precision.

By default, this function does nothing, since the value to be computed is already stored here. However, since the function is virtual, a derived class might perform some actions here to compute the requested value.

Parameters
precisionA quality parameter in the range [0,1]. Lower values indicate that this function should return as fast as possible, while higher values indicate that accuracy is more important than execution time. With a value of 0.0, the function should return immediately, at 1.0 it should take as long as required to perform the requested operation as accurate as possible.

◆ setValue()

template<class Type , class ComponentType >
bool Wizt::VComponentValue< Type, ComponentType >::setValue ( const ComponentType &  Variable)
inlineoverridevirtual

Implement the assignment of the current value.

Parameters
VariableThe external storage space from where to assign this value.

Implements Wizt::VTypedValueBase< ComponentType >.

Referenced by Wizt::VComponentValue< Type, ComponentType >::setValueFromText().