Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
00001 00002 00003 00004 00005 00006 00007 //--------------------------------------------------------------------------- 00008 00009 //--------------------------------------------------------------------------- 00010 // recursive header protection 00011 #ifndef SampleCoderH 00012 #define SampleCoderH 00013 //--------------------------------------------------------------------------- 00014 00015 //--------------------------------------------------------------------------- 00016 // application includes 00017 #include "../coder.hpp" 00018 #include "../../modelers/modeler.hpp" 00019 // system includes 00020 //--------------------------------------------------------------------------- 00021 00022 00023 00024 00025 //--------------------------------------------------------------------------- 00032 class SampleCoder : public OctaneCoder 00033 { 00034 public: 00036 SampleCoder() {;} 00038 virtual ~SampleCoder() {;} 00039 public: 00040 //--------------------------------------------------------------------------- 00041 // OCTANE PUBLIC API - RTTI FUNCTIONS - these are supported by all derived classes 00042 virtual std::string GetName() {return "SampleCoder";} 00043 virtual std::string GetDescription() {return "Sample Coder";} 00044 virtual std::string GetHelpInformation() { return ""; } 00045 //--------------------------------------------------------------------------- 00046 public: 00047 //--------------------------------------------------------------------------- 00048 // OCTANE PUBLIC API - AUXILIARY FUNCTIONS - these are supported by all derived classes 00049 virtual void ShowDebuggingInfo() {;}; 00050 virtual unsigned int GetMemoryUsed() {return (unsigned int)(sizeof(this));}; 00051 //--------------------------------------------------------------------------- 00052 public: 00053 //--------------------------------------------------------------------------- 00054 // CODER PUBLIC API - PARSING FUNCTIONS 00055 virtual bool WriteSymbolBits(int symbolnum,bitwriter &bw); 00056 virtual bool DecodeSymbolFromInput(int &symbolnum, bitreader &br); 00057 //--------------------------------------------------------------------------- 00058 public: 00059 //--------------------------------------------------------------------------- 00060 // CODER PUBLIC API - STATE PREPARATION 00061 virtual bool IsReadyToCode() {return true;}; 00062 //--------------------------------------------------------------------------- 00063 public: 00064 //--------------------------------------------------------------------------- 00065 // CODER PUBLIC API - MODEL CHANGE NOTIFICATION 00066 virtual void ReceiveNotification_ModelChange_AllSymbolWeights(OctaneModeler *modelerp) {;}; 00067 //--------------------------------------------------------------------------- 00068 }; 00069 //--------------------------------------------------------------------------- 00070 00071 00072 00073 //--------------------------------------------------------------------------- 00074 #endif 00075 //--------------------------------------------------------------------------- 00076