3 This file is part of libmspio
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
16 #include <msp/time/timedelta.h>
33 inline PollEvent operator|(PollEvent e, PollEvent f)
34 { return PollEvent((int)e|(int)f); }
36 inline PollEvent operator&(PollEvent e, PollEvent f)
37 { return PollEvent((int)e&(int)f); }
39 inline PollEvent operator~(PollEvent e)
40 { return PollEvent(~(int)e); }
50 Slot(Base *o, PollEvent e): object(o), events(e) { }
52 typedef std::list<Slot> SlotSeq;
55 void set_object(Base &, PollEvent);
57 int poll(const Time::TimeDelta &);
58 const SlotSeq &get_result() const { return poll_result; }
60 typedef std::map<Base *, Slot> SlotMap;
70 std::vector<pollfd> pfd;
78 PollEvent poll(Base &, PollEvent);
79 PollEvent poll(Base &, PollEvent, const Time::TimeDelta &);