incron 0.5.10

- Main Page
- Classes
- Files

- Class List
- Class Members

Public Member Functions
EventDispatcher Class Reference

Event dispatcher class. More...

`#include <usertable.h>`

List of all members.

## 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.
struct pollfd * | GetPollData ()
| Returns the poll data.
void | Rebuild ()
| Rebuilds the poll array data.
void | Clear ()
| Removes all registered user tables.

## Detailed Description

Event dispatcher class.

This class processes events and distributes them as needed.

## Constructor & Destructor Documentation

EventDispatcher::EventDispatcher | ( | int | iPipeFd,
|  | Inotify * | pIn,
|  | InotifyWatch * | pSys,
|  | InotifyWatch * | pUser
| ) |  |

Constructor.

Parameters:

  [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.

## Member Function Documentation

void EventDispatcher::Clear | ( |  | ) | `[inline]`

Removes all registered user tables.

It doesn't cause poll data rebuilding.

struct pollfd* EventDispatcher::GetPollData | ( |  | ) | `[inline, read]`

Returns the poll data.

Returns:
  poll data

size_t EventDispatcher::GetSize | ( |  | ) | const`[inline]`

Returns the poll data size.

Returns:
  poll data size

bool EventDispatcher::ProcessEvents | ( |  | ) |

Processes events.

Returns:
  pipe event occurred yes/no

void EventDispatcher::Rebuild | ( |  | ) |

Rebuilds the poll array data.

void EventDispatcher::Register | ( | UserTable * | pTab | ) |

Registers an user table.

Parameters:

  [in] | pTab | user table

void EventDispatcher::Unregister | ( | UserTable * | pTab | ) |

Unregisters an user table.

Parameters:

  [in] | pTab | user table

The documentation for this class was generated from the following files:

- usertable.h
- usertable.cpp