PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PJoystick Class Referenceabstract

#include <PJoystick.h>

Inheritance diagram for PJoystick:
PDevice PEBLObjectBase PlatformJoystick PlatformJoystick

Public Member Functions

 PJoystick ()
 The Standard constructor.

 
virtual ~PJoystick ()
 The Standard destructor.

 
int GetNumHats ()
 
int GetNumBalls ()
 
int GetNumAxes ()
 
int GetNumButtons ()
 
virtual signed int GetHatState (unsigned int hat)=0
 
virtual Variant GetBallState (unsigned int ball)=0
 
virtual signed int GetAxisState (unsigned int axis)=0
 
virtual signed int GetButtonState (unsigned int button)=0
 
- Public Member Functions inherited from PDevice
 PDevice ()
 The Standard constructor.
 
virtual ~PDevice ()
 The Standard destructor.
 
virtual PEBL_DEVICE_TYPE GetDeviceType ()
 
virtual int GetState (int iface) const
 
- Public Member Functions inherited from PEBLObjectBase
 PEBLObjectBase ()
 Standard Constructor.
 
 PEBLObjectBase (ComplexDataType cdt)
 Standard Constructor.
 
 PEBLObjectBase (const PEBLObjectBase &pob)
 
virtual ~PEBLObjectBase ()
 Standard Destructor.
 
virtual bool InitializeProperty (std::string name, Variant v)
 
virtual bool SetProperty (std::string name, Variant v)
 
Variant GetProperty (std::string) const
 
virtual ObjectValidationError ValidateProperty (std::string, Variant v) const
 
virtual ObjectValidationError ValidateProperty (std::string) const
 
ComplexDataType GetType ()
 
virtual std::string ObjectName () const
 
virtual std::ostream & PrintProperties (std::ostream &out)
 
virtual Variant GetPropertyList ()
 

Protected Member Functions

virtual std::ostream & SendToStream (std::ostream &out) const
 

Protected Attributes

Variant mName
 
int mNumHats
 
int mNumBalls
 
int mNumAxes
 
int mNumButtons
 
bool mIsOpen
 
- Protected Attributes inherited from PEBLObjectBase
ComplexDataType mCDT
 
std::map< std::string, VariantmProperties
 

Detailed Description

Definition at line 40 of file PJoystick.h.

Constructor & Destructor Documentation

◆ PJoystick()

PJoystick::PJoystick ( )

The Standard constructor.

Definition at line 37 of file PJoystick.cpp.

38{
40}
@ CDT_JOYSTICK
Definition PEBLObject.h:54
ComplexDataType mCDT
Definition PEBLObject.h:109

References CDT_JOYSTICK, and PEBLObjectBase::mCDT.

◆ ~PJoystick()

PJoystick::~PJoystick ( )
virtual

The Standard destructor.

Definition at line 43 of file PJoystick.cpp.

44{
45}

Member Function Documentation

◆ GetAxisState()

virtual signed int PJoystick::GetAxisState ( unsigned int  axis)
pure virtual

Implemented in PlatformJoystick, and PlatformJoystick.

◆ GetBallState()

virtual Variant PJoystick::GetBallState ( unsigned int  ball)
pure virtual

Implemented in PlatformJoystick, and PlatformJoystick.

◆ GetButtonState()

virtual signed int PJoystick::GetButtonState ( unsigned int  button)
pure virtual

Implemented in PlatformJoystick, and PlatformJoystick.

◆ GetHatState()

virtual signed int PJoystick::GetHatState ( unsigned int  hat)
pure virtual

Implemented in PlatformJoystick, and PlatformJoystick.

◆ GetNumAxes()

int PJoystick::GetNumAxes ( )
inline

Definition at line 54 of file PJoystick.h.

54{return mNumAxes;};
int mNumAxes
Definition PJoystick.h:71

References mNumAxes.

Referenced by PEBLEnvironment::GetNumJoystickAxes().

◆ GetNumBalls()

int PJoystick::GetNumBalls ( )
inline

Definition at line 53 of file PJoystick.h.

53{return mNumBalls;};
int mNumBalls
Definition PJoystick.h:70

References mNumBalls.

Referenced by PlatformJoystick::GetBallState(), and PEBLEnvironment::GetNumJoystickBalls().

◆ GetNumButtons()

int PJoystick::GetNumButtons ( )
inline

Definition at line 55 of file PJoystick.h.

55{return mNumButtons;};
int mNumButtons
Definition PJoystick.h:72

References mNumButtons.

Referenced by PlatformJoystick::GetButtonState(), and PEBLEnvironment::GetNumJoystickButtons().

◆ GetNumHats()

int PJoystick::GetNumHats ( )
inline

Definition at line 52 of file PJoystick.h.

52{return mNumHats;};
int mNumHats
Definition PJoystick.h:69

References mNumHats.

Referenced by PlatformJoystick::GetHatState(), and PEBLEnvironment::GetNumJoystickHats().

◆ SendToStream()

ostream & PJoystick::SendToStream ( std::ostream &  out) const
protectedvirtual

Reimplemented from PDevice.

Reimplemented in PlatformJoystick, and PlatformJoystick.

Definition at line 48 of file PJoystick.cpp.

49{
50 out << "<Generic Joystick Object>" << flush;
51 return out;
52}

Member Data Documentation

◆ mIsOpen

bool PJoystick::mIsOpen
protected

Definition at line 74 of file PJoystick.h.

Referenced by PlatformJoystick::PlatformJoystick().

◆ mName

Variant PJoystick::mName
protected

Definition at line 68 of file PJoystick.h.

Referenced by PlatformJoystick::PlatformJoystick().

◆ mNumAxes

int PJoystick::mNumAxes
protected

Definition at line 71 of file PJoystick.h.

Referenced by GetNumAxes(), and PlatformJoystick::PlatformJoystick().

◆ mNumBalls

int PJoystick::mNumBalls
protected

Definition at line 70 of file PJoystick.h.

Referenced by GetNumBalls(), and PlatformJoystick::PlatformJoystick().

◆ mNumButtons

int PJoystick::mNumButtons
protected

Definition at line 72 of file PJoystick.h.

Referenced by GetNumButtons(), and PlatformJoystick::PlatformJoystick().

◆ mNumHats

int PJoystick::mNumHats
protected

Definition at line 69 of file PJoystick.h.

Referenced by GetNumHats(), and PlatformJoystick::PlatformJoystick().


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