SGRawValueFunctionsIndexed Class Template Reference

#include <props.hxx>

Inherits SGRawValue< T >.

List of all members.


Detailed Description

template<class T>
class SGRawValueFunctionsIndexed< T >

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 363 of file props.hxx.


Public Types

typedef T(* getter_t )(int)
typedef void(* setter_t )(int, T)

Public Member Functions

virtual SGRawValue< T > * clone () const
 Create a new deep copy of this raw value.
virtual T getValue () const
 Return the underlying value.
virtual bool setValue (T value)
 Assign a new underlying value.
 SGRawValueFunctionsIndexed (int index, getter_t getter=0, setter_t setter=0)

Member Function Documentation

virtual SGRawValue<T>* clone (  )  const [inline, virtual]

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

Returns:
A deep copy of the current object.

Implements SGRawValue.

Definition at line 379 of file props.hxx.

virtual T getValue (  )  const [inline, virtual]

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

Implements SGRawValue.

Definition at line 371 of file props.hxx.

virtual bool setValue ( value  )  [inline, virtual]

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.

Definition at line 375 of file props.hxx.


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

Generated on Tue May 26 00:55:08 2009 for JSBSim Flight Dynamics Model by  doxygen 1.5.5