VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtJoystickFunctionEnableHandler Class Referenceabstract

Handler that will manage the objects that are taken control of for joystick controls and process the events to apply to them via the joystickFunctionFired() pure method.

Inheritance diagram for makVrv::DtJoystickFunctionEnableHandler:
Inheritance graph
[legend]

Classes

struct  ControlStatus
 
struct  ControlStruct
 

Public Member Functions

 DtJoystickFunctionEnableHandler (DtDe &)
 
virtual ~DtJoystickFunctionEnableHandler () override
 
virtual bool gameControllerEvent (DtGenericControllerEvent *) override
 
virtual void tick (bool sentEvents) override
 
virtual void gameControllerDeviceRemoved (int) override
 
virtual void gameControllerDeviceAdded (int) override
 
virtual bool enableJoystickFunctions (const std::string &configuration, const std::set< std::string > &functionalGroups, std::set< std::string > &enabled)
 
virtual bool inControlOfConfiguration (const std::string &configuration) const
 
virtual bool disableJoystickFunctions (const std::set< std::string > &functionalGroups, std::set< std::string > &disabled)
 
virtual std::set< std::string > controlledFunctionGroups () const
 
virtual bool canFunctionGroupBeAssigned (const std::string &functionGroup) const
 
virtual bool eventActive (DtGenericControllerEvent *sdlEvent) const
 
virtual bool canProcessEvent (DtGenericControllerEvent *sdlEvent) const override
 
virtual bool anyFunctionGroupsActive () const
 
virtual void releaseAllControllerInformation ()
 
- Public Member Functions inherited from makVrv::DtGameControllerEventHandler
 DtGameControllerEventHandler ()
 
virtual ~DtGameControllerEventHandler ()
 

Protected Types

typedef std::vector
< ControlStatus
ControlStatusVector
 
typedef std::map< std::string,
ControlStatusVector
ControlStatusMap
 
typedef std::map< int,
ControlStatusMap
ControlledDevices
 
typedef std::unordered_map
< std::string, ControlStruct
InControlOf
 
typedef std::map< int,
std::map< int, int > > 
LastJoystickAxisValue
 
typedef std::unordered_map
< DtGameControlProcessor
*, std::pair< ControlStatus,
DtGenericControllerEvent * > > 
RepeatQueue
 

Protected Member Functions

virtual bool filterGameControllerEvent (DtGenericControllerEvent *) override
 
virtual bool isFunctionGroupActive (const std::string &configuration, const std::string &) const
 
virtual void activateFunctionGroup (const std::string &configuration, const std::string &)
 
virtual void deactivateFunctionGroup (const std::string &configuration, const std::string &)
 
virtual void switchControlOfFunction (const std::string &configuration, const std::string &functionGroup)
 
virtual void noQueuedEvents () override
 
virtual void gameControlInformationAdded (const std::string &configuration, const std::string &functionGroup, const std::string &function, const DtGameControlInformation &i) override
 
virtual bool joystickFunctionFired (const std::string &functionGroup, const std::string &function, double value, bool repeat, bool valueChanged)=0
 

Protected Attributes

ControlledDevices myControlledDevices
 
InControlOf myInControlOf
 
DtJoystickManagermyJoystickManager
 
DtSignalConnectionManager myConnections
 
LastJoystickAxisValue myLastJoystickAxisValue
 
RepeatQueue myRepeatQueue
 
DtDemyDe
 

Member Typedef Documentation

Devices that are controlled and their current status.

By function group.

typedef std::unordered_map<std::string, ControlStruct> makVrv::DtJoystickFunctionEnableHandler::InControlOf
protected

Configurations that are controlled and their current switch status.

Queue of funcutons that wish to get a repeat of an event if that event is not triggered (such as a button press)

Constructor & Destructor Documentation

makVrv::DtJoystickFunctionEnableHandler::DtJoystickFunctionEnableHandler ( DtDe )

CTOR.

virtual makVrv::DtJoystickFunctionEnableHandler::~DtJoystickFunctionEnableHandler ( )
overridevirtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtJoystickFunctionEnableHandler::gameControllerEvent ( DtGenericControllerEvent )
overridevirtual

Return true to handle the event and not allow other events to handle.

Implements makVrv::DtGameControllerEventHandler.

virtual void makVrv::DtJoystickFunctionEnableHandler::tick ( bool  sentEvents)
overridevirtual

Called after game controller events are processed in any given tick. If sentEvents is true some game controller event was sent this tick.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual void makVrv::DtJoystickFunctionEnableHandler::gameControllerDeviceRemoved ( int  )
overridevirtual

Called when a game controller device is removed.

Reimplemented from makVrv::DtGameControllerEventHandler.

Reimplemented in makVrf::DtVrfGuiJoystickControlHandler.

virtual void makVrv::DtJoystickFunctionEnableHandler::gameControllerDeviceAdded ( int  )
overridevirtual

