16#ifndef dealii_subscriptor_h
17#define dealii_subscriptor_h
117 subscribe(std::atomic<bool> *
const validity,
118 const std::string & identifier =
"")
const;
128 const std::string & identifier =
"")
const;
141 template <
typename StreamType>
165 <<
"Object of class " << arg2 <<
" is still used by " << arg1
168 <<
"(Additional information: " << arg3 <<
")\n\n"
169 <<
"See the entry in the Frequently Asked Questions of "
170 <<
"deal.II (linked to from http://www.dealii.org/) for "
171 <<
"a lot more information on what this error means and "
172 <<
"how to fix programs in which it happens.");
181 <<
"No subscriber with identifier <" << arg2
182 <<
"> subscribes to this object of class " << arg1
183 <<
". Consequently, it cannot be unsubscribed.");
199 template <
class Archive>
201 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;
Subscriptor & operator=(const Subscriptor &)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
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
void subscribe(std::atomic< bool > *const validity, const std::string &identifier="") const
static ::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
void serialize(Archive &ar, const unsigned int version)
std::map< std::string, unsigned int > counter_map
#define DeclException2(Exception2, type1, type2, outsequence)
static ::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
#define DeclException3(Exception3, type1, type2, type3, outsequence)
decltype(counter_map)::iterator map_iterator
decltype(counter_map)::value_type map_value_type
unsigned int n_subscriptions() const