25 #ifndef WMODULELOADER_H
26 #define WMODULELOADER_H
33 #include <boost/filesystem.hpp>
35 #include "../common/WSharedAssociativeContainer.h"
36 #include "../common/WSharedLib.h"
48 typedef std::shared_ptr< WModuleLoader >
SPtr;
53 typedef std::shared_ptr< const WModuleLoader >
ConstSPtr;
90 std::vector< std::shared_ptr< WSharedLib > >
m_libs;
101 unsigned int level = 0 );
114 PostponedLoad( std::shared_ptr< WSharedLib > lib, boost::filesystem::path path ):
123 std::shared_ptr< WSharedLib >
m_lib;
Loads module prototypes from shared objects in a given directory and injects it into the module facto...
void initializeExtensions()
The loader also stores information on which library provides the arbitrary registration mechanism.
std::vector< std::shared_ptr< WSharedLib > > m_libs
All the loaded shared libraries.
WModuleLoader()
Constructor.
static std::string getModulePrefix()
Returns the prefix of a shared module library filename.
~WModuleLoader()
Destructor, closes all handles to shared libraries.
std::shared_ptr< WModuleLoader > SPtr
Shared pointer abbreviation.
std::vector< PostponedLoad > m_arbitraryRegisterLibs
The libs which need to be initialized when OW is loaded completely.
std::shared_ptr< const WModuleLoader > ConstSPtr
Const pointer abbreviation.
void load(WSharedAssociativeContainer< std::set< std::shared_ptr< WModule > > >::WriteTicket ticket)
Load the module prototypes from the shared libraries.
This class provides a common interface for thread-safe access to associative containers (set,...
Helper to store information on a lib which gets initialized later.
std::shared_ptr< WSharedLib > m_lib
The library.
boost::filesystem::path m_path
The path of the resources.
PostponedLoad(std::shared_ptr< WSharedLib > lib, boost::filesystem::path path)
Initialize the class and keep track of the lib (and its reference).