1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-16 00:00:02 +01:00
VILLASnode/common/lib/plugin.cpp
Steffen Vogel 310136c7cf update Steffens mail address
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
2024-02-29 18:58:07 +01:00

37 lines
741 B
C++

/** Loadable / plugin support.
*
* @author Steffen Vogel <post@steffenvogel.de>
* @copyright 2014-2022, Institute for Automation of Complex Power Systems, EONERC
* @license Apache License 2.0
*********************************************************************************/
#include <iostream>
#include <string>
#include <new>
#include <type_traits>
#include <dlfcn.h>
#include <villas/plugin.hpp>
using namespace villas::plugin;
Registry * villas::plugin::registry = nullptr;
Plugin::Plugin()
{
if (registry == nullptr)
registry = new Registry();
registry->add(this);
}
Plugin::~Plugin()
{
registry->remove(this);
}
void
Plugin::dump()
{
getLogger()->info("Name: '{}' Description: '{}'", getName(), getDescription());
}