#include <Event_Handler.h>
Collaboration diagram for ACE_Event_Handler_var:
Public Member Functions | |
ACE_Event_Handler_var (void) | |
Default constructor. | |
ACE_Event_Handler_var (ACE_Event_Handler *p) | |
Construct with a handler. | |
ACE_Event_Handler_var (const ACE_Event_Handler_var &b) | |
Copy constructor. | |
~ACE_Event_Handler_var (void) | |
Destructor. | |
ACE_Event_Handler_var & | operator= (ACE_Event_Handler *p) |
Assignment to a handler. | |
ACE_Event_Handler_var & | operator= (const ACE_Event_Handler_var &b) |
Assignment to a ACE_Event_Handler_var. | |
ACE_Event_Handler * | operator-> () const |
Overloaded "->". | |
ACE_Event_Handler * | handler (void) const |
Access the handler. | |
ACE_Event_Handler * | release (void) |
Release the handler. | |
void | reset (ACE_Event_Handler *p=0) |
Reset the handler. | |
Private Attributes | |
ACE_Event_Handler * | ptr_ |
Handler. |
Used to manage lifecycle of handlers. This class calls ACE_Event_Handler::remove_reference() in its destructor.
Definition at line 317 of file Event_Handler.h.
|
Default constructor.
Definition at line 311 of file Event_Handler.cpp.
00312 : ptr_ (0) 00313 { 00314 } |
|
Construct with a handler.
Definition at line 316 of file Event_Handler.cpp.
00317 : ptr_ (p) 00318 { 00319 } |
|
Copy constructor.
Definition at line 321 of file Event_Handler.cpp. References ACE_Event_Handler::add_reference().
00322 : ptr_ (b.ptr_) 00323 { 00324 if (this->ptr_ != 0) 00325 { 00326 this->ptr_->add_reference (); 00327 } 00328 } |
|
Destructor.
Definition at line 330 of file Event_Handler.cpp. References ACE_Event_Handler::remove_reference().
00331 { 00332 if (this->ptr_ != 0) 00333 { 00334 this->ptr_->remove_reference (); 00335 } 00336 } |
|
Access the handler.
Definition at line 378 of file Event_Handler.cpp. Referenced by ACE_WFMO_Reactor_Handler_Repository::handler().
00379 { 00380 return this->ptr_; 00381 } |
|
Overloaded "->".
Definition at line 372 of file Event_Handler.cpp.
00373 { 00374 return this->ptr_; 00375 } |
|
Assignment to a ACE_Event_Handler_var.
Definition at line 353 of file Event_Handler.cpp. References ACE_Event_Handler::add_reference(), ptr_, and ACE_Event_Handler::remove_reference().
00354 { 00355 if (this->ptr_ != b.ptr_) 00356 { 00357 if (this->ptr_ != 0) 00358 { 00359 this->ptr_->remove_reference (); 00360 } 00361 00362 if ((this->ptr_ = b.ptr_) != 0) 00363 { 00364 this->ptr_->add_reference (); 00365 } 00366 } 00367 00368 return *this; 00369 } |
|
Assignment to a handler.
Definition at line 339 of file Event_Handler.cpp. References ACE_Event_Handler::remove_reference().
00340 { 00341 if (this->ptr_ == p) 00342 return *this; 00343 00344 if (this->ptr_ != 0) 00345 this->ptr_->remove_reference (); 00346 00347 this->ptr_ = p; 00348 00349 return *this; 00350 } |
|
Release the handler.
Definition at line 384 of file Event_Handler.cpp. Referenced by ACE_WFMO_Reactor_Handler_Repository::handler(), and ACE_Select_Reactor_Notify::notify().
00385 { 00386 ACE_Event_Handler *old = this->ptr_; 00387 this->ptr_ = 0; 00388 return old; 00389 } |
|
Reset the handler.
Definition at line 392 of file Event_Handler.cpp.
00393 {
00394 *this = p;
00395 }
|
|
Handler.
Definition at line 355 of file Event_Handler.h. Referenced by operator=(). |