00001 /* 00002 * This file is part of openMask © INRIA, CNRS, Universite de Rennes 1 1993-2002, thereinafter the Software 00003 * 00004 * The Software has been developped within the Siames Project. 00005 * INRIA, the University of Rennes 1 and CNRS jointly hold intellectual property rights 00006 * 00007 * The Software has been registered with the Agence pour la Protection des 00008 * Programmes (APP) under registration number IDDN.FR.001.510008.00.S.P.2001.000.41200 00009 * 00010 * This file may be distributed under the terms of the Q Public License 00011 * version 1.0 as defined by Trolltech AS of Norway and appearing in the file 00012 * LICENSE.QPL included in the packaging of this file. 00013 * 00014 * Licensees holding valid specific licenses issued by INRIA, CNRS or Université de Rennes 1 00015 * for the software may use this file in accordance with that specific license 00016 * 00017 */ 00018 #ifndef PsnBroadcastManagerHEADER 00019 #define PsnBroadcastManagerHEADER 00020 00021 #include <MomeDsm.h> 00022 #include <PsName.h> 00023 00024 class PsnSharedMemoryManager; 00025 class PsnUniqueCreator; 00026 class PsEvent; 00027 class PsDistributedController; 00028 00029 #include <PsAllocator.h> 00030 00031 #include <PsList.h> 00032 #include "PsnMutexLock.h" 00033 00040 class PsnBroadcastManager { 00041 public: 00043 PsnBroadcastManager(PsnUniqueCreator & aCreator); 00045 virtual ~PsnBroadcastManager(); 00047 virtual void sendEvent(const PsName & receiverProcess, unsigned int offsetOfEvent); 00049 virtual void broadcastEvent(unsigned int offsetOfEvent); 00051 virtual void lock(); 00053 virtual void unlock(); 00055 virtual void addToEventList(PsList<PsEvent* > * anEventList, const PsName & aProcess); 00057 virtual void dispatchEventsOfList(PsDistributedController & theLocalControler); 00059 virtual void sync(); 00061 virtual const PsName & getMirrorToReferentialId(); 00063 virtual const PsName & getAllProcessesId(); 00065 typedef pair<PsName, unsigned int> _myPairType; 00067 typedef list<_myPairType, PsAllocatorT<_myPairType> > _myTypeOfTable; 00069 static const int nbTablesDansBuffer; 00070 protected: 00073 MomeTpLock _myLockNumber; 00076 PsnMutexLock _accessToLock ; 00078 const PsName _allProcessesId; 00080 const PsName _mirrorToReferentialId; 00082 _myTypeOfTable * broadcastedEventsTable[3]; 00084 PsnSharedMemoryManager * _memoryManagerOfmyData; 00086 bool _locked; 00088 int _currentReadableTable; 00090 int _currentWritableTable; 00092 int _currentDeletableTable; 00093 }; 00094 00095 #endif
| Documentation generated on Mon Nov 25 15:25:00 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |