PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
PDevice.h
Go to the documentation of this file.
1//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3// Name: src/devices/PDevice.h
4// Purpose: Master Generic Device Class
5// Author: Shane T. Mueller, Ph.D.
6// Copyright: (c) 2003-2026 Shane T. Mueller <smueller@obereed.net>
7// License: GPL 2
8//
9//
10//
11// This file is part of the PEBL project.
12//
13// PEBL is free software; you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation; either version 2 of the License, or
16// (at your option) any later version.
17//
18// PEBL is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with PEBL; if not, write to the Free Software
25// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27#ifndef __PDEVICE_H__
28#define __PDEVICE_H__
29
30#include <iostream>
31using std::cerr;
32class DeviceState;
33class ValueState;
34class IntervalState;
35class RegionState;
36
37
38
62
63
68
69
71{
72
73
74public:
76 PDevice();
77
79 virtual ~PDevice();
80
81
82 //Overload of the << operator
83 friend std::ostream & operator <<(std::ostream & out, const PDevice & device );
84
86 virtual int GetState(int iface) const;
87private:
88
89 //Inheritable printing Method.
90 virtual std::ostream& SendToStream(std::ostream& out)const;
91
92};
93
94
95
96
97
98#endif
PEBL_DEVICE_TYPE
Definition PDevice.h:40
@ PDT_MOUSE_WHEEL
Definition PDevice.h:47
@ PDT_MOVIE_END
Definition PDevice.h:58
@ PDT_JOYSTICK_AXIS
Definition PDevice.h:52
@ PDT_TEXT_INPUT
Definition PDevice.h:43
@ PDT_MOUSE_MOVEMENT
Definition PDevice.h:45
@ PDT_UNKNOWN
Definition PDevice.h:41
@ PDT_DUMMY
Definition PDevice.h:60
@ PDT_EVENT_QUEUE
Definition PDevice.h:50
@ PDT_STREAM
Definition PDevice.h:49
@ PDT_JOYSTICK_BUTTON
Definition PDevice.h:54
@ PDT_MOUSE_BUTTON
Definition PDevice.h:46
@ PDT_PORT
Definition PDevice.h:56
@ PDT_JOYSTICK_BALL
Definition PDevice.h:53
@ PDT_TEXT_EDITING
Definition PDevice.h:44
@ PDT_KEYBOARD
Definition PDevice.h:42
@ PDT_WINDOW_RESIZE
Definition PDevice.h:59
@ PDT_TIMER
Definition PDevice.h:48
@ PDT_AUDIO_OUT
Definition PDevice.h:51
@ PDT_JOYSTICK_HAT
Definition PDevice.h:55
@ PDT_MOVIE_REFRESH
Definition PDevice.h:57
friend std::ostream & operator<<(std::ostream &out, const PDevice &device)
PDevice()
The Standard constructor.
Definition PDevice.cpp:36
virtual PEBL_DEVICE_TYPE GetDeviceType()
Definition PDevice.h:85
virtual int GetState(int iface) const
Definition PDevice.cpp:65
virtual ~PDevice()
The Standard destructor.
Definition PDevice.cpp:42