📄 oporttoram.h
字号:
/* Copyright (C) 1995, Tektronix Inc. All Rights Reserved. * * Usage Restrictions * * License is granted to copy, to use, and to make and to use derivative * works for research and evaluation purposes only. * * Disclaimer of Warranty * * These software programs are available to the user without any license * fee or royalty on an "as is" basis. Tektronix Inc. disclaims any and * all warranties, whether express, implied, or statuary, including any * implied warranties or merchantability or of fitness for a particular * purpose. In no event shall the copyright-holder be liable for any * incidental, punitive, or consequential damages of any kind whatsoever * arising from the use of these programs. * * This disclaimer of warranty extends to the user of these programs and * user's customers, employees, agents, transferees, successors, and * assigns. * * The Tektronix Inc. does not represent or warrant that the programs * furnished hereunder are free of infringement of any third-party * patents.*//* OPortToRam is an OutputPort that puts bits to ram */#ifndef oporttoram_h#define oporttoram_h#include "OutputPort.H"class OPortToRam: public OutputPort{public: OPortToRam (char*, int, int);protected: virtual void output_bit (char); virtual void output_byte (char); virtual void output_flush ();private: char buf[8]; int next_out; char* bits; int bits_length; int bits_ptr; void output_byte ();};/* DOCUMENTATION OPortToRam is a subclass of OutputPort. It provides implementations for the three virtual funtions output_bit, output_byte and output_flush and, except for constructors, its public interface is inherited from the base class. When the port is constructed a buffer and buffer length is specified. Data is written to the buffer as the port is written to. When the end of the buffer is reached subsequent reads loop back to the beginning. Public methods are: OPortToRam (char*, int, int); The first argument specifies a buffer. The second argument specifies its length. The third parameter is the text_flag. When set to true the port will output char's '0' and '1'. This is useful for debugging.*/#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -