summaryrefslogtreecommitdiff
path: root/graphics/epix/debug.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/epix/debug.h
Initial commit
Diffstat (limited to 'graphics/epix/debug.h')
-rw-r--r--graphics/epix/debug.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/graphics/epix/debug.h b/graphics/epix/debug.h
new file mode 100644
index 0000000000..204063447a
--- /dev/null
+++ b/graphics/epix/debug.h
@@ -0,0 +1,37 @@
+#ifndef EPIX_DEBUG
+#define EPIX_DEBUG
+
+#include <iostream>
+#include <cstdlib>
+#include <sstream>
+#include <string>
+
+#include "pairs.h"
+#include "triples.h"
+
+#include "errors.h"
+
+namespace ePiX
+{
+ inline void debug_msg(const std::string& msg)
+ {
+ std::cerr << msg << std::endl;
+ }
+
+ inline void debug_print(const pair& arg, const std::string& msg="")
+ {
+ std::cerr << msg << " ("
+ << arg.x1() << ", "
+ << arg.x2() << ")" << std::endl;
+ }
+
+ inline void debug_print(const P& arg, const std::string& msg="")
+ {
+ std::cerr << msg << " ("
+ << arg.x1() << ", "
+ << arg.x2() << ", "
+ << arg.x3() << ")" << std::endl;
+ }
+
+}
+#endif /* EPIX_DEBUG */