SGRawValueFunctionsIndexed< T > Class Template Reference

An indexed value bound to static functions. More...

#include <props.hxx>

Inheritance diagram for SGRawValueFunctionsIndexed< T >:

SGRawValue< T >

List of all members.

Public Member Functions

virtual T getValue () const
 Return the underlying value.
virtual bool setValue (T value)
 Assign a new underlying value.
virtual SGRawValue< T > * clone () const
 Create a new deep copy of this raw value.


Detailed Description

template<class T>
class SGRawValueFunctionsIndexed< T >

An indexed value bound to static functions.

A read-only value will not have a setter; a write-only value will not have a getter. An indexed value is useful for binding one of a list of possible values (such as multiple engines for a plane). The index is hard-coded at creation time.

See also:
SGRawValue

Definition at line 346 of file props.hxx.


Member Function Documentation

template<class T>
virtual T SGRawValueFunctionsIndexed< T >::getValue (  )  const [inline, virtual]

Return the underlying value.

Returns:
The actual value for the property.
See also:
setValue

Implements SGRawValue< T >.

Definition at line 354 of file props.hxx.

template<class T>
virtual bool SGRawValueFunctionsIndexed< T >::setValue ( value  )  [inline, virtual]

Assign a new underlying value.

If the new value cannot be set (because this is a read-only raw value, or because the new value is not acceptable for some reason) this method returns false and leaves the original value unchanged.

Parameters:
value The actual value for the property.
Returns:
true if the value was set successfully, false otherwise.
See also:
getValue

Implements SGRawValue< T >.

Definition at line 358 of file props.hxx.

template<class T>
virtual SGRawValue<T>* SGRawValueFunctionsIndexed< T >::clone (  )  const [inline, virtual]

Create a new deep copy of this raw value.

The copy will contain its own version of the underlying value as well.

Returns:
A deep copy of the current object.

Implements SGRawValue< T >.

Definition at line 362 of file props.hxx.


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

Generated on Thu Dec 18 15:17:28 2008 for SimGear by  doxygen 1.5.6