Sygaldry
Toggle main menu visibility
Main Page
Related Pages
Topics
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
c
d
e
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Functions
a
c
d
e
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Variables
Typedefs
Files
File List
▼
Sygaldry
►
Quick Motivation Summary
Quick Start
►
Project Motivation
►
Library Overview
Licenses
►
Design Concepts
►
Developer Environment Setup
►
Making a New Instrument
►
Making a New Component
►
Contributors' Guide
►
Implementation Documentation
►
Sygaldry Authors Directory
►
Convenience Scripts
Literate Programming with Doxygen
Literate Programming with lili
Bibliography
►
Topics
►
Concepts
►
Classes
▼
Files
▼
File List
▼
sygaldry
►
sygac-components
►
sygac-endpoints
►
sygac-functions
▼
sygac-metadata
sygac-metadata.hpp
►
sygac-mimu
►
sygac-runtime
►
sygac-tuple
►
sygah-consteval
►
sygah-endpoints
►
sygah-metadata
►
sygah-mimu
►
sygah-string_literal
►
sygbe-runtime
►
sygbe-spiffs
►
sygbe-wifi
►
sygbp-cli
►
sygbp-cstdio_reader
►
sygbp-liblo
►
sygbp-osc_match_pattern
►
sygbp-osc_string_constants
►
sygbp-output_logger
►
sygbp-rapid_json
►
sygbp-session_data
►
sygbp-spelling
►
sygbr-cli
►
sygbr-runtime
►
sygsa-max17055
►
sygsa-trill_craft
►
sygsa-two_wire
►
sygsa-two_wire_serif
►
sygse-adc
►
sygse-button
►
sygse-gpio
►
sygse-max17055
►
sygsp-button
►
sygsp-complementary_mimu_fusion
►
sygsp-delay
►
sygsp-icm20948
►
sygsp-micros
►
sygsp-mimu_units
►
sygsr-adc
►
sygsr-button
►
sygup-basic_logger
►
sygup-cstdio_logger
►
sygup-debug_printer
•
All
Classes
Functions
Variables
Typedefs
Enumerations
Modules
Pages
Concepts
Loading...
Searching...
No Matches
sygac-metadata.hpp
1
#pragma once
2
/*
3
Copyright 2023 Travis J. West, https://traviswest.ca, Input Devices and Music
4
Interaction Laboratory (IDMIL), Centre for Interdisciplinary Research in Music
5
Media and Technology (CIRMMT), McGill University, Montréal, Canada, and Univ.
6
Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France
7
8
SPDX-License-Identifier: MIT
9
*/
10
11
#include <concepts>
12
#include "sygah-consteval.hpp"
13
14
namespace
sygaldry {
15
19
23
24
#define text_concept(CONCEPT_NAME) template<typename T> \
25
concept has_##CONCEPT_NAME = requires \
26
{ \
27
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<std::string>; \
28
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<std::string_view>; \
29
{std::decay_t<T>::CONCEPT_NAME()} -> std::convertible_to<const char *>; \
30
}; \
31
template<has_##CONCEPT_NAME T> \
32
constexpr auto CONCEPT_NAME##_of(const T&) { return T::CONCEPT_NAME(); } \
33
\
34
template<has_##CONCEPT_NAME T> \
35
_consteval auto CONCEPT_NAME##_of() { return std::decay_t<T>::CONCEPT_NAME(); }
36
37
text_concept(name);
38
text_concept(author);
39
text_concept(email);
40
text_concept(license);
41
text_concept(description);
42
text_concept(uuid);
43
text_concept(unit);
44
text_concept(version);
45
text_concept(date);
46
47
#undef text_concept
48
51
}
52
sygaldry
sygac-metadata
sygac-metadata.hpp
Generated by
1.9.8