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
Steffen Vogel 7d10544d79 Apply clang-format changes
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2024-02-29 18:58:07 +01:00

32 lines
719 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 <dlfcn.h>
#include <iostream>
#include <new>
#include <string>
#include <type_traits>
#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());
}