#include <boost/property_tree/ptree.hpp>
#include "knowrob/semweb/TriplePattern.h"
#include "knowrob/semweb/Triple.h"
#include "knowrob/semweb/TripleContainer.h"
#include "knowrob/semweb/Vocabulary.h"
#include "knowrob/PropertyTree.h"
#include "knowrob/ThreadPool.h"
#include "knowrob/DataSourceHandler.h"
#include "knowrob/plugins/PluginFactory.h"
#include "knowrob/plugins/TypedPluginFactory.h"
Go to the source code of this file.
◆ KNOWROB_STORAGE_PLUGIN
#define KNOWROB_STORAGE_PLUGIN |
( |
|
classType, |
|
|
|
pluginName |
|
) |
| |
Value: extern "C" { \
std::shared_ptr<knowrob::DataBackend> knowrob_createPlugin(
const std::string &pluginID) \
{ return std::make_shared<classType>(); } \
const char* knowrob_getPluginName() { return pluginName; } }
Define a data backend 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 KG instance ID). Second, a function is generated that exposes the plugin name.
- Parameters
-
classType | the type of the backend, must be a subclass of DataBackend |
pluginName | a plugin identifier, e.g. the name of the backend type. |
Definition at line 171 of file Storage.h.