blink1-lib  1.0.0
PlayState.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <cstdint>
9 #include <ostream>
10 
11 namespace blink1_lib {
12 
16  struct PlayState {
20  bool playing{false};
21 
25  std::uint8_t playStart{0};
26 
30  std::uint8_t playEnd{0};
31 
35  std::uint8_t playCount{0};
36 
40  std::uint8_t playPos{0};
41 
47  PlayState() noexcept = default;
48 
56  PlayState(const bool _playing, const std::uint8_t _playStart, const std::uint8_t _playEnd, const std::uint8_t _playCount, const std::uint8_t _playPos) noexcept;
57 
64  [[nodiscard]] bool operator==(const PlayState& other) const noexcept;
65 
72  [[nodiscard]] bool operator!=(const PlayState& other) const noexcept;
73 
80  friend std::ostream& operator<<(std::ostream& os, const PlayState& playState);
81  };
82 }
blink1_lib::PlayState::playCount
std::uint8_t playCount
Definition: PlayState.hpp:35
blink1_lib
Definition: Blink1Device.hpp:19
blink1_lib::PlayState::PlayState
PlayState() noexcept=default
blink1_lib::PlayState::playPos
std::uint8_t playPos
Definition: PlayState.hpp:40
blink1_lib::PlayState::playStart
std::uint8_t playStart
Definition: PlayState.hpp:25
blink1_lib::PlayState
Definition: PlayState.hpp:16
blink1_lib::PlayState::playing
bool playing
Definition: PlayState.hpp:20
blink1_lib::PlayState::playEnd
std::uint8_t playEnd
Definition: PlayState.hpp:30