]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/src/dom.hh
Initial revision
[helm.git] / helm / DEVEL / mathml_editor / src / dom.hh
diff --git a/helm/DEVEL/mathml_editor/src/dom.hh b/helm/DEVEL/mathml_editor/src/dom.hh
new file mode 100644 (file)
index 0000000..f2c42db
--- /dev/null
@@ -0,0 +1,27 @@
+
+#ifndef __dom_hh__
+#define __dom_hh__
+
+#include <GdomeSmartDOM.hh>
+
+namespace DOM = GdomeSmartDOM;
+
+typedef DOM::Char32     TChar;
+typedef DOM::UCS4String TString;
+
+inline bool isUnicodeSpace(TChar ch)
+{
+  return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r';;
+}
+
+inline bool isUnicodeAlpha(TChar ch)
+{
+  return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
+}
+
+inline bool isUnicodeDigit(TChar ch)
+{
+  return (ch >= '0' && ch <= '9');
+}
+
+#endif // __dom_hh__