summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/config.hpp
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-04-02 06:24:05 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2012-04-02 06:24:05 +0000
commita6d8c8ff0c7d48e5e56728e3dc191ccb0a96418a (patch)
tree428cfc3b43089d16f2fb91699471d4a9949496d6 /sca-cpp/trunk/kernel/config.hpp
parent86b27d2bb7203724cf25cd134b2b4e1cefeacb42 (diff)
Add more fine grain debug options and remove overhead in debug log macros when logging is turned off.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1308248 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/kernel/config.hpp')
-rw-r--r--sca-cpp/trunk/kernel/config.hpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/sca-cpp/trunk/kernel/config.hpp b/sca-cpp/trunk/kernel/config.hpp
index 5b447e116b..944b9629e7 100644
--- a/sca-cpp/trunk/kernel/config.hpp
+++ b/sca-cpp/trunk/kernel/config.hpp
@@ -67,13 +67,32 @@ namespace tuscany
#ifdef WANT_MAINTAINER_MODE
/**
+ * Strict compile warnings.
+ */
+#define WANT_MAINTAINER_WARNINGS
+
+/**
+ * Fast fail assertion.
+ */
+#define WANT_MAINTAINER_ASSERT
+
+/**
+ * Debug log.
+ */
+#define WANT_MAINTAINER_LOG
+
+/**
* Add string watch members to important classes to help watch them in a debugger.
*/
//#define WANT_MAINTAINER_WATCH
/**
- * Increment/decrement a debug counter.
+ * Maintain counters of important objects to help test garbage collection.
*/
+//#define WANT_MAINTAINER_COUNTERS
+
+#ifdef WANT_MAINTAINER_COUNTERS
+
bool debug_inc(long int& c) {
c++;
return true;
@@ -91,5 +110,12 @@ bool debug_dec(long int& c) {
#endif
+#else
+
+#define debug_inc(c)
+#define debug_dec(c)
+
+#endif
+
}
#endif /* tuscany_config_hpp */