MAK RTIspy API Documentation for HLA 1.3
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
keyboard::getkey
int getkey()
keyboard::~keyboard
~keyboard()
keyboard::kbhit
int kbhit()
keyboard
Definition:
rtiSimpleKeyboard.h:14
keyboard::new_settings
struct termios initial_settings new_settings
Definition:
rtiSimpleKeyboard.h:36
keyboard::keyboard
keyboard()
keyboard::peek_character
int peek_character
Definition:
rtiSimpleKeyboard.h:37
keyboard::keybrdTick
int keybrdTick()
Document ID: Generated on Thu May 11 15:55:32 EDT 2023 from SVN revision 254743
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (
www.mak.com
)