Run tabbing pass
[satune.git] / src / Tuner / tunable.h
index cbd9f29898b3c4921b5a63fc859d8ed20828d2f2..6077891a5cff896daa2c990796dd3a74e58da7a6 100644 (file)
@@ -3,26 +3,30 @@
 #include "classlist.h"
 
 
-struct Tuner {
+class Tuner {
+public:
+       Tuner();
+       int getTunable(TunableParam param, TunableDesc *descriptor);
+       int getVarTunable(VarType vartype, TunableParam param, TunableDesc *descriptor);
+       MEMALLOC;
 };
 
-struct TunableDesc {
+class TunableDesc {
+public:
+       TunableDesc(int _lowValue, int _highValue, int _defaultValue) : lowValue(_lowValue), highValue(_highValue), defaultValue(_defaultValue) {}
        int lowValue;
        int highValue;
        int defaultValue;
+       MEMALLOC;
 };
 
-Tuner * allocTuner();
-void deleteTuner(Tuner *This);
 
-int getTunable(Tuner *This, TunableParam param, TunableDesc * descriptor);
-int getVarTunable(Tuner *This, VarType vartype, TunableParam param, TunableDesc * descriptor);
+#define GETTUNABLE(This, param, descriptor) This->getTunable(param, descriptor)
+#define GETVARTUNABLE(This, vartype, param, descriptor) This->getTunable(param, descriptor)
 
-#define GETTUNABLE(This, param, descriptor) getTunable(This, param, descriptor)
-#define GETVARTUNABLE(This, vartype, param, descriptor) getTunable(This, param, descriptor)
+static TunableDesc onoff(0, 1, 1);
+static TunableDesc offon(0, 1, 0);
 
-static TunableDesc onoff={0, 1, 1};
-static TunableDesc offon={0, 1, 0};
-enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE};
+enum Tunables {DECOMPOSEORDER, MUSTREACHGLOBAL, MUSTREACHLOCAL, MUSTREACHPRUNE, OPTIMIZEORDERSTRUCTURE, ORDERINTEGERENCODING};
 typedef enum Tunables Tunables;
 #endif