rendezvous.h

Go to the documentation of this file.
00001 #ifndef RENDEZVOUS_CLASS
00002 #define RENDEZVOUS_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : rendezvous                                                        *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2001-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #include "opsysdll.h"
00019 
00020 #include <basis/object_base.h>
00021 
00023 
00032 class OPSYSTEM_CLASS_STYLE rendezvous
00033 : public synchronizer_base, public virtual object_base
00034 {
00035 public:
00036   rendezvous(const istring &root_name);
00038 
00039   virtual ~rendezvous();
00041 
00042   IMPLEMENT_CLASS_NAME("rendezvous");
00043 
00044   bool healthy() const;
00046 
00049 
00050   enum locking_methods { NO_LOCKING, ENDLESS_WAIT, IMMEDIATE_RETURN };
00051 
00052   bool lock(locking_methods how = ENDLESS_WAIT);
00054 
00057   void unlock();
00059 
00060   // these two methods implement the synchronizer_base interface.
00061   virtual void establish_lock();
00062   virtual void repeal_lock();
00063 
00064   const istring &root_name() const;
00066 
00067 private:
00068   void *_handle;  
00069   bool _locked;  
00070   istring *_root_name;  
00071 };
00072 
00073 #endif
00074 

Generated on Fri Nov 21 04:29:55 2008 for HOOPLE Libraries by  doxygen 1.5.1