Developer Documentation
Loading...
Searching...
No Matches
PythonFunctions.cc
1#include "PythonFunctions.hh"
2#include "PythonFunctionsCore.hh"
3
4#include <map>
5#include <iostream>
6#include <QStringList>
7
8std::map<QString,QObject*> map_;
9
10
11void setPluginPointer(QString _name , QObject* _pointer) {
12 map_[_name] = _pointer;
13}
14
15QObject* getPluginPointer(QString _name) {
16
17 auto it = map_.find(_name);
18 if ( it != map_.end() ) {
19 return it->second;
20 } else {
21 std::cerr << "No plugin found with name " << _name.toStdString() << " for PythonFunctions" << std::endl;
22 return nullptr;
23 }
24}
25
26const QStringList getPythonPlugins() {
27 QStringList plugins;
28
29 for ( auto it = map_.begin() ; it != map_.end() ; ++it ) {
30 plugins.push_back(it->first);
31 }
32
33 return plugins;
34}
std::vector< PluginInfo > & plugins()
Get the vector of all PluginInfos.