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