📄 codefrags.h
字号:
/* $Id: CodeFrags.h,v 1.2 1996/07/27 07:26:28 matt Exp $ Code frags handler class. (c) Matt Phillips 1996. */#ifndef _CODE_FRAGS#define _CODE_FRAGS#include <istream.h>#include <std/string.h>// code frags example://// *// cpp// > a c++ code frag// > a c++ code frag// ada// > an ada code frag// *// c// > a c code fragclass CodeFrags{public: // an object reading from <i> looking for fragments of language <l>. CodeFrags (istream &i, const string &l) : input (i), lang (l) {atFrag = 0;} // jump to next code fragment (if any). int nextFrag (); // true if the previous nextFrag () found a code fragment. int hasFrag () const {return atFrag;} // output a fragment found by nextFrag () to <output>. does nothing // if no fragment was found. void outputFrag (ostream &output); // true if the code frags file has been fully processed. int eof () const {return input.eof ();}protected: istream &input; const string lang; string line; int atFrag; void nextSection ();};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -