diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-27 23:12:27 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-27 23:12:27 +0000 |
commit | 4075bff35deee2c0e332ab5db6fb73936fb375bb (patch) | |
tree | b6f62eec9aa9db67137eb66ae020d41827a7e216 /TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h | |
parent | 4a82d19278e3f1eefd32ab50ebb04d0e1fc42d91 (diff) | |
download | ATCD-ESF.tar.gz |
ChangeLogTag:Sat Feb 26 21:45:45 2000 Carlos O'Ryan <coryan@uci.edu>ESF
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h | 198 |
1 files changed, 198 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h b/TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h new file mode 100644 index 00000000000..b66259c2c4e --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/ESF/ESF_Delayed_Command.h @@ -0,0 +1,198 @@ +/* -*- C++ -*- */ +// $Id$ +// +// ============================================================================ +// +// = LIBRARY +// ORBSVCS Event Service Framework +// +// = FILENAME +// ESF_Delayed_Command +// +// = AUTHOR +// Carlos O'Ryan (coryan@cs.wustl.edu) +// +// ============================================================================ + +#ifndef TAO_ESF_DELAYED_COMMAND_H +#define TAO_ESF_DELAYED_COMMAND_H + +#include "ace/Functor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +template<class Target, class Object> +class TAO_ESF_Connected_Command : public ACE_Command_Base +{ + // = TITLE + // ESF_Connected_Command + // + // = DESCRIPTION + // Implements a Command object that invokes the connected_i() method + // on the target, passing an argument of type Object. + // + // = MEMORY MANAGMENT + // It does not assume ownership of Object nor the Target + // arguments. + // Usually allocated from the heap or an allocator; but it is not + // self-managed. + // + // = LOCKING + // No provisions for locking, access must be serialized + // externally. + // + // = TODO + // +public: + TAO_ESF_Connected_Command (Target *target, + Object *object); + // constructor... + + virtual int execute (void *arg); + // The callback method, if the argument is not nil it is interpreted + // as a CORBA::Environment. + +private: + Target *target_; + // The target + + Object *object_; + // The argument +}; + +// **************************************************************** + +template<class Target, class Object> +class TAO_ESF_Reconnected_Command : public ACE_Command_Base +{ + // = TITLE + // ESF_Reconnected_Command + // + // = DESCRIPTION + // Implements a Command object that invokes the reconnected_i() method + // on the target, passing an argument of type Object. + // + // = MEMORY MANAGMENT + // It does not assume ownership of Object nor the Target + // arguments. + // Usually allocated from the heap or an allocator; but it is not + // self-managed. + // + // = LOCKING + // No provisions for locking, access must be serialized + // externally. + // + // = TODO + // +public: + TAO_ESF_Reconnected_Command (Target *target, + Object *object); + // constructor... + + virtual int execute (void *arg); + // The callback method, if the argument is not nil it is interpreted + // as a CORBA::Environment. + +private: + Target *target_; + // The target + + Object *object_; + // The argument +}; + +// **************************************************************** + +template<class Target, class Object> +class TAO_ESF_Disconnected_Command : public ACE_Command_Base +{ + // = TITLE + // ESF_Disconnected_Command + // + // = DESCRIPTION + // Implements a Command object that invokes the disconnected_i() + // method on the target, passing an argument of type Object. + // + // = MEMORY MANAGMENT + // It does not assume ownership of Object nor the Target + // arguments. + // Usually allocated from the heap or an allocator; but it is not + // self-managed. + // + // = LOCKING + // No provisions for locking, access must be serialized + // externally. + // + // = TODO + // +public: + TAO_ESF_Disconnected_Command (Target *target, + Object *object); + // constructor... + + virtual int execute (void *arg); + // The callback method, if the argument is not nil it is interpreted + // as a CORBA::Environment. + +private: + Target *target_; + // The target + + Object *object_; + // The argument +}; + +// **************************************************************** + +template<class Target> +class TAO_ESF_Shutdown_Command : public ACE_Command_Base +{ + // = TITLE + // ESF_Shutdown_Command + // + // = DESCRIPTION + // Implements a Command object that invokes the shutdown_i() + // method on the target, passing an argument of type Object. + // + // = MEMORY MANAGMENT + // It does not assume ownership of Object nor the Target + // arguments. + // Usually allocated from the heap or an allocator; but it is not + // self-managed. + // + // = LOCKING + // No provisions for locking, access must be serialized + // externally. + // + // = TODO + // +public: + TAO_ESF_Shutdown_Command (Target *target); + // constructor... + + virtual int execute (void *arg); + // The callback method, if the argument is not nil it is interpreted + // as a CORBA::Environment. + +private: + Target *target_; + // The target +}; + +// **************************************************************** + +#if defined (__ACE_INLINE__) +#include "ESF_Delayed_Command.i" +#endif /* __ACE_INLINE__ */ + +#if defined (ACE_TEMPLATES_REQUIRE_SOURCE) +#include "ESF_Delayed_Command.cpp" +#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ + +#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) +#pragma implementation ("ESF_Delayed_Command.cpp") +#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ + +#endif /* TAO_ESF_DELAYED_COMMAND_H */ |