16 #include <deal.II/base/thread_management.h>
17 #include <deal.II/base/subscriptor.h>
18 #include <deal.II/base/logstream.h>
24 DEAL_II_NAMESPACE_OPEN
44 static const char *unknown_subscriber =
"unknown subscriber";
53 (void)unknown_subscriber;
66 #ifdef DEAL_II_WITH_CXX11
70 object_info (subscriptor.object_info)
72 subscriptor.check_no_subscribers();
82 #ifdef DEAL_II_WITH_CXX11
114 if (std::uncaught_exception() ==
false)
116 std::string infostring;
120 infostring += std::string(
"\n from Subscriber ")
121 + std::string(it->first);
124 if (infostring ==
"")
125 infostring =
"<none>";
132 std::cerr <<
"---------------------------------------------------------"
134 <<
"An object pointed to by a SmartPointer is being destroyed."
136 <<
"Under normal circumstances, this would abort the program."
138 <<
"However, another exception is being processed at the"
140 <<
"moment, so the program will continue to run to allow"
142 <<
"this exception to be processed."
144 <<
"---------------------------------------------------------"
162 #ifdef DEAL_II_WITH_CXX11
181 # ifndef DEAL_II_WITH_THREADS
182 const char *
const name = (
id != 0) ?
id : unknown_subscriber;
203 const char *name = (
id != 0) ?
id : unknown_subscriber;
213 # ifndef DEAL_II_WITH_THREADS
236 #ifndef DEAL_II_WITH_THREADS
239 deallog << it->second <<
'/'
240 <<
counter <<
" subscriptions from \""
241 << it->first <<
'\"' << std::endl;
243 deallog <<
"No subscriber listing with multithreading" << std::endl;
247 DEAL_II_NAMESPACE_CLOSE
void unsubscribe(const char *identifier=0) const
void subscribe(const char *identifier=0) const
#define AssertNothrow(cond, exc)
const std::type_info * object_info
Subscriptor & operator=(const Subscriptor &)
static::ExceptionBase & ExcInUse(int arg1, char *arg2, std::string &arg3)
DEAL_VOLATILE unsigned int counter
unsigned int n_subscriptions() const
void check_no_subscribers() const
std::map< const char *, unsigned int > counter_map
std::map< const char *, unsigned int >::iterator map_iterator
std::map< const char *, unsigned int >::value_type map_value_type
void list_subscribers() const
static::ExceptionBase & ExcNoSubscriber(char *arg1, char *arg2)