40 , object_info(subscriptor.object_info)
42 for (
auto *
const validity_ptr : subscriptor.validity_pointers)
43 *validity_ptr =
false;
44 subscriptor.validity_pointers.clear();
52 *validity_ptr =
false;
82 if (std::uncaught_exceptions() == 0)
84 std::string infostring;
87 if (map_entry.second > 0)
89 "\n from Subscriber " + std::string(map_entry.first);
92 if (infostring.empty())
93 infostring =
"<none>";
103 <<
"---------------------------------------------------------"
105 <<
"An object pointed to by a ObserverPointer is being destroyed."
107 <<
"Under normal circumstances, this would abort the program."
109 <<
"However, another exception is being processed at the"
111 <<
"moment, so the program will continue to run to allow"
113 <<
"this exception to be processed." << std::endl
114 <<
"---------------------------------------------------------"
126 for (
auto *
const validity_ptr : s.validity_pointers)
127 *validity_ptr =
false;
129 object_info = s.object_info;
137 const std::string &
id)
const
139 std::scoped_lock lock(
mutex);
155 const std::string &
id)
const
164 std::scoped_lock lock(
mutex);
181 auto validity_ptr_it =
188 "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
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
constexpr bool running_in_debug_mode()
#define DEAL_II_NAMESPACE_CLOSE
#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)