OSSIA
Open Scenario System for Interactive Application
time_signature.hpp
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 
4 #include <cinttypes>
5 #include <optional>
6 #include <string>
7 #include <string_view>
8 
9 namespace ossia
10 {
11 struct time_signature
12 {
13  uint16_t upper{4};
14  uint16_t lower{4};
15 
16  friend bool operator==(time_signature lhs, time_signature rhs) noexcept
17  {
18  return lhs.upper == rhs.upper && lhs.lower == rhs.lower;
19  }
20  friend bool operator!=(time_signature lhs, time_signature rhs) noexcept
21  {
22  return lhs.upper != rhs.upper || lhs.lower != rhs.lower;
23  }
24 };
25 
26 using quarter_note = double;
27 
28 OSSIA_EXPORT
29 std::optional<ossia::time_signature> get_time_signature(const std::string_view& v);
30 }
Definition: git_info.h:7