annotate include/core/anime_season.h @ 337:a7d4e5107531

dep/animone: REFACTOR ALL THE THINGS 1: animone now has its own syntax divergent from anisthesia, making different platforms actually have their own sections 2: process names in animone are now called `comm' (this will probably break things). this is what its called in bsd/linux so I'm just going to use it everywhere 3: the X11 code now checks for the existence of a UTF-8 window title and passes it if available 4: ANYTHING THATS NOT LINUX IS 100% UNTESTED AND CAN AND WILL BREAK! I still actually need to test the bsd code. to be honest I'm probably going to move all of the bsds into separate files because they're all essentially different operating systems at this point
author Paper <paper@paper.us.eu.org>
date Wed, 19 Jun 2024 12:51:15 -0400
parents b5d6c27c308f
children 6b0768158dcd
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
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
39 Name season = Name::Unknown;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
40 Date::Year year = 0;
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
41 };
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
42
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 326
diff changeset
43 } // namespace Anime
281
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
44
3ede7be4f449 anime_season: forgot these
Paper <paper@paper.us.eu.org>
parents:
diff changeset
45 #endif // MINORI_CORE_ANIME_SEASON_H_