ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
keyboard.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) by Fred Klaus *
3  * development@fkweb.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef CPC_KEYBOARD_H
21 #define CPC_KEYBOARD_H
22 
23 #include "compspec.h"
24 #include "types.h"
25 #include "cpckeys.h"
26 
27 namespace cpcx
28 {
29 
31  class Keyboard final
32  {
33 
34  public:
35  Keyboard() {init();}
37 
38  void init();
39 
40  tUBYTE value() const {return mLine[mRow];}
41  tUBYTE value(tUBYTE row) const {return mLine[row];}
42  tUBYTE row() const {return mRow;}
43 
44  void setRow(tUBYTE row) {mRow = row;}
45  void setValue(tUBYTE val) {mLine[mRow] = val;}
46  void setValue(tUBYTE row, tUBYTE val) {mLine[row] = val;}
47 
48  private:
51  };
52 
53 } // cpc
54 
55 #endif // CPC_KEYBOARD_H
tUBYTE row() const
Definition: keyboard.h:42
void init()
Definition: roland.cpp:97
void setValue(tUBYTE row, tUBYTE val)
Definition: keyboard.h:46
Keyboard()
Definition: keyboard.h:35
Namespace for all CPC components.
Definition: colours.cpp:22
tUBYTE value(tUBYTE row) const
Definition: keyboard.h:41
tUBYTE mRow
Definition: keyboard.h:49
tUBYTE mLine[16]
Definition: keyboard.h:50
~Keyboard() ROLAND_DEFAULT void init()
void setValue(tUBYTE val)
Definition: keyboard.h:45
void setRow(tUBYTE row)
Definition: keyboard.h:44
#define ROLAND_DEFAULT
Definition: compspec.h:46
uint8_t tUBYTE
Definition: types.h:74
Definition: keyboard.h:31
tUBYTE value() const
Definition: keyboard.h:40