#include <memory>
#include "knowrob/PropertyTree.h"
#include "knowrob/terms/Atom.h"
#include "knowrob/DataSource.h"
#include "knowrob/DataSourceHandler.h"
#include "knowrob/storage/Storage.h"
#include "knowrob/plugins/NamedPlugin.h"
#include "ReasonerError.h"
Go to the source code of this file.
◆ REASONER_PLUGIN
#define REASONER_PLUGIN |
( |
|
classType, |
|
|
|
pluginName |
|
) |
| |
Value: extern "C" { \
std::shared_ptr<knowrob::Reasoner> knowrob_createPlugin(std::string_view pluginID) \
{ return std::make_shared<classType>(pluginID); } \
const char* knowrob_getPluginName() { return pluginName; } }
Define a reasoner plugin. The macro generates two functions that are used as entry points for loading the plugin. First, a factory function is defined that creates instances of classType. This will only work when classType has a single argument constructor that accepts a string as argument (the reasoner instance ID). Second, a function is generated that exposes the plugin name.
- Parameters
-
classType | the type of the reasoner, must be a subclass of IReasoner |
pluginName | a plugin identifier, e.g. the name of the reasoner type. |
Definition at line 117 of file Reasoner.h.