|
 |
Go to the documentation of this file.
67 Plugins::const_iterator itFound =
m_plugins.find(iName);
73 <<
"The plugin '" << iName <<
"' should have been in loadable\n '" <<
lib
74 <<
"'\n but was not there. This means the plugin cache is incorrect. Please run 'EdmPluginRefresh " <<
lib
79 auto const&
value = itFound->second.front();
80 while (
value.m_ptr.load(std::memory_order_acquire) ==
nullptr) {
84 return itFound->second.front().m_ptr.load(std::memory_order_acquire);
89 Plugins::const_iterator itFound =
m_plugins.find(iName);
92 if (
nullptr != slib) {
97 <<
"The plugin '" << iName <<
"' should have been in loadable\n '" <<
lib
98 <<
"'\n but was not there. This means the plugin cache is incorrect. Please run 'EdmPluginRefresh "
104 auto const&
value = itFound->second.front();
105 while (
value.m_ptr.load(std::memory_order_acquire) ==
nullptr) {
109 return itFound !=
m_plugins.end() ? itFound->second.front().m_ptr.load(std::memory_order_acquire) :
nullptr;
113 for (PMakers::const_iterator it = makers.begin(); it != makers.end(); ++it) {
114 while (
nullptr == it->m_ptr.load(std::memory_order_acquire))
117 iReturn.push_back(iInfo);
124 info.name_ = it->first;
135 <<
"The plugin '" << iName <<
"' should have been loaded from\n '"
137 <<
"'\n but instead it was already loaded from\n '" << iLoadedFrom
138 <<
"'\n because some other plugin was loaded from the latter loadables.\n"
139 "To work around the problem the plugin '"
140 << iName <<
"' should only be defined in one of these loadables.";
146 assert(
nullptr != iPMaker);
152 std::vector<PluginInfo> returnValue;
virtual const std::string & category() const =0
returns the name of the category to which this plugin factory belongs
tbb::concurrent_vector< PluginMakerInfo > PMakers
const SharedLibrary & load(const std::string &iCategory, const std::string &iPlugin)
virtual ~PluginFactoryBase()
const boost::filesystem::path & path() const
virtual std::vector< PluginInfo > available() const
return info about all plugins which are already available in the program
static PluginManager * get()
void checkProperLoadable(const std::string &iName, const std::string &iLoadedFrom) const
void addFactory(const PluginFactoryBase *)
void * findPMaker(const std::string &iName) const
const boost::filesystem::path & loadableFor(const std::string &iCategory, const std::string &iPlugin)
boost::filesystem::path loadable_
edm::signalslot::Signal< void(const std::string &, const PluginInfo &)> newPluginAdded_
signal containing plugin category, and plugin info for newly added plugin
void fillInfo(const PMakers &makers, PluginInfo &iInfo, std::vector< PluginInfo > &iReturn) const
void fillAvailable(std::vector< PluginInfo > &iReturn) const
void finishedConstruction()
void newPlugin(const std::string &iName)
static const std::string & staticallyLinkedLoadingFileName()
if the value returned from loadingFile matches this string then the file is statically linked
void registerPMaker(void *iPMaker, const std::string &iName)
void * tryToFindPMaker(const std::string &iName) const
static const std::string & loadingFile()
file name of the shared object being loaded
static bool isAvailable()
static PluginFactoryManager * get()
const SharedLibrary * tryToLoad(const std::string &iCategory, const std::string &iPlugin)