Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:32:42

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2022 Wouter Deconinck, Sylvester Joosten
0003 //
0004 // Defines NameMixin - simple base class to provide name functionality
0005 //
0006 #pragma once
0007 
0008 #include <string>
0009 
0010 namespace algorithms {
0011 
0012 // Simple name Mixin providing consistent name API
0013 class NameMixin {
0014 public:
0015   NameMixin(std::string_view name, std::string_view description)
0016       : m_name{name}, m_description{description} {}
0017   std::string_view name() const { return m_name; }
0018   std::string_view description() const { return m_description; }
0019 
0020 private:
0021   const std::string m_name;
0022   const std::string m_description;
0023 };
0024 
0025 } // namespace algorithms
0026