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

Base class for values with type. More...

#include <ocean/plankton/VValue.hpp>

Inheritance diagram for Wizt::VTypedValueBase< Type >:
Wizt::VValueBase MemCore::ReferenceBase< VValueBase > Wizt::VAbstractValue< VSocketAction > Wizt::VValue< Wizt::VThreadManager > Wizt::VValue< MemCore::StrongPtr > Wizt::VAbstractValue< Type > Wizt::VValue< Type > Wizt::VValue< VSocketAction >

Public Member Functions

RefPtr< ChunkBasegetChunk (size_t N) const override
 Create an array of type instances filled with values of the given count.
 
const type_info & getType () const override
 Implement the type information function.
 
virtual bool getValue (Type &Variable) const =0
 Abstract interface to set the value of a variable from the type stored here.
 
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
virtual const Ageableage () const =0
 Constant read-only version to the age.
 
virtual Ageableage ()=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 WeakPtr< InterfaceBasegetInterface () const
 In case this value refers to the interface of some VObject, then this function may return such.
 
virtual WeakPtr< VValueCreatorgetValueCreator () 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.
 
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< VManagedObjectsource ()=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.
 
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::VTypedValueBase< Type >

Base class for values with type.

It does not yet specify a storage place but allows reading and setting a typed value. Procedural value types may be derived from this base class. For storing a specific type, use child class VValue<Type>.

Todo:
Consider whether this shouldn't better be an interface. Then, a certain type may implement multiple type conversions, e.g. from float to int.