knowrob  2.1.0
A Knowledge Base System for Cognition-enabled Robots
Reasoner.h File Reference
#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"
Include dependency graph for Reasoner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  knowrob::Reasoner
 

Namespaces

 knowrob
 

Macros

#define REASONER_PLUGIN(classType, pluginName)
 

Macro Definition Documentation

◆ 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
classTypethe type of the reasoner, must be a subclass of IReasoner
pluginNamea plugin identifier, e.g. the name of the reasoner type.

Definition at line 117 of file Reasoner.h.