X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2FFGEventInput.hxx;h=c62a77aae0bad8deed54593c6b23107b6302508d;hb=3d4806adbe6705f785fd950bd4b4afde1cb4f8d2;hp=7188c83813f112d844e0d2afae40a27c09465d34;hpb=5edbb79ec7474e30fd6ae43c085938436b06d7fc;p=flightgear.git diff --git a/src/Input/FGEventInput.hxx b/src/Input/FGEventInput.hxx index 7188c8381..c62a77aae 100644 --- a/src/Input/FGEventInput.hxx +++ b/src/Input/FGEventInput.hxx @@ -24,6 +24,9 @@ #define __FGEVENTINPUT_HXX #include "FGCommonInput.hxx" + +#include + #include "FGButton.hxx" #include "FGDeviceConfigurationMap.hxx" #include @@ -57,7 +60,7 @@ protected: }; typedef SGSharedPtr FGEventSetting_ptr; -typedef vector setting_list_t; +typedef std::vector setting_list_t; /* * A wrapper class for a configured event. @@ -99,12 +102,12 @@ public: /* * access for the name property */ - string GetName() const { return name; } + std::string GetName() const { return name; } /* * access for the description property */ - string GetDescription() const { return desc; } + std::string GetDescription() const { return desc; } virtual void update( double dt ); @@ -113,10 +116,10 @@ public: protected: virtual void fire( SGBinding * binding, FGEventData & eventData ); /* A more or less meaningfull description of the event */ - string desc; + std::string desc; /* One of the predefined names of the event */ - string name; + std::string name; /* A list of SGBinding objects */ binding_list_t bindings[KEYMOD_MAX]; @@ -184,7 +187,7 @@ typedef class SGSharedPtr FGInputEvent_ptr; class FGInputDevice : public SGReferenced { public: FGInputDevice() : debugEvents(false), grab(false) {} - FGInputDevice( string aName ) : name(aName) {} + FGInputDevice( std::string aName ) : name(aName), debugEvents(false), grab(false) {} virtual ~FGInputDevice(); @@ -193,15 +196,15 @@ public: virtual void Send( const char * eventName, double value ) = 0; - inline void Send( const string & eventName, double value ) { + inline void Send( const std::string & eventName, double value ) { Send( eventName.c_str(), value ); } virtual const char * TranslateEventName( FGEventData & eventData ) = 0; - void SetName( string name ); - string & GetName() { return name; } + void SetName( std::string name ); + std::string & GetName() { return name; } void HandleEvent( FGEventData & eventData ); @@ -218,14 +221,14 @@ public: bool GetGrab() const { return grab; } - const string & GetNasalModule() const { return nasalModule; } + const std::string & GetNasalModule() const { return nasalModule; } private: // A map of events, this device handles - map handledEvents; + std::map handledEvents; // the device has a name to be recognized - string name; + std::string name; // print out events comming in from the device // if true @@ -236,7 +239,7 @@ private: bool grab; SGPropertyNode_ptr deviceNode; - string nasalModule; + std::string nasalModule; }; typedef SGSharedPtr FGInputDevice_ptr; @@ -261,7 +264,7 @@ protected: unsigned AddDevice( FGInputDevice * inputDevice ); void RemoveDevice( unsigned index ); - map input_devices; + std::map input_devices; FGDeviceConfigurationMap configMap; SGPropertyNode_ptr nasalClose;