SGBinding Class Reference

An input binding of some sort. More...

#include <SGBinding.hxx>

Inheritance diagram for SGBinding:
SGConditional SGReferenced

List of all members.

Public Member Functions

 SGBinding ()
 Default constructor.
 SGBinding (const SGPropertyNode *node, SGPropertyNode *root)
 Convenience constructor.
virtual ~SGBinding ()
 Destructor.
const string & getCommandName () const
 Get the command name.
SGCommandMgr::command_t getCommand () const
 Get the command itself.
const SGPropertyNodegetArg ()
 Get the argument that will be passed to the command.
void read (const SGPropertyNode *node, SGPropertyNode *root)
 Read a binding from a property node.
void fire () const
 Fire a binding.
void fire (double offset, double max) const
 Fire a binding with a scaled movement (rather than absolute position).
void fire (double setting) const
 Fire a binding with a setting (i.e.

Detailed Description

An input binding of some sort.

This class represents a binding that can be assigned to a keyboard key, a joystick button or axis, or even a panel instrument.

Definition at line 32 of file SGBinding.hxx.


Constructor & Destructor Documentation

SGBinding::SGBinding ( const SGPropertyNode node,
SGPropertyNode root 
)

Convenience constructor.

Parameters:
node The binding will be built from this node.

Definition at line 26 of file SGBinding.cxx.


Member Function Documentation

void SGBinding::fire ( double  setting  )  const

Fire a binding with a setting (i.e.

joystick axis).

A double 'setting' property will be added to the arguments.

Parameters:
setting The input setting, usually between -1.0 and 1.0.

Definition at line 82 of file SGBinding.cxx.

const SGPropertyNode* SGBinding::getArg (  )  [inline]

Get the argument that will be passed to the command.

Returns:
A property node that will be passed to the command as its argument, or 0 if none was supplied.

Definition at line 79 of file SGBinding.hxx.

SGCommandMgr::command_t SGBinding::getCommand (  )  const [inline]

Get the command itself.

Returns:
The command associated with this binding, or 0 if none is present.

Definition at line 70 of file SGBinding.hxx.

const string& SGBinding::getCommandName (  )  const [inline]

Get the command name.

Returns:
The string name of the command for this binding.

Definition at line 61 of file SGBinding.hxx.

void SGBinding::read ( const SGPropertyNode node,
SGPropertyNode root 
)

Read a binding from a property node.

Parameters:
node The property node containing the binding.

Definition at line 41 of file SGBinding.cxx.


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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1