ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare::plugin::ValidPlugin Concept Reference

Concept for a valid plugin class. More...

#include <plugin.hpp>

Concept definition

template<template< class, class > class P, class InTup, class OutTup, class Func>
requires { { P<InTup, OutTup>::instance() } -> std::same_as<std::shared_ptr<P<InTup, OutTup>>>; } &&
requires(const std::string &name, Func &&user_fn, const InTup &inputs, OutTup &outputs) { std::declval<P<InTup, OutTup> &>().register_impl(name, user_fn, inputs, outputs); } &&
std::derived_from<P<InTup, OutTup>, plugin::Plugin<InTup, OutTup>>
Concept for a valid plugin class.
Definition plugin.hpp:81

Detailed Description

Concept for a valid plugin class.

Template Parameters
PThe plugin class template.
InTupThe input tuple type.
OutTupThe output tuple type.
FuncThe function type for the implementation.

Requires that:

  1. P<InTup, OutTup> has a static method instance() returning a std::shared_ptr<P<InTup, OutTup>>.
  2. P<InTup, OutTup> has a method register_impl that can be called with the specified parameters.
  3. P<InTup, OutTup> is derived from Plugin<InTup, OutTup>.