TAO_EC_Auto_Command< T > Class Template Reference

#include <EC_Lifetime_Utils_T.h>

Collaboration diagram for TAO_EC_Auto_Command< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_EC_Auto_Command (void)
 TAO_EC_Auto_Command (const T &command)
 ~TAO_EC_Auto_Command (void)
void set_command (const T &command)
void set_command (TAO_EC_Auto_Command< T > &auto_command)
void execute (void)
void allow_command (void)
void disallow_command (void)

Private Member Functions

 TAO_EC_Auto_Command (const TAO_EC_Auto_Command &)
TAO_EC_Auto_Commandoperator= (const TAO_EC_Auto_Command &)

Private Attributes

command_
int allow_command_

template<class T>
class TAO_EC_Auto_Command< T >


Constructor & Destructor Documentation

template<class T>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_EC_Auto_Command< T >::TAO_EC_Auto_Command void   ) 
 

Definition at line 9 of file EC_Lifetime_Utils_T.i.

00010   : command_ ()
00011   , allow_command_ (0)
00012 {
00013 }

template<class T>
ACE_INLINE TAO_EC_Auto_Command< T >::TAO_EC_Auto_Command const T &  command  ) 
 

Definition at line 17 of file EC_Lifetime_Utils_T.i.

00018   : command_ (command)
00019   , allow_command_ (1)
00020 {
00021 }

template<class T>
ACE_INLINE TAO_EC_Auto_Command< T >::~TAO_EC_Auto_Command void   ) 
 

Definition at line 25 of file EC_Lifetime_Utils_T.i.

References TAO_EC_Auto_Command< T >::execute().

00026 {
00027   this->execute ();
00028 }

template<class T>
TAO_EC_Auto_Command< T >::TAO_EC_Auto_Command const TAO_EC_Auto_Command< T > &   )  [private]
 


Member Function Documentation

template<class T>
ACE_INLINE void TAO_EC_Auto_Command< T >::allow_command void   ) 
 

Definition at line 73 of file EC_Lifetime_Utils_T.i.

References TAO_EC_Auto_Command< T >::allow_command_.

00074 {
00075   this->allow_command_ = 1;
00076 }

template<class T>
ACE_INLINE void TAO_EC_Auto_Command< T >::disallow_command void   ) 
 

Definition at line 80 of file EC_Lifetime_Utils_T.i.

References TAO_EC_Auto_Command< T >::allow_command_.

Referenced by TAO_ECG_Mcast_Gateway::init_receiver(), TAO_ECG_Mcast_Gateway::init_sender(), and TAO_ECG_Mcast_Gateway::run().

00081 {
00082   this->allow_command_ = 0;
00083 }

template<class T>
ACE_INLINE void TAO_EC_Auto_Command< T >::execute void   ) 
 

Definition at line 52 of file EC_Lifetime_Utils_T.i.

References ACE_CATCHANY, ACE_ENDTRY, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_TRY_CHECK, ACE_TRY_NEW_ENV, TAO_EC_Auto_Command< T >::allow_command_, and TAO_EC_Auto_Command< T >::command_.

Referenced by TAO_ECG_UDP_Sender::shutdown(), TAO_ECG_UDP_Receiver::shutdown(), and TAO_EC_Auto_Command< T >::~TAO_EC_Auto_Command().

00053 {
00054   if (this->allow_command_)
00055     {
00056       this->allow_command_ = 0;
00057 
00058       ACE_TRY_NEW_ENV
00059         {
00060           this->command_.execute (ACE_ENV_SINGLE_ARG_PARAMETER);
00061           ACE_TRY_CHECK;
00062         }
00063       ACE_CATCHANY
00064         {
00065           // ignore.
00066         }
00067       ACE_ENDTRY;
00068     }
00069 }

template<class T>
TAO_EC_Auto_Command& TAO_EC_Auto_Command< T >::operator= const TAO_EC_Auto_Command< T > &   )  [private]
 

template<class T>
ACE_INLINE void TAO_EC_Auto_Command< T >::set_command TAO_EC_Auto_Command< T > &  auto_command  ) 
 

Definition at line 40 of file EC_Lifetime_Utils_T.i.

References TAO_EC_Auto_Command< T >::allow_command_, and TAO_EC_Auto_Command< T >::command_.

00041 {
00042   if (this == &auto_command)
00043     return;
00044 
00045   this->command_ = auto_command.command_;
00046   this->allow_command_ = auto_command.allow_command_;
00047   auto_command.allow_command_ = 0;
00048 }

template<class T>
ACE_INLINE void TAO_EC_Auto_Command< T >::set_command const T &  command  ) 
 

Definition at line 32 of file EC_Lifetime_Utils_T.i.

References TAO_EC_Auto_Command< T >::allow_command_, and TAO_EC_Auto_Command< T >::command_.

Referenced by TAO_ECG_Mcast_Gateway::init_receiver(), TAO_ECG_Mcast_Gateway::init_sender(), TAO_ECG_UDP_Sender::new_connect(), TAO_ECG_UDP_Receiver::new_connect(), and TAO_ECG_Mcast_Gateway::run().

00033 {
00034   this->command_ = command;
00035   this->allow_command_ = 1;
00036 }


Member Data Documentation

template<class T>
int TAO_EC_Auto_Command< T >::allow_command_ [private]
 

Definition at line 75 of file EC_Lifetime_Utils_T.h.

Referenced by TAO_EC_Auto_Command< T >::allow_command(), TAO_EC_Auto_Command< T >::disallow_command(), TAO_EC_Auto_Command< T >::execute(), and TAO_EC_Auto_Command< T >::set_command().

template<class T>
T TAO_EC_Auto_Command< T >::command_ [private]
 

Definition at line 74 of file EC_Lifetime_Utils_T.h.

Referenced by TAO_EC_Auto_Command< T >::execute(), and TAO_EC_Auto_Command< T >::set_command().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:14:20 2006 for TAO_RTEvent by doxygen 1.3.6