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

# ACE_WFMO_Reactor_Handler_Repository Class Reference

Used to map <ACE_HANDLE>s onto the appropriate <ACE_Event_Handler> * and other information. More...

`#include <WFMO_Reactor.h>`

Collaboration diagram for ACE_WFMO_Reactor_Handler_Repository:

[legend]
List of all members.

## Public Methods
| ACE_WFMO_Reactor_Handler_Repository (ACE_WFMO_Reactor &wfmo_reactor)
| Constructor. More...
virtual | ~ACE_WFMO_Reactor_Handler_Repository (void)
| Destructor. More...
int | open (size_t size)
| Initialize the repository of the approriate <size>. More...
int | close (void)
| Close down the handler repository. More...
int | bind (ACE_HANDLE, ACE_Event_Handler *)
| Bind the <ACE_Event_Handler *> to the <ACE_HANDLE>. This is for the simple event entry. More...
int | bind_i (int io_entry, ACE_Event_Handler *event_handler, long network_events, ACE_HANDLE io_handle, ACE_HANDLE event_handle, int delete_event)
| Insert I/O <Event_Handler> entry into the system. This method assumes that the lock are head *before* this method is invoked. More...
int | unbind (ACE_HANDLE, ACE_Reactor_Mask mask)
| Remove the binding of <ACE_HANDLE> in accordance with the <mask>. More...
int | unbind_i (ACE_HANDLE, ACE_Reactor_Mask mask, int &changes_required)
| Non-lock-grabbing version of <unbind>. More...
void | unbind_all (void)
| Remove all bindings of <ACE_HANDLE, ACE_Event_Handler> tuples. More...
int | invalid_handle (ACE_HANDLE handle) const
size_t | max_handlep1 (void) const
| Maximum ACE_HANDLE value, plus 1. More...
ACE_HANDLE * | handles (void) const
| Pointer to the beginning of the current array of <ACE_HANDLE> *'s. More...
Current_Info * | current_info (void) const
| Pointer to the beginning of the current array of <ACE_Event_Handler> *'s. More...
virtual int | changes_required (void)
| Check if changes to the handle set are required. More...
virtual int | make_changes (void)
| Make changes to the handle set. More...
int | scheduled_for_deletion (size_t slot) const
| Check to see if <slot> has been scheduled for deletion. More...
int | modify_network_events_i (ACE_HANDLE io_handle, ACE_Reactor_Mask new_masks, ACE_Reactor_Mask &old_masks, long &new_network_events, ACE_HANDLE &event_handle, int &delete_event, int operation)
ACE_Reactor_Mask | bit_ops (long &existing_masks, ACE_Reactor_Mask to_be_removed_masks, int operation)
| This method is used to change the network mask left (if any) after a remove request to <WFMO_Reactor>. More...
int | suspend_handler_i (ACE_HANDLE handle, int &changes_required)
| Temporarily suspend entry. More...
int | resume_handler_i (ACE_HANDLE handle, int &changes_required)
| Resume suspended entry. More...
int | make_changes_in_current_infos (void)
| Deletions and suspensions in current_info_. More...
int | make_changes_in_suspension_infos (void)
| Deletions and resumptions in current_suspended_info_. More...
int | make_changes_in_to_be_added_infos (void)
| Deletions in to_be_added_info_, or transfers to current_info_ or current_suspended_info_ from to_be_added_info_. More...
int | remove_handler_i (size_t slot, ACE_Reactor_Mask mask)
| Removes the <ACE_Event_Handler> at <slot> from the table. More...
int | remove_suspended_handler_i (size_t slot, ACE_Reactor_Mask mask)
| Removes the <ACE_Event_Handler> at <slot> from the table. More...
int | remove_to_be_added_handler_i (size_t slot, ACE_Reactor_Mask to_be_removed_masks)
| Removes the <ACE_Event_Handler> at <slot> from the table. More...
int | handler (ACE_HANDLE handle, ACE_Reactor_Mask mask, ACE_Event_Handler **event_handler=0)
void | dump (void) const
| Dump the state of an object. More...
## Protected Attributes
ACE_WFMO_Reactor & | wfmo_reactor_
| Reference to our <WFMO_Reactor>. More...
size_t | max_size_
| Maximum number of handles. More...
ACE_HANDLE * | current_handles_
Current_Info * | current_info_
| Array of current entries in the table. More...
size_t | max_handlep1_
| A count of the number of active handles. More...
To_Be_Added_Info * | to_be_added_info_
| Information for entries to be added. More...
size_t | handles_to_be_added_
| Number of records to be added. More...
Suspended_Info * | current_suspended_info_
| Currently suspended handles. More...
size_t | suspended_handles_
| Number of currently suspended handles. More...
size_t | handles_to_be_suspended_
| Number of records to be suspended. More...
size_t | handles_to_be_resumed_
| Number of records to be resumed. More...
size_t | handles_to_be_deleted_
| Number of records to be deleted. More...
## Friends
class | ACE_WFMO_Reactor
class | ACE_WFMO_Reactor_Test

## Detailed Description

Used to map <ACE_HANDLE>s onto the appropriate <ACE_Event_Handler> * and other information.

## Constructor & Destructor Documentation

ACE_WFMO_Reactor_Handler_Repository::ACE_WFMO_Reactor_Handler_Repository | ( | ACE_WFMO_Reactor & | wfmo_reactor | ) |

| Constructor.

ACE_WFMO_Reactor_Handler_Repository::~ACE_WFMO_Reactor_Handler_Repository | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

int ACE_WFMO_Reactor_Handler_Repository::bind | ( | ACE_HANDLE | ,
|  | ACE_Event_Handler * |
| ) |

| Bind the <ACE_Event_Handler *> to the <ACE_HANDLE>. This is for the simple event entry.

int ACE_WFMO_Reactor_Handler_Repository::bind_i | ( | int | io_entry,
|  | ACE_Event_Handler * | event_handler,
|  | long | network_events,
|  | ACE_HANDLE | io_handle,
|  | ACE_HANDLE | event_handle,
|  | int | delete_event
| ) |

| Insert I/O <Event_Handler> entry into the system. This method assumes that the lock are head *before* this method is invoked.

ACE_Reactor_Mask ACE_WFMO_Reactor_Handler_Repository::bit_ops | ( | long & | existing_masks,
|  | ACE_Reactor_Mask | change_masks,
|  | int | operation
| ) |

| This method is used to change the network mask left (if any) after a remove request to <WFMO_Reactor>.

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::changes_required | ( | void |  | ) | `[virtual]`

| Check if changes to the handle set are required.

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::close | ( | void |  | ) |

| Close down the handler repository.

ACE_INLINE ACE_WFMO_Reactor_Handler_Repository::Current_Info * ACE_WFMO_Reactor_Handler_Repository::current_info | ( | void |  | ) | const

| Pointer to the beginning of the current array of <ACE_Event_Handler> *'s.

void ACE_WFMO_Reactor_Handler_Repository::dump | ( | void |  | ) | const

| Dump the state of an object.

int ACE_WFMO_Reactor_Handler_Repository::handler | ( | ACE_HANDLE | handle,
|  | ACE_Reactor_Mask | user_masks,
|  | ACE_Event_Handler ** | user_event_handler = 0
| ) |

| Check to see if <handle> is associated with a valid Event_Handler bound to <mask>. Return the <event_handler> associated with this <handler> if <event_handler> != 0.

ACE_INLINE ACE_HANDLE * ACE_WFMO_Reactor_Handler_Repository::handles | ( | void |  | ) | const

| Pointer to the beginning of the current array of <ACE_HANDLE> *'s.

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::invalid_handle | ( | ACE_HANDLE | handle | ) | const

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::make_changes | ( | void |  | ) | `[virtual]`

| Make changes to the handle set.

int ACE_WFMO_Reactor_Handler_Repository::make_changes_in_current_infos | ( | void |  | ) |

| Deletions and suspensions in current_info_.

int ACE_WFMO_Reactor_Handler_Repository::make_changes_in_suspension_infos | ( | void |  | ) |

| Deletions and resumptions in current_suspended_info_.

int ACE_WFMO_Reactor_Handler_Repository::make_changes_in_to_be_added_infos | ( | void |  | ) |

| Deletions in to_be_added_info_, or transfers to current_info_ or current_suspended_info_ from to_be_added_info_.

ACE_INLINE size_t ACE_WFMO_Reactor_Handler_Repository::max_handlep1 | ( | void |  | ) | const

| Maximum ACE_HANDLE value, plus 1.

int ACE_WFMO_Reactor_Handler_Repository::modify_network_events_i | ( | ACE_HANDLE | io_handle,
|  | ACE_Reactor_Mask | new_masks,
|  | ACE_Reactor_Mask & | old_masks,
|  | long & | new_network_events,
|  | ACE_HANDLE & | event_handle,
|  | int & | delete_event,
|  | int | operation
| ) |

| This method is used to calculate the network mask after a mask_op request to <WFMO_Reactor>. Note that because the <Event_Handler> may already be in the handler repository, we may have to find the old event and the old network events

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

| Initialize the repository of the approriate <size>.

int ACE_WFMO_Reactor_Handler_Repository::remove_handler_i | ( | size_t | slot,
|  | ACE_Reactor_Mask | to_be_removed_masks
| ) |

| Removes the <ACE_Event_Handler> at <slot> from the table.

int ACE_WFMO_Reactor_Handler_Repository::remove_suspended_handler_i | ( | size_t | slot,
|  | ACE_Reactor_Mask | to_be_removed_masks
| ) |

| Removes the <ACE_Event_Handler> at <slot> from the table.

int ACE_WFMO_Reactor_Handler_Repository::remove_to_be_added_handler_i | ( | size_t | slot,
|  | ACE_Reactor_Mask | to_be_removed_masks
| ) |

| Removes the <ACE_Event_Handler> at <slot> from the table.

int ACE_WFMO_Reactor_Handler_Repository::resume_handler_i | ( | ACE_HANDLE | handle,
|  | int & | changes_required
| ) |

| Resume suspended entry.

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::scheduled_for_deletion | ( | size_t | slot | ) | const

| Check to see if <slot> has been scheduled for deletion.

int ACE_WFMO_Reactor_Handler_Repository::suspend_handler_i | ( | ACE_HANDLE | handle,
|  | int & | changes_required
| ) |

| Temporarily suspend entry.

ACE_INLINE int ACE_WFMO_Reactor_Handler_Repository::unbind | ( | ACE_HANDLE | handle,
|  | ACE_Reactor_Mask | mask
| ) |

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

void ACE_WFMO_Reactor_Handler_Repository::unbind_all | ( | void |  | ) |

| Remove all bindings of <ACE_HANDLE, ACE_Event_Handler> tuples.

int ACE_WFMO_Reactor_Handler_Repository::unbind_i | ( | ACE_HANDLE | handle,
|  | ACE_Reactor_Mask | mask,
|  | int & | changes_required
| ) |

| Non-lock-grabbing version of <unbind>.

## Friends And Related Function Documentation

friend class ACE_WFMO_Reactor`[friend]`

friend class ACE_WFMO_Reactor_Test`[friend]`

## Member Data Documentation

ACE_HANDLE* ACE_WFMO_Reactor_Handler_Repository::current_handles_`[protected]`

| Array of <ACE_HANDLEs> passed to <WaitForMultipleObjects>. This is not part of the structure as the handle array needs to be passed directly to <WaitForMultipleObjects>.

Current_Info* ACE_WFMO_Reactor_Handler_Repository::current_info_`[protected]`

| Array of current entries in the table.

Suspended_Info* ACE_WFMO_Reactor_Handler_Repository::current_suspended_info_`[protected]`

| Currently suspended handles.

size_t ACE_WFMO_Reactor_Handler_Repository::handles_to_be_added_`[protected]`

| Number of records to be added.

size_t ACE_WFMO_Reactor_Handler_Repository::handles_to_be_deleted_`[protected]`

| Number of records to be deleted.

size_t ACE_WFMO_Reactor_Handler_Repository::handles_to_be_resumed_`[protected]`

| Number of records to be resumed.

size_t ACE_WFMO_Reactor_Handler_Repository::handles_to_be_suspended_`[protected]`

| Number of records to be suspended.

size_t ACE_WFMO_Reactor_Handler_Repository::max_handlep1_`[protected]`

| A count of the number of active handles.

size_t ACE_WFMO_Reactor_Handler_Repository::max_size_`[protected]`

| Maximum number of handles.

size_t ACE_WFMO_Reactor_Handler_Repository::suspended_handles_`[protected]`

| Number of currently suspended handles.

To_Be_Added_Info* ACE_WFMO_Reactor_Handler_Repository::to_be_added_info_`[protected]`

| Information for entries to be added.

ACE_WFMO_Reactor& ACE_WFMO_Reactor_Handler_Repository::wfmo_reactor_`[protected]`

| Reference to our <WFMO_Reactor>.

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

- WFMO_Reactor.h
- WFMO_Reactor.cpp
- WFMO_Reactor.i