algorithms  2.2.0
Framework-independent algorithms for the EIC
Loading...
Searching...
No Matches
name.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2022 Wouter Deconinck, Sylvester Joosten
3//
4// Defines NameMixin - simple base class to provide name functionality
5//
6#pragma once
7
8#include <string>
9
10namespace algorithms {
11
12// Simple name Mixin providing consistent name API
13class NameMixin {
14public:
15 NameMixin(std::string_view name, std::string_view description)
16 : m_name{name}, m_description{description} {}
17 std::string_view name() const { return m_name; }
18 std::string_view description() const { return m_description; }
19
20private:
21 const std::string m_name;
22 const std::string m_description;
23};
24
25} // namespace algorithms
26
std::string_view description() const
Definition name.h:18
NameMixin(std::string_view name, std::string_view description)
Definition name.h:15
std::string_view name() const
Definition name.h:17