#ifndef _BASE_CLASS_H

#define _BASE_CLASS_H
static char Base_h_id[] = "$Header: /usr/tiburon/xPlatform/utils/RCS/Base.h,v 1.2 1997/03/20 12:26:54 oreilly Exp pean $";

/*
$Log: Base.h,v $
Revision 1.2  1997/03/20 12:26:54  oreilly
*** empty log message ***

 * Revision 1.1  96/10/28  09:02:23  09:02:23  oreilly (Thomas C. O'Reilly)
 * Initial revision
 * 
*/

#include <mbari/types.h>
#include <mbari/const.h>

const int errorMsgSize = 512;

class Base
{  
  protected:
  
  MBool _error;
  char _error_buf[errorMsgSize];

  public:
  
  void setError(char *msg)
  {
    _error = TRUE;
    strcpy(_error_buf, msg);
  }
  
  void clearError() 
  {
    _error = FALSE;
  }

  MBool error()
  {
    return _error;
  }
  
  void errorMsg(char *buf)
  {
    strcpy(buf, _error_buf);
  }

  void prtErrorMsg()
  {
    fprintf(stderr, "%s\n", _error_buf);
  }

  Base() 
  {
    _error = FALSE;
  }
  
};


#endif /* _BASE_CLASS_H */
