#ifndef ZMXEL_H
#define ZMXEL_H


// ----------------------------------------------------------------------
//
// ZMxel.h - a ZMexception class interfacing to an ErrorLog
//
// History:
//   21-Feb-2000  WEB  Improve standard C++ compatibility
//   03-May-2000  WEB  Avoid global using
//
// ----------------------------------------------------------------------


#ifndef ZMENVIRONMENT_H
  #include "ZMutility/ZMenvironment.h"
#endif

#ifndef ZMEXCEPTION_H
  #include "Exceptions/ZMexception.h"
#endif

#ifndef ZMEXCLASSINFO_H
  #include "Exceptions/ZMexClassInfo.h"
#endif

#ifndef ERROROBJ_H
  #include "ErrorLogger/ErrorObj.h"
#endif

#ifndef ELSEVERITYLEVEL_H
  #include "ErrorLogger/ELseverityLevel.h"
#endif

#ifndef STRING_INCLUDED
  #define STRING_INCLUDED
  #include <string>
#endif


// ----------------------------------------------------------------------


ZM_BEGIN_NAMESPACE( zmex )	/*  namespace zmex  {  */
ZM_USING_NAMESPACE( zmel )

// ----------------------------------------------------------------------


class ZMxel : public ZMexception  {

public:
  // ---  birth:
  //
  ZMxel( ErrorObj & errobj );

  // ---  class-wide methods:
  //
  ZMexClassStaticMethods;

  // ---  clone:
  //
  virtual ZM_COVARIANT_TYPE(ZMexception,ZMxel) *  clone() const;

  // ---  accessor:
  //
  ErrorObj &  errorObject() const;

  // ---  class-wide info accessor:
  //
  virtual ZMexClassInfo &  classInfo() const;

  // ---  request exception handling:
  //
  virtual ZMexAction  handleMe() const;

  // ---  request exception logging:
  //
  virtual ZMexLogResult  logMe() const;

  // ---  hierarchy inquiry:
  //
  virtual bool  isDerivedFrom(
    const std::string aName
  , const std::string aFacility
  ) const;

  // ---  map an ErrorLogger severity into an Exceptions severity:
  //
  ZMexSeverity  mapSeverity( ELseverityLevel );

private:
  // ---  class-wide data:
  //
  static ZMexClassInfo  _classInfo;

  // ---  hold onto complete ErrorObj
  //
  mutable ErrorObj  myErrorObject;

};  // ZMxel


// ----------------------------------------------------------------------


ZM_END_NAMESPACE( zmex )	/*  }  // namespace zmex  */


// ----------------------------------------------------------------------


//#define ZMXEL_ICC
//  #include "Exceptions/ZMxel.icc"
//#undef ZMXEL_ICC


// ----------------------------------------------------------------------


#endif  // ZMXEL_H
