16 #include <deal.II/base/logstream.h> 17 #include <deal.II/base/subscriptor.h> 18 #include <deal.II/base/thread_management.h> 24 DEAL_II_NAMESPACE_OPEN
27 static const char *unknown_subscriber =
"unknown subscriber";
30 #ifdef DEAL_II_WITH_THREADS 37 , object_info(nullptr)
40 (void)unknown_subscriber;
56 subscriptor.check_no_subscribers();
93 if (std::uncaught_exception() ==
false)
95 std::string infostring;
101 std::string(
"\n from Subscriber ") + std::string(it->first);
104 if (infostring ==
"")
105 infostring =
"<none>";
115 <<
"---------------------------------------------------------" 117 <<
"An object pointed to by a SmartPointer is being destroyed." 119 <<
"Under normal circumstances, this would abort the program." 121 <<
"However, another exception is being processed at the" 123 <<
"moment, so the program will continue to run to allow" 125 <<
"this exception to be processed." << std::endl
126 <<
"---------------------------------------------------------" 149 s.check_no_subscribers();
159 #ifdef DEAL_II_WITH_THREADS 160 std::lock_guard<std::mutex> lock(
mutex);
167 const char *
const name = (
id != 0) ?
id : unknown_subscriber;
181 const char *name = (
id !=
nullptr) ?
id : unknown_subscriber;
190 #ifdef DEAL_II_WITH_THREADS 191 std::lock_guard<std::mutex> lock(
mutex);
218 DEAL_II_NAMESPACE_CLOSE
static::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
#define AssertNothrow(cond, exc)
void subscribe(const char *identifier=nullptr) const
const std::type_info * object_info
Subscriptor & operator=(const Subscriptor &)
std::map< const char *, unsigned int >::value_type map_value_type
void unsubscribe(const char *identifier=nullptr) const
std::map< const char *, unsigned int >::iterator map_iterator
unsigned int n_subscriptions() const
std::atomic< unsigned int > counter
std::map< const char *, unsigned int > counter_map
static::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
void list_subscribers() const
void check_no_subscribers() const noexcept