-
Notifications
You must be signed in to change notification settings - Fork 15
/
ConsoleIO.h
71 lines (59 loc) · 1.78 KB
/
ConsoleIO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
*--------------------------------------------------------------------
* Project: VM65 - Virtual Machine/CPU emulator programming
* framework.
*
* File: ConsoleIO.h
*
* Purpose: Prototype of ConsoleIO class.
*
* Date: 8/26/2016
*
* Copyright: (C) by Marek Karcz 2016. All rights reserved.
*
* Contact: [email protected]
*
* License Agreement and Warranty:
This software is provided with No Warranty.
I (Marek Karcz) will not be held responsible for any damage to
computer systems, data or user's health resulting from use.
Please proceed responsibly and apply common sense.
This software is provided in hope that it will be useful.
It is free of charge for non-commercial and educational use.
Distribution of this software in non-commercial and educational
derivative work is permitted under condition that original
copyright notices and comments are preserved. Some 3-rd party work
included with this project may require separate application for
permission from their respective authors/copyright owners.
*--------------------------------------------------------------------
*/
#ifndef CONSOLEIO_H
#define CONSOLEIO_H
#include <string>
#include <queue>
#include <chrono>
#include <string.h>
#include "system.h"
//#define WINDOWS 1
#if defined (WINDOWS)
#include <windows.h>
#endif
using namespace std;
namespace MKBasic {
class ConsoleIO
{
public:
ConsoleIO();
~ConsoleIO();
void ClearScreen();
void ScrHome();
void InitCursesScr();
void CloseCursesScr();
void PrintChar(char c);
void PrintString(string s);
bool KbHit();
int GetChar();
void Beep();
};
} // namespace MKBasic
#endif // #ifndef CONSOLEIO_H