action.h
来自「Unix下的MUD客户端程序」· C头文件 代码 · 共 29 行
H
29 行
// An action (regexp) to be takenclass Action{public: ~Action(); String pattern; // The pattern to search for String commands; // Commands to be run OR replacement pattern typedef enum { Trigger, Replacement, Gag } action_t; action_t type; void *embedded_sub; void compile(); void checkMatch(const char*); // run commands if matching void checkReplacement(char *buf, int& len, char **new_out); // Take a string like "^blah" dosomething and produce an Action // if NULL, error ocurred: error result will be in res static Action* parse(const char *buf, String& res, action_t type); private: Action(const char *_pattern, const char *_commands, action_t type);};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?