Drag[en]gine Game Engine  1.0
deBaseInputModule Class Referenceabstract

Base Input Module. More...

#include <deBaseInputModule.h>

Inheritance diagram for deBaseInputModule:
deBaseModule

Public Member Functions

Constructors and Destructors
 deBaseInputModule (deLoadableModule &loadableModule)
 Create module. More...
 
virtual ~deBaseInputModule ()
 Clean up module. More...
 
Module Management
virtual bool Init ()=0
 Init the module. More...
 
virtual void CleanUp ()=0
 Clean up module. More...
 
Devices
virtual int GetDeviceCount ()=0
 Number of input devices. More...
 
virtual void GetDeviceAt (int index, deInputDevice &device)=0
 Information for input device at index. More...
 
virtual int IndexOfDeviceWithID (const char *id)=0
 Index of device with identifier or -1 if absent. More...
 
virtual int IndexOfButtonWithID (int device, const char *id)=0
 Index of button with identifier on device at index or -1 if absent. More...
 
virtual int IndexOfAxisWithID (int device, const char *id)=0
 Index of axis with identifier on device at index or -1 if absent. More...
 
virtual bool GetButtonPressed (int device, int button)=0
 Button at index on device at index is pressed down. More...
 
virtual float GetAxisValue (int device, int axis)=0
 Value of axis at index on device at index. More...
 
Events
virtual void ProcessEvents ()
 Check state of input devices. More...
 
virtual void ClearEvents ()
 Clear event queues in case any are used. More...
 
virtual void ScreenSizeChanged ()
 Screen size changed. More...
 
virtual void CaptureInputDevicesChanged ()
 Capture input devices changed. More...
 
virtual void AppActivationChanged ()
 Application activated or deactivated. More...
 
- Public Member Functions inherited from deBaseModule
 deBaseModule (deLoadableModule &loadableModule)
 Creates a new base module. More...
 
virtual ~deBaseModule ()
 Cleans up the base module. More...
 
virtual int GetParameterCount () const
 Retrieves the count of parameters. More...
 
virtual void GetParameterInfo (int index, deModuleParameter *parameter) const
 Retrieves the informations about the given indexec parameter. More...
 
virtual int FindParameter (const char *name) const
 Retrieves the index of the parameter with the given name or -1 if not found. More...
 
virtual float GetParameterValue (int index) const
 Retrieves the value of the parameter at the given index. More...
 
virtual void SetParameterValue (int index, float value)
 Sets the parameter of the parameter at the given index. More...
 
virtual void SendCommand (const decUnicodeArgumentList &command, decUnicodeString &answer)
 Sends a command to the module and retrieves an answer from it. More...
 
void LogInfo (const char *message)
 Outputs an information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Outputs a formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Outputs a formated information message on the console. More...
 
void LogWarn (const char *message)
 Outputs a warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Outputs a formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Outputs a formated warning message on the console. More...
 
void LogError (const char *message)
 Outputs an error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Outputs a formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Outputs a formated error message on the console. More...
 
void LogException (const deException &exception)
 Outputs an exception as error message on the console. More...
 
deEngineGetGameEngine () const
 Retrieves the game engine object. More...
 
deLoadableModuleGetLoadableModule () const
 Retrieves the loadable module. More...
 
deOSGetOS () const
 Retrieves the os object from the game engine. More...
 
deVirtualFileSystemGetVFS () const
 Retrieves the module virtual file system. More...
 
deErrorTracePointSetErrorTrace (const char *error, const char *sourceFunc, int sourceLine)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointSetErrorTrace (const deException &exception)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointAddErrorTracePoint (const char *sourceFunc, int sourceLine)
 Adds a new trace point to the engine error trace with an empty error. More...
 

Detailed Description

Base Input Module.

Constructor & Destructor Documentation

◆ deBaseInputModule()

deBaseInputModule::deBaseInputModule ( deLoadableModule loadableModule)

Create module.

◆ ~deBaseInputModule()

virtual deBaseInputModule::~deBaseInputModule ( )
virtual

Clean up module.

Member Function Documentation

◆ AppActivationChanged()

virtual void deBaseInputModule::AppActivationChanged ( )
virtual

Application activated or deactivated.

◆ CaptureInputDevicesChanged()

virtual void deBaseInputModule::CaptureInputDevicesChanged ( )
virtual

Capture input devices changed.

◆ CleanUp()

virtual void deBaseInputModule::CleanUp ( )
pure virtual

Clean up module.

◆ ClearEvents()

virtual void deBaseInputModule::ClearEvents ( )
virtual

Clear event queues in case any are used.

◆ GetAxisValue()

virtual float deBaseInputModule::GetAxisValue ( int  device,
int  axis 
)
pure virtual

Value of axis at index on device at index.

◆ GetButtonPressed()

virtual bool deBaseInputModule::GetButtonPressed ( int  device,
int  button 
)
pure virtual

Button at index on device at index is pressed down.

◆ GetDeviceAt()

virtual void deBaseInputModule::GetDeviceAt ( int  index,
deInputDevice device 
)
pure virtual

Information for input device at index.

◆ GetDeviceCount()

virtual int deBaseInputModule::GetDeviceCount ( )
pure virtual

Number of input devices.

◆ IndexOfAxisWithID()

virtual int deBaseInputModule::IndexOfAxisWithID ( int  device,
const char *  id 
)
pure virtual

Index of axis with identifier on device at index or -1 if absent.

◆ IndexOfButtonWithID()

virtual int deBaseInputModule::IndexOfButtonWithID ( int  device,
const char *  id 
)
pure virtual

Index of button with identifier on device at index or -1 if absent.

◆ IndexOfDeviceWithID()

virtual int deBaseInputModule::IndexOfDeviceWithID ( const char *  id)
pure virtual

Index of device with identifier or -1 if absent.

◆ Init()

virtual bool deBaseInputModule::Init ( )
pure virtual

Init the module.

Returns
true on success.
Note
To access the os object of the engine use the GetOS function.

◆ ProcessEvents()

virtual void deBaseInputModule::ProcessEvents ( )
virtual

Check state of input devices.

This function is called before any other frame related tasks are carried out. Record changes in devices states have to be recored into a game event reported as engine input events You are expected to check message and event queues to deliver system notification (like quitting the game) to the game engine.

◆ ScreenSizeChanged()

virtual void deBaseInputModule::ScreenSizeChanged ( )
virtual

Screen size changed.


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