1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/common/lib/plugin.cpp
Steffen Vogel 6c582cbf91 Make project REUSE compliant
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2024-02-29 18:58:07 +01:00

37 lines
696 B
C++

/* Loadable / plugin support.
*
* 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
*/
#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());
}