Template Struct watcher

Struct Documentation

template<typename WatchT>
struct udho::watcher

Public Types

typedef WatchT watch_type
typedef watch_type::key_type key_type
typedef watcher<WatchT> self_type
typedef std::list<watch_type> container_type
typedef container_type::iterator iterator_type
typedef std::multimap<key_type, iterator_type> index_type
typedef boost::posix_time::ptime time_point_type
typedef boost::posix_time::time_duration time_duration_type

Public Functions

watcher(boost::asio::io_service &io, const time_duration_type &duration)
bool insert(watch_type watch)
void expired(const boost::system::error_code &err)
std::size_t notify(const key_type &key)
std::size_t notify_all()
void async_notify(const key_type &key)
void async_notify_all()

Public Members

boost::asio::io_service &_io
time_duration_type _duration
boost::asio::deadline_timer _timer
container_type _watchers
index_type _index
boost::mutex _mutex