CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PlugInManager.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_PLUGIN_PLUGINMANAGER_H
00002 #define CPPUNIT_PLUGIN_PLUGINMANAGER_H
00003 
00004 #include <cppunit/Portability.h>
00005 
00006 #if !defined(CPPUNIT_NO_TESTPLUGIN)
00007 
00008 #if CPPUNIT_NEED_DLL_DECL
00009 #pragma warning( push )
00010 #pragma warning( disable: 4251 )  // X needs to have dll-interface to be used by clients of class Z
00011 #endif
00012 
00013 #include <cppunit/plugin/PlugInParameters.h>
00014 struct CppUnitTestPlugIn;
00015 
00016 CPPUNIT_NS_BEGIN
00017 
00018 
00019 class DynamicLibraryManager;
00020 class TestResult;
00021 class XmlOutputter;
00022 
00023 
00026 class CPPUNIT_API PlugInManager
00027 {
00028 public:
00031   PlugInManager();
00032 
00034   virtual ~PlugInManager();
00035 
00046   void load( const std::string &libraryFileName,
00047              const PlugInParameters &parameters = PlugInParameters() );
00048 
00053   void unload( const std::string &libraryFileName );
00054 
00059   void addListener( TestResult *eventManager );
00060 
00064   void removeListener( TestResult *eventManager );
00065 
00068   void addXmlOutputterHooks( XmlOutputter *outputter );
00069 
00074   void removeXmlOutputterHooks();
00075 
00076 protected:
00079   struct PlugInInfo
00080   {
00081     std::string m_fileName;
00082     DynamicLibraryManager *m_manager;
00083     CppUnitTestPlugIn *m_interface;
00084   };
00085 
00089   void unload( PlugInInfo &plugIn );
00090 
00091 private:
00093   PlugInManager( const PlugInManager &copy );
00094 
00096   void operator =( const PlugInManager &copy );
00097 
00098 private:
00099   typedef CppUnitDeque<PlugInInfo> PlugIns;
00100   PlugIns m_plugIns;
00101 };
00102 
00103 
00104 CPPUNIT_NS_END
00105 
00106 #if CPPUNIT_NEED_DLL_DECL
00107 #pragma warning( pop )
00108 #endif
00109 
00110 #endif // !defined(CPPUNIT_NO_TESTPLUGIN)
00111 
00112 
00113 #endif  // CPPUNIT_PLUGIN_PLUGINMANAGER_H

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers