VISH
0.2
|
A typed value with storage within the class. More...
#include </home/werner/origo/vish/ocean/plankton/VValue.hpp>
A typed value with storage within the class.
For most purposes this will do.
A value of certain type (int, float, user-defined opaque type, ...) may be a self-standing entity like an ordinal variable definition in C++. It may also be a component of another variable that is a structure of basic types, like a vector which consists of three components {x,y,z} of type float. The components of such a structured object may also be used as input value via referencing its elements. For this purpose class VObjectComponent provides a value which is part of a VObject.
Type | The used type; it must provide copy and assigment operations. |
Wizt::VValue::VValue | ( | const Type & | V | ) | [inline] |
Construct a value from a given value instance.
No members will be exported for a compound type.
Wizt::VValue::VValue | ( | const VValue & | V | ) | [inline] |
Copy constructor: copies just the value, all reference pointing stuff is not duplicated.
Also, the age of the new object is recent.
Exported members from the source type will be exported here as well.
Wizt::VValue::VValue | ( | const string & | Textvalue, |
bool & | ok | ||
) | [inline] |
Create from string, used by the TypedValueCreator<>
ok | A flag telling whether the given string could be parsed correctly. |
override const type_info& Wizt::VValue::getType | ( | ) | const [inline] |
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.
Reimplemented from Wizt::VTypedValueBase< Type >.
override bool Wizt::VValue::getValue | ( | Type & | Variable | ) | const [inline, virtual] |
Implement the virtual function to get the current value.
Variable | The external storage space where to assign this value. |
Implements Wizt::VTypedValueBase< Type >.
override WeakPtr<VValueCreator> Wizt::VValue::getValueCreator | ( | ) | const [inline] |
Implementation of the function providing the associated value creator.
Accessing the static member object enforces creation of this static class member, thus registration of the value creators in the registry.
override bool Wizt::VValue::getValueFrom | ( | const WeakPtr< VValueBase > & | V | ) | [inline] |
Implement the generic copy of a value.
Some derived class may also implement type conversions when the Type template parameter does not match exactly. E.g. a cast from float to int or vice versa might be done through this interface.
override bool Wizt::VValue::request | ( | const VRequest & | request, |
double | precision | ||
) | [inline] |
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.
precision | A 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. |
override bool Wizt::VValue::setValue | ( | const Type & | Variable | ) | [inline, virtual] |
Implement the assignment of the current value.
Variable | The external storage space from where to assign this value. |
Implements Wizt::VTypedValueBase< Type >.