From: Christian P. <cp...@us...> - 2005-05-07 11:55:59
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29688/include/pclasses/System Modified Files: Plugin.h Log Message: - Added thread-safety to Factory and System::Plugin Index: Plugin.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Plugin.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Plugin.h 6 May 2005 15:22:46 -0000 1.1 +++ Plugin.h 7 May 2005 11:55:47 -0000 1.2 @@ -29,6 +29,7 @@ #include <pclasses/Unicode/String.h> #include <pclasses/System/PathFinder.h> #include <pclasses/System/SharedLib.h> +#include <pclasses/System/CriticalSection.h> #include <map> #include <string> @@ -38,6 +39,13 @@ namespace System { +//! Plugin manager +/*! + The plugin manager is used to dynamically load types from DLLs. + Upon application init a private type-loader hook is installed in + the FactoryBase. The type-loader gets called whenever an unknown + type-name is requested by a call to Factory<InterfaceT>::create(). +*/ class PSYSTEM_EXPORT PluginManager: public NonCopyable { public: typedef std::map<Unicode::String, SharedLib*> PluginMap; @@ -71,8 +79,9 @@ PluginManager(); ~PluginManager(); - PathFinderMap _pathFinders; - PluginMap _pluginMap; + PathFinderMap _pathFinders; + PluginMap _pluginMap; + CriticalSection _mutex; }; } // !namespace System |