Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 //--------------------------------------------------------------------------- 00012 00013 //--------------------------------------------------------------------------- 00014 // recursive header protection 00015 #ifndef OctaneModelerWeightVectoredH 00016 #define OctaneModelerWeightVectoredH 00017 //--------------------------------------------------------------------------- 00018 00019 //--------------------------------------------------------------------------- 00020 // application includes 00021 #include "modeler.hpp" 00022 // system includes 00023 //--------------------------------------------------------------------------- 00024 00025 00026 00027 //--------------------------------------------------------------------------- 00033 class OctaneModeler_WeightVectored : public OctaneModeler 00034 { 00035 protected: 00037 SymbolWeightVector weightvector; 00038 public: 00040 OctaneModeler_WeightVectored() {;} 00042 virtual ~OctaneModeler_WeightVectored() {;} 00043 public: 00044 //--------------------------------------------------------------------------- 00045 // OCTANE PUBLIC API - RTTI FUNCTIONS - these are supported by all derived classes 00046 virtual std::string GetName() {return "OctaneModelerWeightVectored";} 00047 virtual std::string GetDescription() {return "OctaneModeler using a WeightVector";} 00048 //--------------------------------------------------------------------------- 00049 public: 00050 //--------------------------------------------------------------------------- 00051 // OCTANE PUBLIC API - AUXILIARY FUNCTIONS - these are supported by all derived classes 00052 virtual unsigned int GetMemoryUsed(); 00053 virtual unsigned int GetDiskspaceUsed(bool fortempdecompressiononly); 00054 virtual bool SaveState(bitwriter &to,bool fortempdecompressiononly); 00055 virtual bool LoadState(bitreader &from); 00056 virtual void ShowDebuggingInfo(); 00057 //--------------------------------------------------------------------------- 00058 public: 00059 //--------------------------------------------------------------------------- 00060 // MODELLER PUBLIC API - STATE MAINTENANCE 00061 virtual bool IsReadyToModel() {if (weightvector.GetSymbolCount()>0) return true; else return false;}; 00062 virtual void ResetState(); 00063 //--------------------------------------------------------------------------- 00064 public: 00065 //--------------------------------------------------------------------------- 00066 // MODELLER PUBLIC API - ACCESSOR FOR CODING 00067 virtual int GetSymbolCount() {return weightvector.GetSymbolCount();}; 00068 virtual SymbolWeightVector* GetWeightVectorp() {return &weightvector;}; 00069 virtual TSymbolWeightVectorWeight GetWeightVectorItem(int symbolnum) {return weightvector.GetSymbolWeight(symbolnum);}; 00070 //--------------------------------------------------------------------------- 00071 }; 00072 //--------------------------------------------------------------------------- 00073 00074 00075 00076 //--------------------------------------------------------------------------- 00077 #endif 00078 //--------------------------------------------------------------------------- 00079