00001 // -*- C++ -*- 00002 00003 /** 00004 * @file ESF_Peer_Workers.h 00005 * 00006 * $Id: ESF_Peer_Workers.h 76589 2007-01-25 18:04:11Z elliott_c $ 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 00040 private: 00041 PEER* peer_; 00042 }; 00043 00044 // **************************************************************** 00045 00046 /** 00047 * @class TAO_ESF_Peer_Reconnected 00048 * 00049 * Helper class. 00050 * Used to iterate over a Proxy_Collection and invoke: 00051 * PROXY->reconnected (peer); 00052 * peer->reconnected (proxy); 00053 */ 00054 template<class PROXY, class PEER> 00055 class TAO_ESF_Peer_Reconnected : public TAO_ESF_Worker<PROXY> 00056 { 00057 public: 00058 TAO_ESF_Peer_Reconnected (PEER *peer); 00059 00060 void work (PROXY *proxy); 00061 00062 private: 00063 PEER* peer_; 00064 }; 00065 00066 // **************************************************************** 00067 00068 /** 00069 * @class TAO_ESF_Peer_Disconnected 00070 * 00071 * Helper class. 00072 * Used to iterate over a Proxy_Collection and invoke: 00073 * PROXY->disconnected (peer); 00074 * peer->disconnected (proxy); 00075 */ 00076 template<class PROXY, class PEER> 00077 class TAO_ESF_Peer_Disconnected : public TAO_ESF_Worker<PROXY> 00078 { 00079 public: 00080 TAO_ESF_Peer_Disconnected (PEER *peer); 00081 00082 void work (PROXY *proxy); 00083 00084 private: 00085 PEER* peer_; 00086 }; 00087 00088 // **************************************************************** 00089 00090 TAO_END_VERSIONED_NAMESPACE_DECL 00091 00092 #if defined (__ACE_INLINE__) 00093 #include "orbsvcs/ESF/ESF_Peer_Workers.inl" 00094 #endif /* __ACE_INLINE__ */ 00095 00096 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) 00097 #include "orbsvcs/ESF/ESF_Peer_Workers.cpp" 00098 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00099 00100 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA) 00101 #pragma implementation ("ESF_Peer_Workers.cpp") 00102 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00103 00104 #endif /* TAO_ESF_PEER_WORKERS_H */