// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
//@}
private:
+ /**
+ * Register a subscriber for
+ * debugging purposes. Called by
+ * subscribe() in debug mode.
+ */
+ void do_subscribe(const char* id) const;
+
+ /**
+ * Deregister a subscriber for
+ * debugging purposes. Called by
+ * unsubscribe() in debug mode.
+ */
+ void do_unsubscribe(const char* id) const;
+
/**
* The data type used in
* #counter_map.
// unsubscribe here. The definitions for debug mode are in
// subscriptor.cc.
-#ifndef DEBUG
+#ifdef DEBUG
+
+inline void
+Subscriptor::subscribe(const char* id) const
+{
+ do_subscribe(id);
+}
+
+
+inline void
+Subscriptor::unsubscribe(const char* id) const
+{
+ do_unsubscribe(id);
+}
+
+#else
inline void
Subscriptor::subscribe(const char*) const
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 by the deal.II authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
// These are the implementations for debug mode. The optimized
// versions are inlined in the header file.
-#ifdef DEBUG
-void Subscriptor::subscribe (const char* id) const
+void Subscriptor::do_subscribe (const char* id) const
{
+#ifdef DEBUG
if (object_info == 0)
object_info = &typeid(*this);
Threads::ThreadMutex::ScopedLock lock (subscription_lock);
else
it->second++;
#endif
+#endif
}
-void Subscriptor::unsubscribe (const char* id) const
+void Subscriptor::do_unsubscribe (const char* id) const
{
+#ifdef DEBUG
Assert (counter>0, ExcNotUsed());
Threads::ThreadMutex::ScopedLock lock (subscription_lock);
--counter;
it->second--;
#endif
-}
#endif
+}
unsigned int Subscriptor::n_subscriptions () const