⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 oporttofile.h

📁 1、简介 此代码是IS0 13818-5 MPEG2系统层协议分析代码
💻 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.*//* OPortToFile is an OutputPort that puts bits to a file */#ifndef oporttofile_h#define oporttofile_h#include "OutputPort.H"// FIX -- CacheSize should be a parameter to the OPortToFile constructor#define CacheSize 4096extern "C"{#include <stdio.h>#include <fcntl.h>}class OPortToFile: public OutputPort{public:  OPortToFile (char*, int);  virtual ~OPortToFile();protected:  virtual void output_bit (char);  virtual void output_byte (char);  virtual void output_flush ();private:  char buf[8];  int next_out;  int fd;
  FILE* fd2;  char	fbuf[CacheSize];  int   flen;  int   bufpos;  void output_byte ();};/* DOCUMENTATION OPortToFile 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.   File writes are cached to improve performance.  The current cache size is set in the code to 4096. Public methods are:  OPortToFile (char*, int);    The second (integer) 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 + -