VISH  0.2
Public Member Functions

A typed value with storage within the class. More...

#include </home/werner/origo/vish/ocean/plankton/VValue.hpp>

List of all members.

Public Member Functions


Detailed Description

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.

Parameters:
TypeThe used type; it must provide copy and assigment operations.
See also:
VObjectComponent for an alternative implementation referring to class members within an VObject.

Constructor & Destructor Documentation

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<>

Parameters:
okA flag telling whether the given string could be parsed correctly.

Member Function Documentation

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.

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< 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.

Returns:
false, if the parameter could not be used for conversion.
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.

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.
override bool Wizt::VValue::setValue ( const Type &  Variable) [inline, virtual]

Implement the assignment of the current value.

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

Implements Wizt::VTypedValueBase< Type >.


The documentation for this class was generated from the following file: