Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Public Attributes | Private Member Functions | List of all members
orxonox::Button Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/input/Button.h>

Inheritance diagram for orxonox::Button:
orxonox::HalfAxis

Public Member Functions

 Button ()
 
virtual ~Button ()
 
virtual bool addParamCommand (ParamCommand *command)
 
virtual void clear ()
 
bool execute (KeybindMode::Value mode, float abs=1.0f, float rel=1.0f)
 
void parse (const std::string &binding)
 
void readBinding (ConfigFile *configFile, ConfigFile *fallbackFile)
 
void setBinding (ConfigFile *configFile, ConfigFile *fallbackFile, const std::string &binding, bool bTemporary)
 

Public Attributes

bool bButtonThresholdUser_
 
std::string bindingString_
 The configured string value. More...
 
float buttonThreshold_
 Says how much it takes for an analog axis to trigger a button Note: This variable is here to have only one parse() function. More...
 
BaseCommand ** commands_ [3]
 Basic commands for OnPress, OnHold and OnRelease. More...
 
std::string groupName_
 Name of the group of input triggers. More...
 
std::string name_
 Name of the trigger as strings. More...
 
unsigned int nCommands_ [3]
 Number of basic commands. More...
 
std::vector< BufferedParamCommand * > * paramCommandBuffer_
 Pointer to the list of parametrised commands. More...
 

Private Member Functions

void addCommand (BaseCommand *cmd, KeybindMode::Value mode, std::vector< BaseCommand * > commands[3])
 
void parseError (const std::string &message, bool serious)
 

Constructor & Destructor Documentation

orxonox::Button::Button ( )
Note
bButtonThresholdUser_: We set it to true so that setConfigValues in KeyBinder sets the value correctly the first time. It is then set to false first and changed later in Button::parse().
orxonox::Button::~Button ( )
virtual

Member Function Documentation

void orxonox::Button::addCommand ( BaseCommand cmd,
KeybindMode::Value  mode,
std::vector< BaseCommand * >  commands[3] 
)
inlineprivate
virtual bool orxonox::Button::addParamCommand ( ParamCommand command)
inlinevirtual

Reimplemented in orxonox::HalfAxis.

void orxonox::Button::clear ( )
virtual

Reimplemented in orxonox::HalfAxis.

bool orxonox::Button::execute ( KeybindMode::Value  mode,
float  abs = 1.0f,
float  rel = 1.0f 
)
inline
void orxonox::Button::parse ( const std::string &  binding)
void orxonox::Button::parseError ( const std::string &  message,
bool  serious 
)
inlineprivate
void orxonox::Button::readBinding ( ConfigFile configFile,
ConfigFile fallbackFile 
)
void orxonox::Button::setBinding ( ConfigFile configFile,
ConfigFile fallbackFile,
const std::string &  binding,
bool  bTemporary 
)

Member Data Documentation

bool orxonox::Button::bButtonThresholdUser_
std::string orxonox::Button::bindingString_

The configured string value.

float orxonox::Button::buttonThreshold_

Says how much it takes for an analog axis to trigger a button Note: This variable is here to have only one parse() function.

BaseCommand** orxonox::Button::commands_[3]

Basic commands for OnPress, OnHold and OnRelease.

std::string orxonox::Button::groupName_

Name of the group of input triggers.

std::string orxonox::Button::name_

Name of the trigger as strings.

unsigned int orxonox::Button::nCommands_[3]

Number of basic commands.

std::vector<BufferedParamCommand*>* orxonox::Button::paramCommandBuffer_

Pointer to the list of parametrised commands.


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