living_item.h

Go to the documentation of this file.
00001 #ifndef LIVING_ITEM_CLASS
00002 #define LIVING_ITEM_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : living_item                                                       *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 1996-$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 "event_flow_dll.h"
00019 
00020 #include <basis/mutex.h>
00021 #include <nodes/catalogable.h>
00022 
00023 // forward.
00024 class heartbeat;
00025 class istring;
00026 class unique_int;
00027 
00029 
00030 class EVENT_FLOW_CLASS_STYLE living_item
00031 : public nodes::catalogable,
00032   public virtual object_base
00033 {
00034 public:
00035   living_item(const unique_int &unique_id, const heartbeat &initial_beat);
00036   virtual ~living_item();
00037 
00038   virtual void shut_down_safely() = 0;
00040 
00041   // the mutex base class gives this object methods for synchronization; this
00042   // object can be locked and unlocked to protect its critical data.
00043 
00044   IMPLEMENT_CLASS_NAME("living_item");
00045 
00046   // these provide access to our health monitor.
00047   const heartbeat &liveness() const;
00048   heartbeat &liveness();
00049   void liveness(const heartbeat &new_beat);
00050 
00051 private:
00052   heartbeat *_liveness;  
00053 
00054   // forbidden.
00055   living_item(const living_item &);
00056   living_item &operator =(const living_item &);
00057 };
00058 
00059 #endif
00060 

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