PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
DeviceState Class Reference

#include <DeviceState.h>

Inheritance diagram for DeviceState:
IntervalState RegionState ValueState

Public Member Functions

 DeviceState (DeviceTest test, int interfaced, PDevice *device, PEBL_DEVICE_TYPE pdt)
 
virtual ~DeviceState ()
 
virtual int GetInterface () const
 
virtual int GetState (int iface) const
 
virtual int TestDevice () const
 
PDeviceGetDevice ()
 
PDeviceGetEventQueue ()
 
virtual PEBL_DEVICE_TYPE GetDeviceType ()
 

Protected Member Functions

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

Protected Attributes

int mInterface
 This is different from the value or values that an interface can take on.
 
DeviceTest mDeviceTest
 
PDevicemDevice
 
PEBL_DEVICE_TYPE mPDT
 

Friends

std::ostream & operator<< (ostream &out, const DeviceState &device)
 

Detailed Description

Definition at line 74 of file DeviceState.h.

Constructor & Destructor Documentation

◆ DeviceState()

DeviceState::DeviceState ( DeviceTest  test,
int  interfaced,
PDevice device,
PEBL_DEVICE_TYPE  pdt 
)

Definition at line 33 of file DeviceState.cpp.

33 :
34 mInterface(intface),
35 mDeviceTest(test),
36 mDevice(device),
37 mPDT(pdt)
38{
39
40
41}
DeviceTest mDeviceTest
int mInterface
This is different from the value or values that an interface can take on.
Definition DeviceState.h:99
PEBL_DEVICE_TYPE mPDT
PDevice * mDevice

◆ ~DeviceState()

DeviceState::~DeviceState ( )
virtual

Definition at line 43 of file DeviceState.cpp.

44{
45
46}

Member Function Documentation

◆ GetDevice()

PDevice * DeviceState::GetDevice ( )
inline

Definition at line 83 of file DeviceState.h.

83{return mDevice;};

References mDevice.

◆ GetDeviceType()

virtual PEBL_DEVICE_TYPE DeviceState::GetDeviceType ( )
inlinevirtual

Definition at line 85 of file DeviceState.h.

85{return mPDT;};

References mPDT.

◆ GetEventQueue()

PDevice * DeviceState::GetEventQueue ( )

◆ GetInterface()

int DeviceState::GetInterface ( ) const
virtual

Definition at line 48 of file DeviceState.cpp.

49{
50 return mInterface;
51}

References mInterface.

◆ GetState()

int DeviceState::GetState ( int  iface) const
virtual

Definition at line 54 of file DeviceState.cpp.

55{
56 return false;
57}

◆ SendToStream()

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

Reimplemented in ValueState, IntervalState, and RegionState.

Definition at line 75 of file DeviceState.cpp.

76{
77 out << "<Anonymous DeviceState>" << std::flush;
78 return out;
79}

◆ TestDevice()

int DeviceState::TestDevice ( ) const
virtual

Reimplemented in ValueState, IntervalState, and RegionState.

Definition at line 59 of file DeviceState.cpp.

60{
61 //cout << "devicestate Dummy device tester\n";
62 return true;
63}

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( ostream &  out,
const DeviceState device 
)
friend

Definition at line 67 of file DeviceState.cpp.

68{
69 device.SendToStream(out);
70 return out;
71}
virtual std::ostream & SendToStream(std::ostream &out) const

Member Data Documentation

◆ mDevice

PDevice* DeviceState::mDevice
protected

◆ mDeviceTest

DeviceTest DeviceState::mDeviceTest
protected

◆ mInterface

int DeviceState::mInterface
protected

This is different from the value or values that an interface can take on.

The 'interface' of a device is one of a number of interfaces a device may have.
These could include the specific button on a mouse, direction of mouse movement (x or y),

Definition at line 99 of file DeviceState.h.

Referenced by GetInterface(), ValueState::SendToStream(), ValueState::TestDevice(), IntervalState::TestDevice(), and RegionState::TestDevice().

◆ mPDT

PEBL_DEVICE_TYPE DeviceState::mPDT
protected

Definition at line 105 of file DeviceState.h.

Referenced by GetDeviceType().


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