annotate include/core/anime_season.h @ 358:53c92e8968d5

CI: cleanup; remove source URL
author Paper <paper@paper.us.eu.org>
date Mon, 15 Jul 2024 01:01:52 -0400
parents 6b0768158dcd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
1 #ifndef MINORI_CORE_ANIME_SEASON_H_
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
2 #define MINORI_CORE_ANIME_SEASON_H_
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
3
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
4 #include "core/date.h" /* Date::Month */
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
5
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
6 #include <array>
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
7
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
8 namespace Anime {
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
9
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
10 class Season final {
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
11 public:
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
12 enum class Name {
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
13 Unknown,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
14 Winter,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
15 Spring,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
16 Summer,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
17 Autumn,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
18 };
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
19
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
20 static constexpr std::array<Name, 4> Names{
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
21 Name::Winter,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
22 Name::Spring,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
23 Name::Summer,
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
24 Name::Autumn
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
25 };
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
26
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
27 Season() = default;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
28 Season(Name s, Date::Year y);
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
29 explicit Season(const Date& date);
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
30
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
31 bool operator==(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
32 bool operator!=(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
33
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
34 bool operator<(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
35 bool operator>(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
36 bool operator<=(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
37 bool operator>=(const Season& o) const;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
38
348
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 327
diff changeset
39 Season& operator++();
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 327
diff changeset
40 Season& operator--();
6b0768158dcd text: redesign almost every widget
Paper <paper@paper.us.eu.org>
parents: 327
diff changeset
41
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
42 Name season = Name::Unknown;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
43 Date::Year year = 0;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
44 };
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
45
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
46 } // namespace Anime
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
47
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
48 #endif // MINORI_CORE_ANIME_SEASON_H_