SGRawValuePointer< T > Class Template Reference

A raw value bound to a pointer. More...

#include <props.hxx>

Inheritance diagram for SGRawValuePointer< T >:
SGRawValue< T >

List of all members.

Public Member Functions

 SGRawValuePointer (T *ptr)
 Explicit pointer constructor.
virtual ~SGRawValuePointer ()
 Destructor.
virtual T getValue () const
 Get the underlying value.
virtual bool setValue (T value)
 Set the underlying value.
virtual SGRawclone () const
 Create a copy of this raw value.

Detailed Description

template<class T>
class SGRawValuePointer< T >

A raw value bound to a pointer.

This is the most efficient way to tie an external value, but also the most dangerous, because there is no way for the supplier to perform bounds checking and derived calculations except by polling the variable to see if it has changed. There is no default constructor, because this class would be meaningless without a pointer.

Definition at line 396 of file props.hxx.


Constructor & Destructor Documentation

template<class T >
SGRawValuePointer< T >::SGRawValuePointer ( T *  ptr  )  [inline]

Explicit pointer constructor.

Create a new raw value bound to the value of the variable referenced by the pointer.

Parameters:
ptr The pointer to the variable to which this raw value will be bound.

Definition at line 409 of file props.hxx.


Member Function Documentation

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

Create a copy of this raw value.

The copy will use the same external pointer as the original.

Definition at line 437 of file props.hxx.

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

Get the underlying value.

This method will dereference the pointer and return the variable's value.

Implements SGRawValue< T >.

Definition at line 422 of file props.hxx.

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

Set the underlying value.

This method will dereference the pointer and change the variable's value.

Implements SGRawValue< T >.

Definition at line 430 of file props.hxx.


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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1