Tatooine
cartesian_axis_labels.h
Go to the documentation of this file.
1#ifndef TATOOINE_CARTESIAN_AXIS_LABELS_H
2#define TATOOINE_CARTESIAN_AXIS_LABELS_H
3//==============================================================================
4#include <string>
5//==============================================================================
6namespace tatooine {
7//==============================================================================
8template <std::size_t I>
10//==============================================================================
11template <>
13 static constexpr auto value = std::string_view{"x"};
14};
15//==============================================================================
16template <>
18 static constexpr auto value = std::string_view{"y"};
19};
20//==============================================================================
21template <>
23 static constexpr auto value = std::string_view{"z"};
24};
25//==============================================================================
26template <std::size_t I>
27static auto constexpr cartesian_axis_label() {
29}
30//==============================================================================
31static auto constexpr cartesian_axis_label(std::size_t const i)
32 -> std::string_view {
33 switch (i) {
34 case 0:
35 return cartesian_axis_label<0>();
36 case 1:
37 return cartesian_axis_label<1>();
38 case 2:
39 return cartesian_axis_label<2>();
40 default:
41 return "";
42 }
43}
44//==============================================================================
45} // namespace tatooine
46//==============================================================================
47#endif
Definition: algorithm.h:6
static auto constexpr cartesian_axis_label()
Definition: cartesian_axis_labels.h:27
Definition: cartesian_axis_labels.h:9