From: stephan b. <st...@s1...> - 2004-12-24 23:34:05
|
File: test/FactoryTest.cpp Loads an interface type (TheBase) from FactoryTest.h. The interface is implemented in 3 types defined in CType.cpp, which we compile to CType.so. We open CType.so: typedef P::Plugin::PluginManager<TheBase> PM; PM & pm = PM::instance(); ::P::System::SharedLib * sh = pm.addPlugin( "CType" ); // ^^^ throws on error The try-to-find-a-DLL-when-class-not-found behaviour should be transparently hidden behind the PM interface, but it is not yet. That's on my TODO list. test/CType.cpp demonstrates classloader registration and the customize-registration-via-static-init technique. If you're using the toc tree the test will build as-is, if not you'll need to add the appropriate code to Makefile.am. -- ----- st...@s1... http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts |