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