/************************************************************************/
/* Copyright 1998 MBARI							*/
/************************************************************************/
#ifndef _ALARMDETECTOR_H
#define _ALARMDETECTOR_H
static char AlarmDetector_h_id[] = "$Header: /u/oreilly/rov/tmacs/RCS/AlarmDetector.h,v 1.2 1998/12/18 21:07:21 oreilly Exp $";

/*
$Log: AlarmDetector.h,v $
Revision 1.2  1998/12/18 21:07:21  oreilly
Added documentation

Revision 1.1  1996/10/28 09:13:11  oreilly
Initial revision

*/


#include "DmGuiObject.h"
#include "Alarm.h"
/*
CLASS 
AlarmDetector

DESCRIPTION
AlarmDetector monitors a specified Alarm for aperiodic changes;
when changes are detected, AlarmDetector calls the updateFromPeer() function
of it's specified peer DmGuiObject. AlarmDetector has no visible GUI
components.


AUTHOR
Tom O'Reilly
*/
class AlarmDetector : public DmGuiObject
{
  public:
  
  AlarmDetector(const char *name, Widget parent, Alarm *alarm, 
		DmGuiObject *peer);
  
  ~AlarmDetector();

  virtual const char *className()
  {
    return "AlarmDetector";
  }
  
  virtual void updateGui(DM_Item item = 0);
  Alarm *update();
  
  void show()
  {
    // Do nothing; always invisible
    ;
  }
  
  protected:
  
  Alarm *_alarm;
  DmGuiObject *_peer;
};


#endif
