// ********************* 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