| Octane v1.01.20 - The Open Compression Toolkit for C++ | http://octane.sourceforge.net/ |
#include <octaneclass.hpp>
Inheritance diagram for OctaneClass:

Definition at line 32 of file octaneclass.hpp.
Public Member Functions | |
| OctaneClass () | |
| constructor | |
| virtual | ~OctaneClass () |
| destructor | |
| virtual std::string | GetName () |
| provide a unique name for the coder, used in some cases to automatically register the object with a manager | |
| virtual std::string | GetDescription () |
| optionally provide a longer (maybe 20-60 characters) description | |
| virtual std::string | GetHelpInformation () |
| optionally provide more information about the object on request for help | |
| virtual void | ShowDebuggingInfo () |
| show any debugging info on request (used by various derived classes) [optional] | |
| virtual unsigned int | GetMemoryUsed () |
| Report actual current memory usage (in bytes). | |
| virtual unsigned int | GetDiskspaceUsed (bool fortempdecompressiononly) |
| Report disk space (in bytes) that would be used when saving state to file (in bytes). | |
| virtual std::string | GetParametersInformation () |
| Reports information about any parameters available. | |
| virtual void | SetDefaultParameters () |
| Reset any parameters to their default values. | |
| virtual bool | SetParameter (const std::string ¶metername, const std::string ¶metervalue) |
| This function is called to set a variable value. | |
| virtual bool | SaveState (bitwriter &to, bool fortempdecompressiononly) |
| Save state of object to output stream (if appropriate). | |
| virtual bool | LoadState (bitreader &from) |
| Load state of object from input stream (if appropriate). | |
Static Public Member Functions | |
| void | NiceifyHighAsciiString (std::string &str) |
| static helper to convert a raw binary string into a string which is displayable on screen | |
| std::string | PrefixNonEmptyString (const std::string headerstr, const std::string str) |
| prefix a string (can contain newlines) with a header, IFF the string is non-empty | |
Protected Member Functions | |
| virtual bool | DoProtectedSaveState (bitwriter &to, bool fortempdecompressiononly) |
| Save the state of the object - this is the virtual function that derived classes should override. | |
| virtual bool | DoProtectedLoadState (bitreader &from) |
| Load the state of the object - this is the virtual function that derived classes should override. | |
Static Protected Member Functions | |
| bool | ParseParameter (const std::string ¶metervalue, unsigned int ¶m) |
| get value of an unsinged int parameter | |
| bool | ParseParameter (const std::string ¶metervalue, int ¶m) |
| get value of an int parameter | |
| bool | ParseParameter (const std::string ¶metervalue, unsigned char ¶m) |
| get value of an an unsigned char parameter | |
| bool | ParseParameter (const std::string ¶metervalue, char ¶m) |
| get value of a char parameter | |
| bool | ParseParameter (const std::string ¶metervalue, bool ¶m) |
| get value of a bool parameter | |
|
|
provide a unique name for the coder, used in some cases to automatically register the object with a manager
Reimplemented in OctaneCoder, HuffmanCoder, SampleCoder, OctaneCompressor, OctaneModeler, SampleModeler, OctaneModeler_WeightVectored, ZeroOrderModeler, SymbolWeightVector, and OctaneParser. Definition at line 46 of file octaneclass.hpp.
00046 {return "OctaneClass";}
|
|
|
optionally provide a longer (maybe 20-60 characters) description
Reimplemented in OctaneCoder, HuffmanCoder, SampleCoder, OctaneCompressor, mtfllCompressor, SampleCompressor, SampleStatCompressor, OctaneCompressor_Statistical, SubStrHuffCompressor, zleCompressor, OctaneModeler, SampleModeler, OctaneModeler_WeightVectored, ZeroOrderModeler, SymbolWeightVector, and OctaneParser. Definition at line 49 of file octaneclass.hpp.
00049 {return "Base Octane Class";}
|
|
|
optionally provide more information about the object on request for help
Reimplemented in OctaneCoder, HuffmanCoder, SampleCoder, OctaneCompressor, OctaneCompressor_Statistical, OctaneModeler, SymbolWeightVector, and OctaneParser. Definition at line 52 of file octaneclass.hpp.
00052 { return ""; }
|
|
||||||||||||
|
This function is called to set a variable value.
Reimplemented in SampleCompressor, OctaneCompressor_Statistical, BitParser, SampleParser, and SubstringParser. Definition at line 70 of file octaneclass.hpp. Referenced by OctaneTester::ParseCommand(), and OctaneCompressor_Statistical::SetParameter().
00070 {return false;};
|
|
||||||||||||
|
Save state of object to output stream (if appropriate).
Reimplemented in OctaneModeler_WeightVectored, SymbolWeightVector, BitParser, SampleParser, and SubstringParser. Definition at line 73 of file octaneclass.hpp. References DoProtectedSaveState(). Referenced by OctaneCompressor_Statistical::DoProtectedSaveState().
00073 {return DoProtectedSaveState(to,fortempdecompressiononly);};
|
|
|
Load state of object from input stream (if appropriate).
Reimplemented in OctaneCompressor, OctaneModeler_WeightVectored, SymbolWeightVector, BitParser, SampleParser, and SubstringParser. Definition at line 76 of file octaneclass.hpp. References DoProtectedLoadState(). Referenced by OctaneCompressor_Statistical::DoProtectedLoadState().
00076 {return DoProtectedLoadState(from);};
|
|
||||||||||||
|
get value of an unsinged int parameter
Definition at line 92 of file octaneclass.hpp. Referenced by SubstringParser::SetParameter(), and SampleCompressor::SetParameter().
00092 {param=(unsigned int)(atoi(parametervalue.c_str()));return true;}
|
|
||||||||||||
|
get value of an int parameter
Definition at line 95 of file octaneclass.hpp.
00095 {param=(int)(atoi(parametervalue.c_str()));return true;}
|
|
||||||||||||
|
get value of an an unsigned char parameter
Definition at line 98 of file octaneclass.hpp.
00098 {param=(unsigned char)(atoi(parametervalue.c_str()));return true;}
|
|
||||||||||||
|
get value of a char parameter
Definition at line 101 of file octaneclass.hpp.
00101 {param=(char)(atoi(parametervalue.c_str()));return true;}
|
|
||||||||||||
|
get value of a bool parameter
Definition at line 20 of file octaneclass.cpp.
00021 {
00022 // convert and store a bool parameter value
00023 // ATTN: this is case sensitive and should be changed to case-insensitive
00024 if (parametervalue == "true")
00025 param = true;
00026 else if (parametervalue == "false")
00027 param = false;
00028 else if (atoi(parametervalue.c_str()) == 0)
00029 param = false;
00030 else if (atoi(parametervalue.c_str()) == 1)
00031 param = true;
00032 else
00033 return false;
00034 return true;
00035 }
|
|
||||||||||||
|
Save the state of the object - this is the virtual function that derived classes should override. It is wrapped by the non-virtual function SaveState() above which can perform some timing and size measurements. Reimplemented in OctaneCompressor, SampleCompressor, and OctaneCompressor_Statistical. Definition at line 112 of file octaneclass.hpp. Referenced by SaveState().
00112 {return true;};
|
|
|
Load the state of the object - this is the virtual function that derived classes should override. It is wrapped by the non-virtual function LoadState() above which can perform some timing and size measurements. Reimplemented in OctaneCompressor, SampleCompressor, and OctaneCompressor_Statistical. Definition at line 115 of file octaneclass.hpp. Referenced by LoadState().
00115 {return true;};
|