summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/debug.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-12-26 03:25:25 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-12-26 03:25:25 +0000
commitbd4c1d47aeaf1d4bca76d5713e705b0869d3f2f7 (patch)
tree475d0385e678c5e7007df571bea9c5cc8b1417bb /sca-cpp/trunk/kernel/debug.hpp
parentf453584ae0a3ec04f1781fc35b7abe5d139c6679 (diff)
Added missing const qualifiers, macros and util functions to help debugging, and a simple balanced tree implementation for use in lookup tables.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@893938 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/kernel/debug.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/sca-cpp/trunk/kernel/debug.hpp b/sca-cpp/trunk/kernel/debug.hpp
index 8dad5fdd3c..c06fe55f4a 100644
--- a/sca-cpp/trunk/kernel/debug.hpp
+++ b/sca-cpp/trunk/kernel/debug.hpp
@@ -26,6 +26,9 @@
* Functions to help log and debug.
*/
+#include <string>
+#include <ostream>
+
namespace tuscany
{
@@ -35,7 +38,7 @@ namespace tuscany
* Debug log.
*/
template<typename V> const bool debug(const V& v, const std::string& msg) {
- std::cerr<< msg << ": " << v << std::endl;
+ std::cerr << msg << ": " << v << std::endl;
return true;
}
@@ -52,6 +55,9 @@ bool debug_dec(long int& c) {
return true;
}
+/**
+ * Attribute used to mark unused parameters.
+ */
#define unused __attribute__ ((unused))
#else
@@ -60,6 +66,7 @@ bool debug_dec(long int& c) {
#define debug_inc(c)
#define debug_dec(c)
+
#define unused
#endif