MAK RTIspy API Documentation for HLA 1516
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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 Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (
www.mak.com
)