Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# ACE_Dev_Poll_Reactor_Handler_Repository Class Reference

Used to map ACE_HANDLEs onto the appropriate ACE_Event_Handler *. More...

`#include <Dev_Poll_Reactor.h>`

Collaboration diagram for ACE_Dev_Poll_Reactor_Handler_Repository:

[legend]
List of all members.

## Public Methods
| ACE_Dev_Poll_Reactor_Handler_Repository (void)
| Constructor. More...
int | open (size_t size)
| Initialize a repository of the appropriate <size>. More...
int | close (void)
| Close down the repository. More...
size_t | size (void) const
| Returns the current table size. More...
void | dump (void) const
| Dump the state of an object. More...
Repository Manipulation Operations
Methods used to search and modify the handler repository.
ACE_Event_Handler * | find (ACE_HANDLE handle, size_t *index_p=0)
void | mask (ACE_HANDLE handle, ACE_Reactor_Mask mask)
| Set the event mask for event handler associated with the given handle. More...
ACE_Reactor_Mask | mask (ACE_HANDLE handle)
| Retrieve the event mask for the event handler associated with the given handle. More...
void | suspend (ACE_HANDLE handle)
| Mark the event handler associated with the given handle as "suspended.". More...
void | resume (ACE_HANDLE handle)
| Mark the event handler associated with the given handle as "resumed.". More...
int | suspended (ACE_HANDLE handle) const
| Is the event handler for the given handle suspended? More...
int | bind (ACE_HANDLE handle, ACE_Event_Handler *handler, ACE_Reactor_Mask mask)
| Bind the ACE_Event_Handler to the ACE_HANDLE with the appropriate ACE_Reactor_Mask settings. More...
int | unbind (ACE_HANDLE handle)
| Remove the binding of ACE_HANDLE in accordance with the <mask>. More...
int | unbind_all (void)
| Remove all the (ACE_HANDLE, ACE_Event_Handler) tuples. More...
unsigned long | add_ref (ACE_HANDLE handle)
| Increase the reference count on the event handler corresponding to the given file descriptor. More...
unsigned long | remove_ref (ACE_HANDLE handle)
| Decrease the reference count on the event handler corresponding to the given file descriptor. More...
Sanity Checking
Methods used to prevent "out-of-range" errors when indexing the underlying handler array.
int | invalid_handle (ACE_HANDLE handle) const
int | handle_in_range (ACE_HANDLE handle) const
## Public Attributes
| ACE_ALLOC_HOOK_DECLARE
| Declare the dynamic allocation hooks. More...
## Private Attributes
int | max_size_
| Maximum number of handles. More...
ACE_Dev_Poll_Event_Tuple * | handlers_
| The underlying array of event handlers. More...

## Detailed Description

Used to map ACE_HANDLEs onto the appropriate ACE_Event_Handler *.

This class is simply a container that maps a handle to its corresponding event handler. It is not meant for use outside of the Dev_Poll_Reactor.

## Constructor & Destructor Documentation

ACE_Dev_Poll_Reactor_Handler_Repository::ACE_Dev_Poll_Reactor_Handler_Repository | ( | void |  | ) |

| Constructor.

## Member Function Documentation

ACE_INLINE unsigned long ACE_Dev_Poll_Reactor_Handler_Repository::add_ref | ( | ACE_HANDLE | handle | ) |

| Increase the reference count on the event handler corresponding to the given file descriptor. Returns: Returns the updated reference count.

int ACE_Dev_Poll_Reactor_Handler_Repository::bind | ( | ACE_HANDLE | handle,
|  | ACE_Event_Handler * | event_handler,
|  | ACE_Reactor_Mask | mask
| ) |

| Bind the ACE_Event_Handler to the ACE_HANDLE with the appropriate ACE_Reactor_Mask settings.

int ACE_Dev_Poll_Reactor_Handler_Repository::close | ( | void |  | ) |

| Close down the repository.

void ACE_Dev_Poll_Reactor_Handler_Repository::dump | ( | void |  | ) | const

| Dump the state of an object.

ACE_Event_Handler * ACE_Dev_Poll_Reactor_Handler_Repository::find | ( | ACE_HANDLE | handle,
|  | size_t * | index_p = 0
| ) |

| Return the ACE_Event_Handler associated with ACE_HANDLE. If index_p is non-zero, then return the index location of the handle, if found.

int ACE_Dev_Poll_Reactor_Handler_Repository::handle_in_range | ( | ACE_HANDLE | handle | ) | const

int ACE_Dev_Poll_Reactor_Handler_Repository::invalid_handle | ( | ACE_HANDLE | handle | ) | const

ACE_INLINE ACE_Reactor_Mask ACE_Dev_Poll_Reactor_Handler_Repository::mask | ( | ACE_HANDLE | handle | ) |

| Retrieve the event mask for the event handler associated with the given handle.

ACE_INLINE void ACE_Dev_Poll_Reactor_Handler_Repository::mask | ( | ACE_HANDLE | handle,
|  | ACE_Reactor_Mask | mask
| ) |

| Set the event mask for event handler associated with the given handle.

int ACE_Dev_Poll_Reactor_Handler_Repository::open | ( | size_t | size | ) |

| Initialize a repository of the appropriate <size>.

ACE_INLINE unsigned long ACE_Dev_Poll_Reactor_Handler_Repository::remove_ref | ( | ACE_HANDLE | handle | ) |

| Decrease the reference count on the event handler corresponding to the given file descriptor. Returns: Returns the updated reference count.

ACE_INLINE void ACE_Dev_Poll_Reactor_Handler_Repository::resume | ( | ACE_HANDLE | handle | ) |

| Mark the event handler associated with the given handle as "resumed.".

ACE_INLINE size_t ACE_Dev_Poll_Reactor_Handler_Repository::size | ( | void |  | ) | const

| Returns the current table size.

ACE_INLINE void ACE_Dev_Poll_Reactor_Handler_Repository::suspend | ( | ACE_HANDLE | handle | ) |

| Mark the event handler associated with the given handle as "suspended.".

ACE_INLINE int ACE_Dev_Poll_Reactor_Handler_Repository::suspended | ( | ACE_HANDLE | handle | ) | const

| Is the event handler for the given handle suspended?

int ACE_Dev_Poll_Reactor_Handler_Repository::unbind | ( | ACE_HANDLE | handle | ) |

| Remove the binding of ACE_HANDLE in accordance with the <mask>.

int ACE_Dev_Poll_Reactor_Handler_Repository::unbind_all | ( | void |  | ) |

| Remove all the (ACE_HANDLE, ACE_Event_Handler) tuples.

## Member Data Documentation

ACE_Dev_Poll_Reactor_Handler_Repository::ACE_ALLOC_HOOK_DECLARE

| Declare the dynamic allocation hooks.

ACE_Dev_Poll_Event_Tuple* ACE_Dev_Poll_Reactor_Handler_Repository::handlers_`[private]`

| The underlying array of event handlers. The array of event handlers is directly indexed directly using an ACE_HANDLE value. This is Unix-specific.

int ACE_Dev_Poll_Reactor_Handler_Repository::max_size_`[private]`

| Maximum number of handles.

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

- Dev_Poll_Reactor.h
- Dev_Poll_Reactor.cpp
- Dev_Poll_Reactor.inl