Library.hh

00001 /*
00002 ** TowBowlTactics, an adaptation of the tabletop game Blood Bowl.
00003 ** 
00004 ** Copyright (C) 2006 The TBT Team.
00005 ** 
00006 ** This program is free software; you can redistribute it and/or
00007 ** modify it under the terms of the GNU General Public License
00008 ** as published by the Free Software Foundation; either version 2
00009 ** of the License, or (at your option) any later version.
00010 ** 
00011 ** The complete GNU General Public Licence Notice can be found as the
00012 ** `NOTICE' file in the root directory.
00013 ** 
00014 ** The TBT Team consists of people listed in the `AUTHORS' file.
00015 */
00016 
00017 #ifndef LIBRARY_HH_
00018 # define LIBRARY_HH_
00019 
00020 # include <string>
00021 
00026 class LibraryError : public Exception
00027 {
00028 public:
00029   
00031   LibraryError();
00032 
00035   LibraryError(const std::string& msg);
00036 };
00037 
00042 class Library
00043 {
00044 public:
00045   Library();
00046   Library(const std::string& library_file);
00047   ~Library();
00048 
00049   void          open(const std::string& library_file);
00050 
00054   void*         getSymbol(const char* sym, bool required = true);
00055 
00056 private:
00057 
00058   void*         hndl_;
00059   std::string   library_file_; 
00060 };
00061 
00062 #endif /* !LIBRARY_HH_ */

Generated on Sat Jun 23 16:07:23 2007 for Stechec/TBT by  doxygen 1.4.7