terminal.h
来自「DOS下采用中断接收数据的串口通讯的例子,很难找到的好东西!」· C头文件 代码 · 共 34 行
H
34 行
// ********************* START OF TERMINAL.H *********************
//
// This header file contains the definitions for the base class
// Terminal. It is a virtual base class, so you can't create an
// instance of it directly; you must derive a class from it and
// implement the pure virtual functions. One example of such a
// class is AnsiTerminal, defined in Chapter 13 of the book.
//
#ifndef _TERMINAL_DOT_H
#define _TERMINAL_DOT_H
#include "rs232.h"
#include "BaseWind.h"
class Terminal {
protected :
RS232 *port;
BaseWindow *window;
public :
Terminal( RS232 &p, BaseWindow &w )
{
port = &p;
window = &w;
}
virtual int ReadPort( void ) = 0;
virtual void Display( int c ) = 0;
virtual void WriteKey( int c ) = 0;
virtual ~Terminal( void ){ ; }
};
#endif // #ifndef _TERMINAL_DOT_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?