Called when a game controller device is added.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual bool makVrv::DtJoystickFunctionEnableHandler::enableJoystickFunctions ( const std::string &  configuration,
const std::set< std::string > &  functionalGroups,
std::set< std::string > &  enabled 
)
virtual

Enables the joystick function for handling via this handler, if not already enabled. If not already, will increase lock count of joystick manager for changes. The last parameter will contain the list of functions enabled.

virtual bool makVrv::DtJoystickFunctionEnableHandler::inControlOfConfiguration ( const std::string &  configuration) const
virtual

Whether or not this handler is in control of the configuration.

virtual bool makVrv::DtJoystickFunctionEnableHandler::disableJoystickFunctions ( const std::set< std::string > &  functionalGroups,
std::set< std::string > &  disabled 
)
virtual

Disables the joystick functions, if enabled. If no functions are controlled will decrease lock count on joystick manager. If no function groups are given all controlled groups are cleared.

virtual std::set<std::string> makVrv::DtJoystickFunctionEnableHandler::controlledFunctionGroups ( ) const
virtual

Function groups currently controlled.

virtual bool makVrv::DtJoystickFunctionEnableHandler::canFunctionGroupBeAssigned ( const std::string &  functionGroup) const
virtual

Returns true if this function group is not already in control of something.

virtual bool makVrv::DtJoystickFunctionEnableHandler::eventActive ( DtGenericControllerEvent sdlEvent) const
virtual

Returns true if this event is active in any game processor.

virtual bool makVrv::DtJoystickFunctionEnableHandler::canProcessEvent ( DtGenericControllerEvent sdlEvent) const
overridevirtual

Returns true if the event can be processed by any of the game processors.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual bool makVrv::DtJoystickFunctionEnableHandler::anyFunctionGroupsActive ( ) const
virtual

Returns true if there are any function groups active.

virtual void makVrv::DtJoystickFunctionEnableHandler::releaseAllControllerInformation ( )
virtual

Releases control of all used configuration and function groups.

virtual bool makVrv::DtJoystickFunctionEnableHandler::filterGameControllerEvent ( DtGenericControllerEvent )
overrideprotectedvirtual

Return true to filter this Game controller Event.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual bool makVrv::DtJoystickFunctionEnableHandler::isFunctionGroupActive ( const std::string &  configuration,
const std::string &   
) const
protectedvirtual

Returns true if this function group is active. This will return true if any function within the group is active.

virtual void makVrv::DtJoystickFunctionEnableHandler::activateFunctionGroup ( const std::string &  configuration,
const std::string &   
)
protectedvirtual

Will activate all functions within the function group.

virtual void makVrv::DtJoystickFunctionEnableHandler::deactivateFunctionGroup ( const std::string &  configuration,
const std::string &   
)
protectedvirtual

Will deactivate all functions within the function group.

virtual void makVrv::DtJoystickFunctionEnableHandler::switchControlOfFunction ( const std::string &  configuration,
const std::string &  functionGroup 
)
protectedvirtual
virtual void makVrv::DtJoystickFunctionEnableHandler::noQueuedEvents ( )
overrideprotectedvirtual

Called when there were events but now there are no longer queued events.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual void makVrv::DtJoystickFunctionEnableHandler::gameControlInformationAdded ( const std::string &  configuration,
const std::string &  functionGroup,
const std::string &  function,
const DtGameControlInformation i 
)
overrideprotectedvirtual

Called when game controller information is added or updated for the given configuration, function group and function. Update game control information if controlled.

Reimplemented from makVrv::DtGameControllerEventHandler.

virtual bool makVrv::DtJoystickFunctionEnableHandler::joystickFunctionFired ( const std::string &  functionGroup,
const std::string &  function,
double  value,
bool  repeat,
bool  valueChanged 
)
protectedpure virtual

Called when a game control processor fires off. Implement this to do something with the given function group, function and value of the processor. Return false to continue to look for another handler which might implement this event. Value changed will be true if the value has changed from the last period.

Implemented in makVrf::DtVrfGuiJoystickControlHandler, and makVrv::DtJoystickObserverControl.

Member Data Documentation

ControlledDevices makVrv::DtJoystickFunctionEnableHandler::myControlledDevices
protected
InControlOf makVrv::DtJoystickFunctionEnableHandler::myInControlOf
protected
DtJoystickManager& makVrv::DtJoystickFunctionEnableHandler::myJoystickManager
protected
DtSignalConnectionManager makVrv::DtJoystickFunctionEnableHandler::myConnections
protected
LastJoystickAxisValue makVrv::DtJoystickFunctionEnableHandler::myLastJoystickAxisValue
protected
RepeatQueue makVrv::DtJoystickFunctionEnableHandler::myRepeatQueue
protected
DtDe& makVrv::DtJoystickFunctionEnableHandler::myDe
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)