00001 // -*- C++ -*- 00002 00003 /** 00004 * @file ESF_Peer_Workers.h 00005 * 00006 * ESF_Peer_Workers.h,v 1.9 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/ESF/index.html 00011 */ 00012 00013 #ifndef TAO_ESF_PEER_WORKERS_H 00014 #define TAO_ESF_PEER_WORKERS_H 00015 00016 #include "orbsvcs/ESF/ESF_Worker.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_Peer_Connected 00026 * 00027 * Helper class. 00028 * Used to iterate over a Proxy_Collection and invoke: 00029 * PROXY->connected (peer); 00030 * peer->connected (proxy); 00031 */ 00032 template<class PROXY, class PEER> 00033 class TAO_ESF_Peer_Connected : public TAO_ESF_Worker<PROXY> 00034 { 00035 public: 00036 TAO_ESF_Peer_Connected (PEER *peer); 00037 00038 void work (PROXY *proxy 00039 ACE_ENV_ARG_DECL); 00040 00041 private: 00042 PEER* peer_; 00043 }; 00044 00045 // **************************************************************** 00046 00047 /** 00048 * @class TAO_ESF_Peer_Reconnected 00049 * 00050 * Helper class. 00051 * Used to iterate over a Proxy_Collection and invoke: 00052 * PROXY->reconnected (peer); 00053 * peer->reconnected (proxy); 00054 */ 00055 template<class PROXY, class PEER> 00056 class TAO_ESF_Peer_Reconnected : public TAO_ESF_Worker<PROXY> 00057 { 00058 public: 00059 TAO_ESF_Peer_Reconnected (PEER *peer); 00060 00061 void work (PROXY *proxy 00062 ACE_ENV_ARG_DECL); 00063 00064 private: 00065 PEER* peer_; 00066 }; 00067 00068 // **************************************************************** 00069 00070 /** 00071 * @class TAO_ESF_Peer_Disconnected 00072 * 00073 * Helper class. 00074 * Used to iterate over a Proxy_Collection and invoke: 00075 * PROXY->disconnected (peer); 00076 * peer->disconnected (proxy); 00077 */ 00078 template<class PROXY, class PEER> 00079 class TAO_ESF_Peer_Disconnected : public TAO_ESF_Worker<PROXY> 00080 { 00081 public: 00082 TAO_ESF_Peer_Disconnected (PEER *peer); 00083 00084 void work (PROXY *proxy 00085 ACE_ENV_ARG_DECL); 00086 00087 private: 00088 PEER* peer_; 00089 }; 00090 00091 // **************************************************************** 00092 00093 TAO_END_VERSIONED_NAMESPACE_DECL 00094 00095 #if defined (__ACE_INLINE__) 00096 #include "orbsvcs/ESF/ESF_Peer_Workers.i" 00097 #endif /* __ACE_INLINE__ */ 00098 00099 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00100 #include "orbsvcs/ESF/ESF_Peer_Workers.cpp" 00101 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00102 00103 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00104 #pragma implementation ("ESF_Peer_Workers.cpp") 00105 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00106 00107 #endif /* TAO_ESF_PEER_WORKERS_H */