#define DMH_H 1
#include <stdint.h>
+#ifdef __cplusplus
+#include <exception>
+#endif
#undef EXTERN_C
#ifdef __cplusplus
EXTERN_C uint16_t dmh_control( const uint16_t, const uint16_t );
+#ifdef __cplusplus
+class dmh_exception : public std::exception
+{
+ /* Limited purpose exception class; can only accept messages
+ * that are const char, because lifetime is assumed infinite,
+ * and storage is not freed. Used to handle fatal errors,
+ * which otherwise would force a direct call to exit(). By
+ * using this class, we can ensure that last rites are
+ * performed before exiting.
+ */
+public:
+ dmh_exception() throw();
+ dmh_exception(const char * msg) throw();
+ virtual ~dmh_exception() throw();
+ virtual const char* what() const throw();
+protected:
+ const char * message;
+};
+#endif /* __cplusplus */
+
#endif /* DMH_H: $RCSfile$: end of file */