25 #ifndef WMODULEFACTORY_H
26 #define WMODULEFACTORY_H
33 #include <boost/shared_ptr.hpp>
34 #include <boost/thread.hpp>
36 #include "../common/WSharedAssociativeContainer.h"
37 #include "WModuleCombinerTypes.h"
39 #include "WModuleLoader.h"
41 #include "WExportKernel.h"
48 friend class WModuleFactoryTest;
88 boost::shared_ptr< WModule > create( boost::shared_ptr< WModule > prototype );
95 static boost::shared_ptr< WModuleFactory > getModuleFactory();
106 const boost::shared_ptr< WModule > isPrototypeAvailable( std::string name );
115 const boost::shared_ptr< WModule > getPrototypeByName( std::string name );
125 const boost::shared_ptr< WModule > getPrototypeByInstance( boost::shared_ptr< WModule > instance );
134 std::vector< WModule::ConstSPtr > getPrototypesByType( MODULE_TYPE type );
150 template <
typename T>
151 static bool isA( boost::shared_ptr< WModule > module );
163 WCombinerTypes::WCompatiblesList getCompatiblePrototypes(
164 boost::shared_ptr< WModule > module = boost::shared_ptr< WModule >()
173 static void initializeModule( boost::shared_ptr< WModule > module );
182 static bool isPrototype( boost::shared_ptr< WModule > module );
218 template <
typename T>
222 return ( dynamic_cast< T* >( module.get() ) );
225 #endif // WMODULEFACTORY_H