35 , object_info(subscriptor.object_info)
37 for (
auto *
const validity_ptr : subscriptor.validity_pointers)
38 *validity_ptr =
false;
39 subscriptor.validity_pointers.clear();
47 *validity_ptr =
false;
77 if (std::uncaught_exceptions() == 0)
79 std::string infostring;
82 if (map_entry.second > 0)
84 "\n from Subscriber " + std::string(map_entry.first);
87 if (infostring.empty())
88 infostring =
"<none>";
98 <<
"---------------------------------------------------------"
100 <<
"An object pointed to by a ObserverPointer is being destroyed."
102 <<
"Under normal circumstances, this would abort the program."
104 <<
"However, another exception is being processed at the"
106 <<
"moment, so the program will continue to run to allow"
108 <<
"this exception to be processed." << std::endl
109 <<
"---------------------------------------------------------"
121 for (
auto *
const validity_ptr : s.validity_pointers)
122 *validity_ptr =
false;
124 object_info = s.object_info;
132 const std::string &
id)
const
134 std::lock_guard<std::mutex> lock(
mutex);
152 const std::string &
id)
const
163 std::lock_guard<std::mutex> lock(
mutex);
180 auto validity_ptr_it =
187 "This EnableObserverPointer object does not know anything about the supplied pointer!"));
virtual ~EnableObserverPointer()
void check_no_subscribers() const noexcept
void subscribe(std::atomic< bool > *const validity, const std::string &identifier="") const
decltype(counter_map)::iterator map_iterator
EnableObserverPointer & operator=(const EnableObserverPointer &)
std::atomic< unsigned int > counter
void unsubscribe(std::atomic< bool > *const validity, const std::string &identifier="") const
void list_subscribers() const
std::map< std::string, unsigned int > counter_map
std::vector< std::atomic< bool > * > validity_pointers
const std::type_info * object_info
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static const char * unknown_subscriber
#define AssertNothrow(cond, exc)
static ::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
static ::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)