18 #include <tbb/mutex.h>
19 #include <tbb/compat/condition_variable>
21 #include <boost/noncopyable.hpp>
23 #include <boost/unordered/unordered_map.hpp>
83 bool upgradeToWriter();
84 void downgradeToReader();
103 virtual void runCallback() = 0;
152 virtual bool active()
const;
164 virtual bool enabled(
const std::string&,
bool def)
const;
170 virtual void printInfo(std::ostream&)
const;
195 template <
typename Container>
198 typedef typename Container::iterator iterator;
199 for (iterator i=cont.begin(), end=cont.end(); i != end; ++i)
203 template <
typename Container>
204 void addCallbacks(Container& cont,
const std::string& tag,
bool def=
true)
206 bool runNow = !
enabled(tag, def);
207 typedef typename Container::iterator iterator;
208 for (iterator i=cont.begin(), end=cont.end(); i != end; ++i)
212 template <
typename Container>
235 typedef tbb::interface5::unique_lock<Mutex>
Lock;