Files
barrier/base/XBase.h
crs d2135af0d9 fixes, mainly for windows. first, had to add a notification from
CServer to the primary screen when the configuration changes so it
can make necessary adjustments (the win32 primary screen must tell
the hook dll about the new jump zones).

changed includes of some std c++ library files to go through
our own include files.  these wrap the include with stuff to
keep vc++ quiet when compiling at warning level 4, which is
what it does now.  it also works around missing <istream> and
<ostream> on g++2.96.

added missing std:: where necessary.  g++ doesn't really support
namespaces so it lets references without the namespace slip
through.

added workaround or fix.  not sure if istringstream::str(string)
should reset eofbit.  it does on g++ but does not on vc++.
added clear() after str() so it works either way.

added low-level keyboard hook to win32.  if available (it's only
available on NT SP3 and up) it allows us to catch and handle
alt+tab, alt+esc, ctrl+esc, and windows key hot keys.  i think
that leaves only ctrl+alt+del and accessibility functions
uncaught on those systems.
2002-06-01 19:26:11 +00:00

47 lines
763 B
C++

#ifndef XBASE_H
#define XBASE_H
#include "CString.h"
#include "stdpre.h"
#include <exception>
#include "stdpost.h"
class XBase : public std::exception {
public:
XBase();
XBase(const CString& msg);
virtual ~XBase();
// std::exception overrides
virtual const char* what() const;
protected:
// returns a human readable string describing the exception
virtual CString getWhat() const throw() = 0;
// look up a message and format it
virtual CString format(const char* id,
const char* defaultFormat, ...) const throw();
private:
mutable CString m_what;
};
class MXErrno {
public:
MXErrno();
MXErrno(int);
// manipulators
// accessors
int getErrno() const;
const char* getErrstr() const;
private:
int m_errno;
};
#endif