summaryrefslogtreecommitdiff
path: root/note_compiler/util.h
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2010-12-31 16:33:17 +0100
committerFlorian Jung <flo@thinkpad.(none)>2010-12-31 16:33:17 +0100
commitff2f14ab35cf1cb2ded11b4ae86d24dda738b445 (patch)
tree3e35d112243bf987f66359a53e4ff9261bdc6d1b /note_compiler/util.h
parentd46f6ee0a6298ff58c6f4f0647d49fb4a76f9ea9 (diff)
Add initial code for the note-compiler
The note-compiler now has a Parser class which knows about possible parameter changes (by controller, velocity or simply user definition). Furthermore, several files were adapted (by stripping unneeded code, adding the bool foo_const variables etc.). Small fix in util.c which causes extract_var("foo") to return "foo" instead of "". Fixes in both Makefiles.
Diffstat (limited to 'note_compiler/util.h')
-rw-r--r--note_compiler/util.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/note_compiler/util.h b/note_compiler/util.h
new file mode 100644
index 0000000..e571c7d
--- /dev/null
+++ b/note_compiler/util.h
@@ -0,0 +1,31 @@
+#ifndef __UTIL_H__
+#define __UTIL_H__
+
+#include <string>
+#include "programs.h"
+
+using namespace std;
+
+string IntToStr(int i);
+string IntToStrHex(int i);
+
+bool isnum(string s);
+bool isfloat(string s);
+
+string remove_all_spaces(string s);
+string trim_spaces(string s);
+
+void output_warning(string s);
+void output_note(string s);
+void output_verbose(string s);
+
+bool param_needs_index(parameter_enum p);
+parameter_enum param_to_enum(string param);
+
+string extract_var(string s);
+string extract_val(string s);
+
+string fileext(string f);
+
+
+#endif