ESF_Delayed_Command.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 /**
00004  *  @file   ESF_Delayed_Command.h
00005  *
00006  *  ESF_Delayed_Command.h,v 1.6 2006/03/15 07:52:21 jtc Exp
00007  *
00008  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00009  *
00010  *  http://doc.ece.uci.edu/~coryan/EC/index.html
00011  */
00012 
00013 #ifndef TAO_ESF_DELAYED_COMMAND_H
00014 #define TAO_ESF_DELAYED_COMMAND_H
00015 
00016 #include "ace/Functor.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 # pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00023 
00024 /**
00025  * @class TAO_ESF_Connected_Command
00026  *
00027  * @brief Implements a Command object that invokes the connected_i()
00028  * method on the target, passing an argument of type Object.
00029  *
00030  * <H2>Memory Managment</H2>
00031  * It does not assume ownership of Object nor the Target
00032  * arguments.
00033  * Usually allocated from the heap or an allocator; but it is not
00034  * self-managed.
00035  *
00036  * <H2>Locking</H2>
00037  * No provisions for locking, access must be serialized
00038  * externally.
00039  */
00040 template<class Target, class Object>
00041 class TAO_ESF_Connected_Command : public ACE_Command_Base
00042 {
00043 public:
00044   /// constructor...
00045   TAO_ESF_Connected_Command (Target *target,
00046                             Object *object);
00047 
00048   /// The callback method, if the argument is not nil it is interpreted
00049   /// as a CORBA::Environment.
00050   virtual int execute (void *arg);
00051 
00052 private:
00053   /// The target
00054   Target *target_;
00055 
00056   /// The argument
00057   Object *object_;
00058 };
00059 
00060 // ****************************************************************
00061 
00062 /**
00063  * @class TAO_ESF_Reconnected_Command
00064  *
00065  * @brief Implements a Command object that invokes the reconnected_i()
00066  * method on the target, passing an argument of type Object.
00067  *
00068  * <H2>Memory Managment</H2>
00069  * It does not assume ownership of Object nor the Target
00070  * arguments.
00071  * Usually allocated from the heap or an allocator; but it is not
00072  * self-managed.
00073  *
00074  * <H2>Locking</H2>
00075  * No provisions for locking, access must be serialized
00076  * externally.
00077  */
00078 template<class Target, class Object>
00079 class TAO_ESF_Reconnected_Command : public ACE_Command_Base
00080 {
00081 public:
00082   /// constructor...
00083   TAO_ESF_Reconnected_Command (Target *target,
00084                             Object *object);
00085 
00086   /// The callback method, if the argument is not nil it is interpreted
00087   /// as a CORBA::Environment.
00088   virtual int execute (void *arg);
00089 
00090 private:
00091   /// The target
00092   Target *target_;
00093 
00094   /// The argument
00095   Object *object_;
00096 };
00097 
00098 // ****************************************************************
00099 
00100 /**
00101  * @class TAO_ESF_Disconnected_Command
00102  *
00103  * @brief Implements a Command object that invokes the
00104  * disconnected_i() method on the target, passing an argument of type
00105  * Object. 
00106  *
00107  * <H2>Memory Managment</H2>
00108  * It does not assume ownership of Object nor the Target
00109  * arguments.
00110  * Usually allocated from the heap or an allocator; but it is not
00111  * self-managed.
00112  *
00113  * <H2>Locking</H2>
00114  * No provisions for locking, access must be serialized
00115  * externally.
00116  */
00117 template<class Target, class Object>
00118 class TAO_ESF_Disconnected_Command : public ACE_Command_Base
00119 {
00120 public:
00121   /// constructor...
00122   TAO_ESF_Disconnected_Command (Target *target,
00123                                Object *object);
00124 
00125   /// The callback method, if the argument is not nil it is interpreted
00126   /// as a CORBA::Environment.
00127   virtual int execute (void *arg);
00128 
00129 private:
00130   /// The target
00131   Target *target_;
00132 
00133   /// The argument
00134   Object *object_;
00135 };
00136 
00137 // ****************************************************************
00138 
00139 /**
00140  * @class TAO_ESF_Shutdown_Command
00141  *
00142  * @brief Implements a Command object that invokes the shutdown_i()
00143  * method on the target, passing an argument of type Object.
00144  *
00145  * <H2>Memory Management</H2>
00146  * It does not assume ownership of Object nor the Target
00147  * arguments.
00148  * Usually allocated from the heap or an allocator; but it is not
00149  * self-managed.
00150  *
00151  * <H2>Locking</H2>
00152  * No provisions for locking, access must be serialized
00153  * externally.
00154  */
00155 template<class Target>
00156 class TAO_ESF_Shutdown_Command : public ACE_Command_Base
00157 {
00158 public:
00159   /// constructor...
00160   TAO_ESF_Shutdown_Command (Target *target);
00161 
00162   /// The callback method, if the argument is not nil it is interpreted
00163   /// as a CORBA::Environment.
00164   virtual int execute (void *arg);
00165 
00166 private:
00167   /// The target
00168   Target *target_;
00169 };
00170 
00171 // ****************************************************************
00172 
00173 TAO_END_VERSIONED_NAMESPACE_DECL
00174 
00175 #if defined (__ACE_INLINE__)
00176 #include "orbsvcs/ESF/ESF_Delayed_Command.i"
00177 #endif /* __ACE_INLINE__ */
00178 
00179 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00180 #include "orbsvcs/ESF/ESF_Delayed_Command.cpp"
00181 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00182 
00183 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00184 #pragma implementation ("ESF_Delayed_Command.cpp")
00185 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00186 
00187 #endif /* TAO_ESF_DELAYED_COMMAND_H */

Generated on Thu Nov 9 13:08:13 2006 for TAO_ESF by doxygen 1.3.6