- void *obj;
- void (object::*meth)(watcher &, int);
-
- /* a proxy is a kind of recipe on how to call a specific class method */
- struct proxy_base {
- virtual void call (void *obj, void (object::*meth)(watcher &, int), watcher &w, int) const = 0;
- };
- template<class O1, class O2>
- struct proxy : proxy_base {
- virtual void call (void *obj, void (object::*meth)(watcher &, int), watcher &w, int e) const
- {
- ((reinterpret_cast<O1 *>(obj)) ->* (reinterpret_cast<void (O2::*)(watcher &, int)>(meth)))
- (w, e);
- }
- };
-
- proxy_base *prxy;