00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef OctaneClassH
00015 #define OctaneClassH
00016
00017
00018
00019
00020 #include "../bitio/bitio.hpp"
00021
00022 #include <string>
00023
00024 #include <stdlib.h>
00025
00026
00027
00032 class OctaneClass
00033 {
00034 public:
00035
00037 OctaneClass() {;};
00039 virtual ~OctaneClass() {;};
00040
00041 public:
00042
00043
00046 virtual std::string GetName() {return "OctaneClass";}
00049 virtual std::string GetDescription() {return "Base Octane Class";}
00052 virtual std::string GetHelpInformation() { return ""; }
00053
00054 public:
00055
00056
00058 virtual void ShowDebuggingInfo() {;};
00060 virtual unsigned int GetMemoryUsed() {return sizeof(this);};
00062 virtual unsigned int GetDiskspaceUsed(bool fortempdecompressiononly) {return 0;};
00064 virtual std::string GetParametersInformation() {return "";};
00066 virtual void SetDefaultParameters() {;};
00070 virtual bool SetParameter(const std::string ¶metername,const std::string ¶metervalue) {return false;};
00073 virtual bool SaveState(bitwriter &to,bool fortempdecompressiononly) {return DoProtectedSaveState(to,fortempdecompressiononly);};
00076 virtual bool LoadState(bitreader &from) {return DoProtectedLoadState(from);};
00077
00078 public:
00079
00080
00082 static void NiceifyHighAsciiString(std::string &str);
00084 static std::string PrefixNonEmptyString(const std::string headerstr, const std::string str);
00085
00086 protected:
00087
00088
00089
00092 static bool ParseParameter(const std::string ¶metervalue,unsigned int ¶m) {param=(unsigned int)(atoi(parametervalue.c_str()));return true;}
00095 static bool ParseParameter(const std::string ¶metervalue,int ¶m) {param=(int)(atoi(parametervalue.c_str()));return true;}
00098 static bool ParseParameter(const std::string ¶metervalue,unsigned char ¶m) {param=(unsigned char)(atoi(parametervalue.c_str()));return true;}
00101 static bool ParseParameter(const std::string ¶metervalue,char ¶m) {param=(char)(atoi(parametervalue.c_str()));return true;}
00104 static bool ParseParameter(const std::string ¶metervalue,bool ¶m);
00105
00106 protected:
00107
00108
00109
00112 virtual bool DoProtectedSaveState(bitwriter &to,bool fortempdecompressiononly) {return true;};
00115 virtual bool DoProtectedLoadState(bitreader &from) {return true;};
00116
00117 };
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 #endif
00135
00136