CppUnit project page FAQ

DynamicLibraryManager.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H
2 #define CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H
3 
4 #include <cppunit/Portability.h>
5 #include <string>
6 
7 #if !defined(CPPUNIT_NO_TESTPLUGIN)
8 
10 
11 
35 {
36 public:
37  typedef void *Symbol;
38  typedef void *LibraryHandle;
39 
45  DynamicLibraryManager( const std::string &libraryFileName );
46 
49 
55  Symbol findSymbol( const std::string &symbol );
56 
57 private:
63  void loadLibrary( const std::string &libraryName );
64 
69  void releaseLibrary();
70 
77  LibraryHandle doLoadLibrary( const std::string &libraryName );
78 
85  void doReleaseLibrary();
86 
93  Symbol doFindSymbol( const std::string &symbol );
94 
103  std::string getLastErrorDetail() const;
104 
107 
109  void operator =( const DynamicLibraryManager &copy );
110 
111 private:
113  std::string m_libraryName;
114 };
115 
116 
118 
119 #endif // !defined(CPPUNIT_NO_TESTPLUGIN)
120 
121 #endif // CPPUNIT_PLUGIN_DYNAMICLIBRARYMANAGER_H

Send comments to:
CppUnit Developers