Rename interpretor to interpreter.
[Faustine.git] / interpreter / preprocessor / faust-0.9.47mr3 / compiler / signals / sigraterules.hh
diff --git a/interpreter/preprocessor/faust-0.9.47mr3/compiler/signals/sigraterules.hh b/interpreter/preprocessor/faust-0.9.47mr3/compiler/signals/sigraterules.hh
new file mode 100644 (file)
index 0000000..c7e955b
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef SIGRATERULES_HH
+#define SIGRATERULES_HH
+
+#include <iostream>
+#include "tlib.hh"
+#include "property.hh"
+
+
+class RateInferrer
+{
+    bool            fSuccess;       ///< true when rates can be correctly inferred
+    Tree            fFullList;      ///< list of signals + list recursive signals inside
+    Tree            fRateEnv;       ///< list of signals + list recursive signals inside
+    property<int>   fRateProperty;  ///< property used to store the rate of signals
+
+    int computeRate(Tree sig);
+public:
+    RateInferrer(Tree lsig);    ///< list of signals we want to inferre the rates
+    int rate(Tree sig);         ///< returns the rate of sig assuming that sig is a subexpression of lsig
+
+};
+
+#endif // SIGRATERULES_HH