MAK RTIspy API Documentation for HLA Evolved
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
examples
rtisimple
rtiSimpleKeyboard.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Adapted from "Beginning Linux Programming", from Wrox Press -- www.wrox.com
3
*******************************************************************************/
4
5
// Utility to allow keyboard input without blocking
6
7
#ifndef MYKBHIT_H_
8
#define MYKBHIT_H_
9
10
#ifndef WIN32
11
#include <termios.h>
12
#endif
13
14
class
keyboard
15
{
16
public
:
17
18
keyboard
();
19
20
~keyboard
();
21
22
// Returns 1 if keyboard input is ready; otherwise, 0
23
int
kbhit
();
24
25
// Returns character from keyboard if avaialable; otherwise, 0
26
int
keybrdTick
();
27
28
protected
:
29
30
// Return character from keyboard input
31
int
getkey
();
32
33
private
:
34
35
#ifndef WIN32
36
struct
termios initial_settings,
new_settings
;
37
int
peek_character
;
38
#endif
39
40
};
41
42
43
#endif
44
Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)