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.inl.

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.inl.

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.inl.

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 71 of file EC_Lifetime_Utils_T.inl.

References TAO_EC_Auto_Command< T >::allow_command_.

00072 {
00073   this->allow_command_ = 1;
00074 }

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

Definition at line 78 of file EC_Lifetime_Utils_T.inl.

References TAO_EC_Auto_Command< T >::allow_command_.

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

00079 {
00080   this->allow_command_ = 0;
00081 }

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

Definition at line 52 of file EC_Lifetime_Utils_T.inl.

References 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       try
00059         {
00060           this->command_.execute ();
00061         }
00062       catch (const CORBA::Exception&)
00063         {
00064           // ignore.
00065         }
00066     }
00067 }

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.inl.

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.inl.

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 74 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 73 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 Sun Jan 27 13:41:56 2008 for TAO_RTEvent by doxygen 1.3.6