Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

arithcodecbase.h

Go to the documentation of this file.
00001 /***************************************************************************
00002     arithcodecbase.h  -  Definition of class ArithCodecBase
00003                              -------------------
00004     begin                : June 21 2002
00005     copyright            : (C) 2003 by Vojtìch Toman
00006     email                : vtoman@lit.cz
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00026 #ifndef ARITHCODECBASE_H
00027 #define ARITHCODECBASE_H
00028 
00029 
00030 
00031 #include "defs.h"
00032 #include "arithdefs.h"
00033 #include "iodevice.h"
00034 
00035 
00041 class ArithCodecBase
00042 {
00043 public:
00045   virtual void setOutputDevice(IODevice *device) { outputDevice = device; }
00046 
00048   virtual void setInputDevice(IODevice *device) { inputDevice = device; }
00049 
00051   virtual void arithmeticEncode(FreqValue, FreqValue, FreqValue) = 0;
00052 
00054   virtual FreqValue arithmeticDecodeTarget(FreqValue) = 0;
00055 
00057   virtual void arithmeticDecode(FreqValue, FreqValue, FreqValue) = 0;
00058 
00060   virtual void startEncode(void) = 0;
00061 
00063   virtual void finishEncode(void) = 0;
00064 
00066   virtual void startDecode(void) = 0;
00067 
00069   virtual void finishDecode(void) = 0;
00070 
00072   virtual void startOutputtingBits(void) = 0;
00073 
00075   virtual void startInputtingBits(void) = 0;
00076 
00078   virtual void doneOutputtingBits(void) = 0;
00079 
00081   virtual void doneInputtingBits(void) = 0;
00082 
00084   virtual size_t numberOfOutputBytes(void) = 0;
00085 
00086 protected:
00088   IODevice *outputDevice;
00089 
00091   IODevice *inputDevice;
00092 }; //ArithCodecBase
00093 
00094 
00095 #endif //ARITHCODECBASE_H

Generated on Wed Feb 5 10:43:01 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002