16 #ifndef dealii_subscriptor_h 17 #define dealii_subscriptor_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/exceptions.h> 28 DEAL_II_NAMESPACE_OPEN
108 void subscribe (
const char *identifier =
nullptr)
const;
116 void unsubscribe (
const char *identifier =
nullptr)
const;
139 int, std::string, std::string,
140 <<
"Object of class " << arg2
141 <<
" is still used by " << arg1 <<
" other objects." 143 <<
"(Additional information: " << arg3 <<
")\n\n" 144 <<
"See the entry in the Frequently Asked Questions of " 145 <<
"deal.II (linked to from http://www.dealii.org/) for " 146 <<
"a lot more information on what this error means and " 147 <<
"how to fix programs in which it happens.");
154 <<
"No subscriber with identifier <" << arg2
155 <<
"> subscribes to this object of class " << arg1
156 <<
". Consequently, it cannot be unsubscribed.");
171 template <
class Archive>
172 void serialize(Archive &ar,
const unsigned int version);
178 typedef std::map<const char *, unsigned int>::value_type
184 typedef std::map<const char *, unsigned int>::iterator
237 template <class Archive>
247 DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInUse(int arg1, std::string arg2, std::string arg3)
#define DeclException2(Exception2, type1, type2, outsequence)
const std::type_info * object_info
void unsubscribe(const char *identifier=nullptr) const
Subscriptor & operator=(const Subscriptor &)
void list_subscribers() const
void serialize(Archive &ar, const unsigned int version)
unsigned int n_subscriptions() const
void subscribe(const char *identifier=nullptr) const
std::atomic< unsigned int > counter
std::map< const char *, unsigned int > counter_map
std::map< const char *, unsigned int >::iterator map_iterator
std::map< const char *, unsigned int >::value_type map_value_type
#define DeclException3(Exception3, type1, type2, type3, outsequence)
static ::ExceptionBase & ExcNoSubscriber(std::string arg1, std::string arg2)
void check_no_subscribers() const noexcept