home *** CD-ROM | disk | FTP | other *** search
- #ifndef CPP_EXEC_LIBRARIES_H
- #define CPP_EXEC_LIBRARIES_H
-
- // Klassen zum Öffnen und Schliessen von Exec Libraries
- //
- // Autor: Jochen Becher
- //
- // Historie:
- // Version 1.0 am 4. Januar 94
-
- #ifndef EXEC_LIBRARIES_H
- #include <exec/libraries.h>
- #endif
-
- class LibraryBaseC {
- public:
- LibraryBaseC(STRPTR name, ULONG version);
- ~LibraryBaseC();
- BOOL isOpen() const { return Base != NULL; };
- static BOOL areAllOpen() const { return !not_open; };
- operator struct Library *() const { return Base; };
- UWORD version() const;
- private:
- LibraryBaseC(const LibraryBaseC &);
- LibraryBaseC &operator= (const LibraryBaseC &);
- struct Library *Base;
- static BOOL not_open;
- };
-
- class LibraryBaseErrC : public LibraryBaseC {
- public:
- LibraryBaseErrC(STRPTR name, ULONG version);
- private:
- LibraryBaseErrC(const LibraryBaseErrC &);
- LibraryBaseErrC &operator= (const LibraryBaseErrC &);
- };
-
- #endif
-