📄 memsrc.h
字号:
// memsrc.h// StreamInputSource for memory buffers// copyright SafeTP Development Group, Inc., 2000 Terms of use are as specified in license.txt#ifndef __MEMSRC_H#define __MEMSRC_H#include "inputsrc.h" // StreamInputSourceclass MemoryInputSource : public StreamInputSource {private: // data char const *data; // source buffer (*not* owned) int dataLen; // length of that buffer char const *next; // next char to supply // invariants: // data != NULL // dataLen >= 0 // 0 <= (next-data) <= dataLenprivate: // funcs // xassert invariants hold void selfCheck() const;public: // funcs MemoryInputSource(char const *data, int len); // StreamInputSource funcs virtual int read(char *buffer, int buflen); // # of unconsumed bytes int remaining() const;};#endif // __MEMSRC_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -