ACE 8.0.1
|
Used to map ACE_HANDLEs onto the appropriate Event_Tuple. More...
Public Member Functions | |
Handler_Repository () | |
Constructor. | |
int | open (size_t size) |
int | close () |
Close down the repository. | |
Repository Manipulation Operations | |
Methods used to search and modify the handler repository. | |
Event_Tuple * | find (ACE_HANDLE handle) |
int | bind (ACE_HANDLE handle, ACE_Event_Handler *handler, ACE_Reactor_Mask mask) |
int | unbind (ACE_HANDLE handle, bool decr_refcnt=true) |
int | unbind_all () |
Remove all the registered tuples. | |
Sanity Checking | |
Methods used to prevent "out-of-range" errors when indexing the underlying handler array. | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. | |
int | size_ |
Current number of handles. | |
int | max_size_ |
Maximum number of handles. | |
Event_Tuple * | handlers_ |
The underlying array of event handlers. | |
bool | invalid_handle (ACE_HANDLE handle) const |
Declare the dynamic allocation hooks. | |
bool | handle_in_range (ACE_HANDLE handle) const |
Declare the dynamic allocation hooks. | |
size_t | size () const |
Returns the current table size. | |
size_t | max_size () const |
Returns the maximum table size. | |
void | dump () const |
Dump the state of an object. | |
Used to map ACE_HANDLEs onto the appropriate Event_Tuple.
This class is simply a container that maps a handle to its corresponding event tuple. It is not meant for use outside of the Dev_Poll_Reactor.
ACE_Dev_Poll_Reactor::Handler_Repository::Handler_Repository | ( | ) |
Constructor.
int ACE_Dev_Poll_Reactor::Handler_Repository::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.
int ACE_Dev_Poll_Reactor::Handler_Repository::close | ( | ) |
Close down the repository.
void ACE_Dev_Poll_Reactor::Handler_Repository::dump | ( | ) | const |
Dump the state of an object.
ACE_Dev_Poll_Reactor::Event_Tuple * ACE_Dev_Poll_Reactor::Handler_Repository::find | ( | ACE_HANDLE | handle | ) |
Return a pointer to the Event_Tuple associated with handle. If there is none associated, returns 0 and sets errno.
bool ACE_Dev_Poll_Reactor::Handler_Repository::handle_in_range | ( | ACE_HANDLE | handle | ) | const |
Declare the dynamic allocation hooks.
bool ACE_Dev_Poll_Reactor::Handler_Repository::invalid_handle | ( | ACE_HANDLE | handle | ) | const |
Declare the dynamic allocation hooks.
|
inline |
Returns the maximum table size.
Initialize a repository that can map handles up to the value size. Since the event tuples are accessed directly using the handle as an index, size sets the maximum handle value, minus 1.
|
inline |
Returns the current table size.
int ACE_Dev_Poll_Reactor::Handler_Repository::unbind | ( | ACE_HANDLE | handle, |
bool | decr_refcnt = true ) |
Remove the binding for handle; optionally decrement the associated handler's reference count.
int ACE_Dev_Poll_Reactor::Handler_Repository::unbind_all | ( | ) |
Remove all the registered tuples.
ACE_Dev_Poll_Reactor::Handler_Repository::ACE_ALLOC_HOOK_DECLARE |
Declare the dynamic allocation hooks.
|
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.
|
private |
Maximum number of handles.
|
private |
Current number of handles.