home *** CD-ROM | disk | FTP | other *** search
- #ifndef CPP_EXCEPTIONS_EXCEPTIONS_H
- #define CPP_EXCEPTIONS_EXCEPTIONS_H
-
- // Die Ausnahmehierarchie
- //
- // "Ausnahmebehandlung ist Fehlerbehandlung" - B. Stroustrup
- // Die in der Klassenbibliothek verwendete Ausnahmen sind ausschließlich
- // zur Fehlerbehandlung eingesetzt - wobei der Begriff "Fehler" sehr eng
- // gesehen wird. Speicherbehandlung fällt unter diesen Begriff, der Versuch
- // Dateien zu öffnen allerdings nicht, hier erscheint das Fehlschlagen doch
- // allzu normal.
- //
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
-
- #ifndef EXEC_MEMORY_H
- #include <exec/memory.h>
- #endif
-
- #ifndef GRAPHICS_TEXT_H
- #include <graphics/text.h>
- #endif
-
- #ifndef INCLUDE_EXCEPTION_H
- #include <exception.h>
- #endif
-
- // *************************************************************
-
- class ResourceX : public Exception {
- };
-
- class MemoryX : public ResourceX {
- public:
- MemoryX(ULONG s, ULONG f = MEMF_ANY) : mSize(s), mFlags(f) { };
- ULONG size() const { return mSize; };
- ULONG flags() const { return mFlags; };
- protected:
- ULONG mSize;
- ULONG mFlags;
- };
-
- class SignalX : public ResourceX {
- public:
- SignalX(LONG n = -1) : sigNum(n) { };
- LONG signal() const { return sigNum; };
- protected:
- LONG sigNum;
- };
-
- class PortX : public ResourceX {
- public:
- PortX(BOOL pub = FALSE) : pPublic(pub) { };
- BOOL isPublic() const { return pPublic; };
- protected:
- BOOL pPublic;
- };
-
- class DosObjectX : public ResourceX {
- public:
- DosObjectX(ULONG type = ~0) : dType(type) { };
- ULONG type() const { return dType; };
- protected:
- ULONG dType;
- };
-
- class RDArgsX : public ResourceX {
- };
-
- class BoopsiX : public ResourceX {
- };
-
- class BoopsiClassX : public ResourceX {
- };
-
- class LayerX : public ResourceX {
- };
-
- // *************************************************************
-
- class IntuitionX : public Exception {
- };
-
- class FontX : public IntuitionX {
- };
-
- class ScreenX : public IntuitionX {
- };
-
- class ScreenDrawInfoX : public IntuitionX {
- };
-
- class WindowX : public IntuitionX {
- };
-
- class VisualInfoX : public IntuitionX {
- };
-
- class AslRequestX : public IntuitionX {
- public:
- AslRequestX(ULONG type) : asltype(type) { };
- ULONG type() const { return asltype; };
- private:
- ULONG asltype;
- };
-
- // *************************************************************
-
- class LayouterX : public Exception {
- };
-
- // *************************************************************
-
- #endif
-