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
27 static const char *unknown_subscriber =
"unknown subscriber";
36 (void)unknown_subscriber;
52 object_info (subscriptor.object_info)
54 subscriptor.check_no_subscribers();
90 if (std::uncaught_exception() ==
false)
92 std::string infostring;
96 infostring += std::string(
"\n from Subscriber ")
97 + std::string(it->first);
100 if (infostring ==
"")
101 infostring =
"<none>";
108 std::cerr <<
"---------------------------------------------------------" 110 <<
"An object pointed to by a SmartPointer is being destroyed." 112 <<
"Under normal circumstances, this would abort the program." 114 <<
"However, another exception is being processed at the" 116 <<
"moment, so the program will continue to run to allow" 118 <<
"this exception to be processed." 120 <<
"---------------------------------------------------------" 140 check_no_subscribers();
141 s.check_no_subscribers();
142 object_info = s.object_info;
158 # ifndef DEAL_II_WITH_THREADS 159 const char *
const name = (
id != 0) ?
id : unknown_subscriber;
180 const char *name = (
id !=
nullptr) ?
id : unknown_subscriber;
191 # ifndef DEAL_II_WITH_THREADS 214 #ifndef DEAL_II_WITH_THREADS 217 deallog << it->second <<
'/' 218 <<
counter <<
" subscriptions from \"" 219 << it->first <<
'\"' << std::endl;
221 deallog <<
"No subscriber listing with multithreading" << std::endl;
225 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
#define AssertNothrow(cond, exc)
const std::type_info * object_info
void unsubscribe(const char *identifier=nullptr) const
Subscriptor & operator=(const Subscriptor &)
void list_subscribers() const
unsigned int n_subscriptions() const
void subscribe(const char *identifier=nullptr) const
std::atomic< unsigned int > counter
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
static ::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
void check_no_subscribers() const noexcept