1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/common/lib/plugin.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
719 B
C++
Raw Permalink Normal View History

/* Loadable / plugin support.
2018-08-21 00:25:44 +02:00
*
* Author: Steffen Vogel <post@steffenvogel.de>
* SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
* SPDX-License-Identifier: Apache-2.0
*/
2018-08-21 00:25:44 +02:00
#include <dlfcn.h>
2018-08-21 00:25:44 +02:00
#include <iostream>
#include <new>
#include <string>
2018-08-21 00:25:44 +02:00
#include <type_traits>
#include <villas/plugin.hpp>
2018-08-23 13:22:46 +02:00
using namespace villas::plugin;
2018-08-21 00:25:44 +02:00
Registry *villas::plugin::registry = nullptr;
2018-08-21 00:25:44 +02:00
Plugin::Plugin() {
if (registry == nullptr)
registry = new Registry();
registry->add(this);
2018-08-21 00:25:44 +02:00
}
Plugin::~Plugin() { registry->remove(this); }
2018-08-21 00:25:44 +02:00
void Plugin::dump() {
getLogger()->info("Name: '{}' Description: '{}'", getName(),
getDescription());
2018-08-21 00:25:44 +02:00
}