15#ifndef dealii_subscriptor_h
16#define dealii_subscriptor_h
116 subscribe(std::atomic<bool> *
const validity,
117 const std::string &identifier =
"")
const;
127 const std::string &identifier =
"")
const;
140 template <
typename StreamType>
164 <<
"Object of class " << arg2 <<
" is still used by " << arg1
167 <<
"(Additional information: " << arg3 <<
")\n\n"
168 <<
"See the entry in the Frequently Asked Questions of "
169 <<
"deal.II (linked to from http://www.dealii.org/) for "
170 <<
"a lot more information on what this error means and "
171 <<
"how to fix programs in which it happens.");
180 <<
"No subscriber with identifier <" << arg2
181 <<
"> subscribes to this object of class " << arg1
182 <<
". Consequently, it cannot be unsubscribed.");
198 template <
class Archive>
200 serialize(Archive &ar,
const unsigned int version);
307template <
class Archive>
315template <
typename StreamType>
319 std::lock_guard<std::mutex> lock(
mutex);
322 stream << it.second <<
'/' <<
counter <<
" subscriptions from \""
323 << it.first <<
'\"' << std::endl;
std::vector< std::atomic< bool > * > validity_pointers
void unsubscribe(std::atomic< bool > *const validity, const std::string &identifier="") const
std::atomic< unsigned int > counter
void check_no_subscribers() const noexcept
void list_subscribers() const
const std::type_info * object_info
Subscriptor & operator=(const Subscriptor &)
void subscribe(std::atomic< bool > *const validity, const std::string &identifier="") const
void serialize(Archive &ar, const unsigned int version)
std::map< std::string, unsigned int > counter_map
decltype(counter_map)::iterator map_iterator
decltype(counter_map)::value_type map_value_type
unsigned int n_subscriptions() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
#define DeclException3(Exception3, type1, type2, type3, outsequence)