00001 // -*- C++ -*- 00002 /*************************************************************************** 00003 * 00004 * The IPPL Framework 00005 * 00006 * 00007 * Visit http://people.web.psi.ch/adelmann/ for more details 00008 * 00009 ***************************************************************************/ 00010 00011 #ifndef PAWS_DATACONNECT_H 00012 #define PAWS_DATACONNECT_H 00013 00014 /*********************************************************************** 00015 * 00016 * PawsDataConnect represents a single connection to an Paws application 00017 * 00018 ***********************************************************************/ 00019 00020 // include files 00021 #include "DataSource/DataConnect.h" 00022 00023 // forward references 00024 class PawsApplication; 00025 00026 00027 class PawsDataConnect : public DataConnect { 00028 00029 public: 00030 // constructor: the name for the application, and the number of nodes ... 00031 // for now, the nodes information is not used. 00032 PawsDataConnect(const char *, int n = 0); 00033 00034 // destructor: shut down the connection 00035 virtual ~PawsDataConnect(); 00036 00037 // 00038 // methods specific to this type of DataConnect 00039 // 00040 00041 // return access to the PawsApplication 00042 PawsApplication *getPawsApp() { return PawsApp; } 00043 00044 // perform a poll 00045 void poll(); 00046 00047 // peform a ready 00048 void ready(); 00049 00050 // perform a "paws-aware" barrier, where we do not do a 00051 // communicate barrier, but instead do it through messages to/from 00052 // node zero in a loop that also does a poll. 00053 void barrier(); 00054 00055 // 00056 // DataConnect virtual methods 00057 // 00058 00059 // are we currently connected to a receiver? 00060 virtual bool connected() const; 00061 00062 private: 00063 // have we checked if we're ready to continue yet? 00064 static bool PawsReady; 00065 00066 // the main Paws application object 00067 static PawsApplication *PawsApp; 00068 00069 // how many connections are using this PawsApplication 00070 static int NumPawsConnect; 00071 }; 00072 00073 #endif 00074 00075 /*************************************************************************** 00076 * $RCSfile: PawsDataConnect.h,v $ $Author: adelmann $ 00077 * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:32 $ 00078 * IPPL_VERSION_ID: $Id: PawsDataConnect.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $ 00079 ***************************************************************************/