1 #ifndef CPPUNIT_PLUGIN_TESTPLUGIN
2 #define CPPUNIT_PLUGIN_TESTPLUGIN
6 #if !defined(CPPUNIT_NO_TESTPLUGIN)
58 virtual void initialize( CPPUNIT_NS::TestFactoryRegistry *registry,
59 const CPPUNIT_NS::PlugInParameters ¶meters ) =0;
68 virtual void addListener( CPPUNIT_NS::TestResult *eventManager ) =0;
74 virtual void removeListener( CPPUNIT_NS::TestResult *eventManager ) =0;
94 virtual void uninitialize( CPPUNIT_NS::TestFactoryRegistry *registry ) =0;
107 #define CPPUNIT_PLUGIN_EXPORTED_NAME cppunitTestPlugIn
118 #define CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( TestPlugInInterfaceType ) \
119 CPPUNIT_PLUGIN_EXPORT CppUnitTestPlugIn *CPPUNIT_PLUGIN_EXPORTED_NAME(void) \
121 static TestPlugInInterfaceType plugIn; \
124 typedef char __CppUnitPlugInExportFunctionDummyTypeDef // dummy typedef so it can end with ';'
140 #if defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)
141 #if !defined(APIENTRY)
142 #define WIN32_LEAN_AND_MEAN
148 #define BLENDFUNCTION void // for mingw & gcc
151 #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
152 BOOL APIENTRY DllMain( HANDLE hModule, \
153 DWORD ul_reason_for_call, \
154 LPVOID lpReserved ) \
158 typedef char __CppUnitPlugInImplementMainDummyTypeDef
161 #elif defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) || defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
162 #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
163 int main( int argc, char *argv[] ) \
167 typedef char __CppUnitPlugInImplementMainDummyTypeDef
171 #else // other platforms don't require anything specifics
190 #define CPPUNIT_PLUGIN_IMPLEMENT() \
191 CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CPPUNIT_NS::TestPlugInDefaultImpl ); \
192 CPPUNIT_PLUGIN_IMPLEMENT_MAIN()
195 #endif // !defined(CPPUNIT_NO_TESTPLUGIN)
198 #endif // CPPUNIT_PLUGIN_TESTPLUGIN