#include <usertable.h>
Public Member Functions | |
| EventDispatcher (int iPipeFd, Inotify *pIn, InotifyWatch *pSys, InotifyWatch *pUser) | |
| Constructor. | |
| ~EventDispatcher () | |
| Destructor. | |
| bool | ProcessEvents () |
| Processes events. | |
| void | Register (UserTable *pTab) |
| Registers an user table. | |
| void | Unregister (UserTable *pTab) |
| Unregisters an user table. | |
| size_t | GetSize () const |
| Returns the poll data size. | |
| pollfd * | GetPollData () |
| Returns the poll data. | |
| void | Rebuild () |
| Rebuilds the poll array data. | |
| void | Clear () |
| Removes all registered user tables. | |
This class processes events and distributes them as needed.
| EventDispatcher::EventDispatcher | ( | int | iPipeFd, | |
| Inotify * | pIn, | |||
| InotifyWatch * | pSys, | |||
| InotifyWatch * | pUser | |||
| ) |
Constructor.
| [in] | iPipeFd | pipe descriptor |
| [in] | pIn | inotify object for table management |
| [in] | pSys | watch for system tables |
| [in] | pUser | watch for user tables |
| EventDispatcher::~EventDispatcher | ( | ) |
Destructor.
| bool EventDispatcher::ProcessEvents | ( | ) |
Processes events.
| void EventDispatcher::Register | ( | UserTable * | pTab | ) |
Registers an user table.
| [in] | pTab | user table |
| void EventDispatcher::Unregister | ( | UserTable * | pTab | ) |
Unregisters an user table.
| [in] | pTab | user table |
| size_t EventDispatcher::GetSize | ( | ) | const [inline] |
Returns the poll data size.
| struct pollfd* EventDispatcher::GetPollData | ( | ) | [inline] |
Returns the poll data.
| void EventDispatcher::Rebuild | ( | ) |
Rebuilds the poll array data.
| void EventDispatcher::Clear | ( | ) | [inline] |
Removes all registered user tables.
It doesn't cause poll data rebuilding.
1.5.1