📄 sulima.hh
字号:
#ifndef sulima_hh_included#define sulima_hh_included#include <stdarg.h>#include "module.hh"#include "clock.hh"#include "cpu.hh"#include "ioqueue.hh"// The main Sulima module type.class Sulima : public BasicModule, public IOListener{private: // The logging subsystem. void create_logging_subsystem(); void destroy_logging_subsystem(); // The I/O subsystem void create_io_subsystem(); void destroy_io_subsystem(); // The console subsystem void create_console_subsystem(); void destroy_console_subsystem();public: // Some shameless advertising. static const char *const banner; static const char *const copyright; // Constructors, etc, Sulima(); ~Sulima(); void enable_console(CPU *cpu); void io_poll();};// There's one instance of the above in the program,// and it's created after sulima_tcl has been initialized.extern Sulima *sulima;// Interface implemented by console devicesclass Console{public: virtual void input(int c) = 0;};// Console event handler classclass ConsoleEvent : public Event{public: ConsoleEvent(ClockValue when, ClockValue interval) : Event(when, interval) {} void invoke();};// Function prototypes.// sulima/echo.ccsize_t echo(char *buf, size_t n, const char *tmpl, ...);size_t vecho(char *buf, size_t n, const char *tmpl, va_list ap);// sulima/copy.ccchar *copy(const char *s);char *copy(const char *s0, const char *s1, ...);#endif // sulima_hh_included
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -