CppUnit project page | FAQ | CppUnit home page |
00001 #ifndef CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H 00002 #define CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H 00003 00004 #include <cppunit/Portability.h> 00005 00006 #if !defined(CPPUNIT_NO_TESTPLUGIN) 00007 00008 CPPUNIT_NS_BEGIN 00009 00010 00033 class DynamicLibraryManager 00034 { 00035 public: 00036 typedef void *Symbol; 00037 typedef void *LibraryHandle; 00038 00044 DynamicLibraryManager( const std::string &libraryFileName ); 00045 00047 ~DynamicLibraryManager(); 00048 00054 Symbol findSymbol( const std::string &symbol ); 00055 00056 private: 00062 void loadLibrary( const std::string &libraryName ); 00063 00068 void releaseLibrary(); 00069 00076 LibraryHandle doLoadLibrary( const std::string &libraryName ); 00077 00084 void doReleaseLibrary(); 00085 00092 Symbol doFindSymbol( const std::string &symbol ); 00093 00102 std::string getLastErrorDetail() const; 00103 00105 DynamicLibraryManager( const DynamicLibraryManager © ); 00106 00108 void operator =( const DynamicLibraryManager © ); 00109 00110 private: 00111 LibraryHandle m_libraryHandle; 00112 std::string m_libraryName; 00113 }; 00114 00115 00116 CPPUNIT_NS_END 00117 00118 #endif // !defined(CPPUNIT_NO_TESTPLUGIN) 00119 00120 #endif // CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H
hosts this site. |
Send comments to: CppUnit Developers |