Skip to content

Commit 011e99c

Browse files
committed
windows: use seperate exported name for each library, core
1 parent 2cefcec commit 011e99c

File tree

12 files changed

+66
-66
lines changed

12 files changed

+66
-66
lines changed

src/libs/core/game/mino.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ struct Mino final {
1717
helper::TetrominoType m_type;
1818

1919
public:
20-
OOPETRIS_EXPORTED explicit constexpr Mino(GridPoint position, helper::TetrominoType type)
20+
OOPETRIS_CORE_EXPORTED explicit constexpr Mino(GridPoint position, helper::TetrominoType type)
2121
: m_position{ position },
2222
m_type{ type } { }
2323

24-
OOPETRIS_EXPORTED [[nodiscard]] helper::TetrominoType type() const;
24+
OOPETRIS_CORE_EXPORTED [[nodiscard]] helper::TetrominoType type() const;
2525

26-
OOPETRIS_EXPORTED [[nodiscard]] const GridPoint& position() const;
26+
OOPETRIS_CORE_EXPORTED [[nodiscard]] const GridPoint& position() const;
2727

28-
OOPETRIS_EXPORTED [[nodiscard]] GridPoint& position();
28+
OOPETRIS_CORE_EXPORTED [[nodiscard]] GridPoint& position();
2929

30-
OOPETRIS_EXPORTED [[nodiscard]] bool operator==(const Mino& other) const;
30+
OOPETRIS_CORE_EXPORTED [[nodiscard]] bool operator==(const Mino& other) const;
3131

32-
OOPETRIS_EXPORTED [[nodiscard]] bool operator!=(const Mino& other) const;
32+
OOPETRIS_CORE_EXPORTED [[nodiscard]] bool operator!=(const Mino& other) const;
3333
};

src/libs/core/game/mino_stack.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ struct MinoStack final {
1414
std::vector<Mino> m_minos;
1515

1616
public:
17-
OOPETRIS_EXPORTED void clear_row_and_let_sink(u8 row);
17+
OOPETRIS_CORE_EXPORTED void clear_row_and_let_sink(u8 row);
1818

19-
OOPETRIS_EXPORTED [[nodiscard]] bool is_empty(GridPoint coordinates) const;
19+
OOPETRIS_CORE_EXPORTED [[nodiscard]] bool is_empty(GridPoint coordinates) const;
2020

21-
OOPETRIS_EXPORTED void set(GridPoint coordinates, helper::TetrominoType type);
21+
OOPETRIS_CORE_EXPORTED void set(GridPoint coordinates, helper::TetrominoType type);
2222

23-
OOPETRIS_EXPORTED [[nodiscard]] u32 num_minos() const;
23+
OOPETRIS_CORE_EXPORTED [[nodiscard]] u32 num_minos() const;
2424

25-
OOPETRIS_EXPORTED [[nodiscard]] const std::vector<Mino>& minos() const;
25+
OOPETRIS_CORE_EXPORTED [[nodiscard]] const std::vector<Mino>& minos() const;
2626

27-
OOPETRIS_EXPORTED [[nodiscard]] bool operator==(const MinoStack& other) const;
27+
OOPETRIS_CORE_EXPORTED [[nodiscard]] bool operator==(const MinoStack& other) const;
2828

29-
OOPETRIS_EXPORTED [[nodiscard]] bool operator!=(const MinoStack& other) const;
29+
OOPETRIS_CORE_EXPORTED [[nodiscard]] bool operator!=(const MinoStack& other) const;
3030
};
3131

32-
OOPETRIS_EXPORTED std::ostream& operator<<(std::ostream& ostream, const MinoStack& mino_stack);
32+
OOPETRIS_CORE_EXPORTED std::ostream& operator<<(std::ostream& ostream, const MinoStack& mino_stack);

src/libs/core/game/tetromino_type.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ namespace helper {
1717
LastType = Z,
1818
};
1919

20-
OOPETRIS_EXPORTED [[nodiscard]] Color get_foreground_color(TetrominoType type, u8 alpha);
20+
OOPETRIS_CORE_EXPORTED [[nodiscard]] Color get_foreground_color(TetrominoType type, u8 alpha);
2121

22-
OOPETRIS_EXPORTED [[nodiscard]] Color get_background_color(TetrominoType type, u8 alpha);
22+
OOPETRIS_CORE_EXPORTED [[nodiscard]] Color get_background_color(TetrominoType type, u8 alpha);
2323

2424
} // namespace helper

src/libs/core/helper/color.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,20 @@ struct HSVColor {
6262

6363
constexpr HSVColor() : HSVColor{ 0.0, 0.0, 0.0, 0 } { }
6464

65-
OOPETRIS_EXPORTED [[nodiscard]] static helper::expected<HSVColor, std::string> from_string(const std::string& value
65+
OOPETRIS_CORE_EXPORTED [[nodiscard]] static helper::expected<HSVColor, std::string> from_string(const std::string& value
6666
);
6767

6868
using InfoType = std::tuple<HSVColor, color::SerializeMode, bool>;
6969

70-
OOPETRIS_EXPORTED [[nodiscard]] static helper::expected<InfoType, std::string> from_string_with_info(
70+
OOPETRIS_CORE_EXPORTED [[nodiscard]] static helper::expected<InfoType, std::string> from_string_with_info(
7171
const std::string& value
7272
);
7373

74-
OOPETRIS_EXPORTED [[nodiscard]] Color to_rgb_color() const;
74+
OOPETRIS_CORE_EXPORTED [[nodiscard]] Color to_rgb_color() const;
7575

76-
OOPETRIS_EXPORTED [[nodiscard]] std::string to_string(bool force_alpha = false) const;
76+
OOPETRIS_CORE_EXPORTED [[nodiscard]] std::string to_string(bool force_alpha = false) const;
7777

78-
OOPETRIS_EXPORTED std::ostream& operator<<(std::ostream& os) const;
78+
OOPETRIS_CORE_EXPORTED std::ostream& operator<<(std::ostream& os) const;
7979
};
8080

8181
namespace { //NOLINT(cert-dcl59-cpp,google-build-namespaces)
@@ -139,16 +139,16 @@ struct Color {
139139

140140
constexpr Color(u8 red, u8 green, u8 blue) : Color{ red, green, blue, 0xFF } { }
141141

142-
OOPETRIS_EXPORTED [[nodiscard]] static helper::expected<Color, std::string> from_string(const std::string& value);
142+
OOPETRIS_CORE_EXPORTED [[nodiscard]] static helper::expected<Color, std::string> from_string(const std::string& value);
143143

144144
using InfoType = std::tuple<Color, color::SerializeMode, bool>;
145145

146-
OOPETRIS_EXPORTED [[nodiscard]] static helper::expected<InfoType, std::string> from_string_with_info(
146+
OOPETRIS_CORE_EXPORTED [[nodiscard]] static helper::expected<InfoType, std::string> from_string_with_info(
147147
const std::string& value
148148
);
149149

150150

151-
OOPETRIS_EXPORTED [[nodiscard]] HSVColor to_hsv_color() const;
151+
OOPETRIS_CORE_EXPORTED [[nodiscard]] HSVColor to_hsv_color() const;
152152

153153
constexpr Color(const HSVColor& color) { //NOLINT(google-explicit-constructor)
154154

@@ -260,8 +260,8 @@ struct Color {
260260
return Color{ 0xFF, 0xFF, 0xFF, alpha };
261261
};
262262

263-
OOPETRIS_EXPORTED [[nodiscard]] std::string
263+
OOPETRIS_CORE_EXPORTED [[nodiscard]] std::string
264264
to_string(color::SerializeMode mode = color::SerializeMode::RGB, bool force_alpha = false) const;
265265

266-
OOPETRIS_EXPORTED std::ostream& operator<<(std::ostream& os) const;
266+
OOPETRIS_CORE_EXPORTED std::ostream& operator<<(std::ostream& os) const;
267267
};

src/libs/core/helper/date.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ namespace date {
1818
static constexpr const char* iso_8601_format_string = "%Y%m%dT%H%M%S";
1919

2020
public:
21-
OOPETRIS_EXPORTED ISO8601Date(u64 value);
21+
OOPETRIS_CORE_EXPORTED ISO8601Date(u64 value);
2222

23-
OOPETRIS_EXPORTED static ISO8601Date now();
24-
OOPETRIS_EXPORTED static helper::expected<ISO8601Date, std::string> from_string(const std::string& input);
23+
OOPETRIS_CORE_EXPORTED static ISO8601Date now();
24+
OOPETRIS_CORE_EXPORTED static helper::expected<ISO8601Date, std::string> from_string(const std::string& input);
2525

26-
OOPETRIS_EXPORTED [[nodiscard]] helper::expected<std::string, std::string> to_string() const;
26+
OOPETRIS_CORE_EXPORTED [[nodiscard]] helper::expected<std::string, std::string> to_string() const;
2727

28-
OOPETRIS_EXPORTED [[nodiscard]] u64 value() const;
28+
OOPETRIS_CORE_EXPORTED [[nodiscard]] u64 value() const;
2929

3030
private:
3131
[[nodiscard]] static helper::expected<std::tm, std::string> get_tm_struct(std::time_t value);

src/libs/core/helper/errors.hpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,40 @@ namespace helper {
1919
error::Severity m_severity;
2020

2121
public:
22-
OOPETRIS_EXPORTED GeneralError(const std::string& message, error::Severity severity) noexcept;
22+
OOPETRIS_CORE_EXPORTED GeneralError(const std::string& message, error::Severity severity) noexcept;
2323

24-
OOPETRIS_EXPORTED GeneralError(std::string&& message, error::Severity severity) noexcept;
24+
OOPETRIS_CORE_EXPORTED GeneralError(std::string&& message, error::Severity severity) noexcept;
2525

26-
OOPETRIS_EXPORTED ~GeneralError();
26+
OOPETRIS_CORE_EXPORTED ~GeneralError();
2727

28-
OOPETRIS_EXPORTED GeneralError(const GeneralError& error) noexcept;
28+
OOPETRIS_CORE_EXPORTED GeneralError(const GeneralError& error) noexcept;
2929
[[nodiscard]] GeneralError& operator=(const GeneralError& error) noexcept;
3030

31-
OOPETRIS_EXPORTED GeneralError(GeneralError&& error) noexcept;
32-
OOPETRIS_EXPORTED [[nodiscard]] GeneralError& operator=(GeneralError&& error) noexcept;
31+
OOPETRIS_CORE_EXPORTED GeneralError(GeneralError&& error) noexcept;
32+
OOPETRIS_CORE_EXPORTED [[nodiscard]] GeneralError& operator=(GeneralError&& error) noexcept;
3333

34-
OOPETRIS_EXPORTED [[nodiscard]] const std::string& message() const;
35-
OOPETRIS_EXPORTED [[nodiscard]] error::Severity severity() const;
34+
OOPETRIS_CORE_EXPORTED [[nodiscard]] const std::string& message() const;
35+
OOPETRIS_CORE_EXPORTED [[nodiscard]] error::Severity severity() const;
3636

37-
OOPETRIS_EXPORTED [[nodiscard]] const char* what() const noexcept override;
37+
OOPETRIS_CORE_EXPORTED [[nodiscard]] const char* what() const noexcept override;
3838
};
3939

4040
struct FatalError : public GeneralError {
41-
OOPETRIS_EXPORTED explicit FatalError(const std::string& message) noexcept;
41+
OOPETRIS_CORE_EXPORTED explicit FatalError(const std::string& message) noexcept;
4242

43-
OOPETRIS_EXPORTED explicit FatalError(std::string&& message) noexcept;
43+
OOPETRIS_CORE_EXPORTED explicit FatalError(std::string&& message) noexcept;
4444
};
4545

4646
struct MajorError : public GeneralError {
47-
OOPETRIS_EXPORTED explicit MajorError(const std::string& message) noexcept;
47+
OOPETRIS_CORE_EXPORTED explicit MajorError(const std::string& message) noexcept;
4848

49-
OOPETRIS_EXPORTED explicit MajorError(std::string&& message) noexcept;
49+
OOPETRIS_CORE_EXPORTED explicit MajorError(std::string&& message) noexcept;
5050
};
5151

5252
struct MinorError : public GeneralError {
53-
OOPETRIS_EXPORTED explicit MinorError(const std::string& message) noexcept;
53+
OOPETRIS_CORE_EXPORTED explicit MinorError(const std::string& message) noexcept;
5454

55-
OOPETRIS_EXPORTED explicit MinorError(std::string&& message) noexcept;
55+
OOPETRIS_CORE_EXPORTED explicit MinorError(std::string&& message) noexcept;
5656
};
5757

5858
using InitializationError = FatalError;

src/libs/core/helper/parse_json.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ namespace json {
129129
}
130130
}
131131

132-
OOPETRIS_EXPORTED std::string get_json_type(const nlohmann::json::value_t& type);
132+
OOPETRIS_CORE_EXPORTED std::string get_json_type(const nlohmann::json::value_t& type);
133133

134-
OOPETRIS_EXPORTED void
134+
OOPETRIS_CORE_EXPORTED void
135135
check_for_no_additional_keys(const nlohmann::json& obj, const std::vector<std::string>& keys);
136136

137137
} // namespace json

src/libs/core/helper/random.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ struct Random {
1515
std::uniform_real_distribution<double> m_uniform_real_distribution;
1616

1717
public:
18-
OOPETRIS_EXPORTED Random();
19-
OOPETRIS_EXPORTED explicit Random(std::mt19937_64::result_type seed);
18+
OOPETRIS_CORE_EXPORTED Random();
19+
OOPETRIS_CORE_EXPORTED explicit Random(std::mt19937_64::result_type seed);
2020

2121
template<utils::integral Integer>
2222
[[nodiscard]] Integer random(const Integer upper_bound_exclusive) {
2323
auto distribution = std::uniform_int_distribution<Integer>{ 0, upper_bound_exclusive - 1 };
2424
return distribution(m_generator);
2525
}
2626

27-
OOPETRIS_EXPORTED [[nodiscard]] double random();
27+
OOPETRIS_CORE_EXPORTED [[nodiscard]] double random();
2828

29-
OOPETRIS_EXPORTED [[nodiscard]] Seed seed() const;
29+
OOPETRIS_CORE_EXPORTED [[nodiscard]] Seed seed() const;
3030

31-
OOPETRIS_EXPORTED void seed(Seed seed);
31+
OOPETRIS_CORE_EXPORTED void seed(Seed seed);
3232

33-
OOPETRIS_EXPORTED static Seed generate_seed();
33+
OOPETRIS_CORE_EXPORTED static Seed generate_seed();
3434
};

src/libs/core/helper/sleep.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
namespace helper {
1010

11-
OOPETRIS_EXPORTED bool sleep_nanoseconds(std::chrono::nanoseconds ns);
11+
OOPETRIS_CORE_EXPORTED bool sleep_nanoseconds(std::chrono::nanoseconds ns);
1212

1313
}

src/libs/core/helper/string_manipulation.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88

99
namespace string {
1010

11-
OOPETRIS_EXPORTED std::string to_lower_case(const std::string& input);
11+
OOPETRIS_CORE_EXPORTED std::string to_lower_case(const std::string& input);
1212

13-
OOPETRIS_EXPORTED std::string to_upper_case(const std::string& input);
13+
OOPETRIS_CORE_EXPORTED std::string to_upper_case(const std::string& input);
1414

1515
// for string delimiter
16-
OOPETRIS_EXPORTED std::vector<std::string>
16+
OOPETRIS_CORE_EXPORTED std::vector<std::string>
1717
split_string_by_char(const std::string& start, const std::string& delimiter);
1818

1919
// trim from start (in place)
20-
OOPETRIS_EXPORTED void ltrim(std::string& str);
20+
OOPETRIS_CORE_EXPORTED void ltrim(std::string& str);
2121

2222
// trim from end (in place)
23-
OOPETRIS_EXPORTED void rtrim(std::string& str);
23+
OOPETRIS_CORE_EXPORTED void rtrim(std::string& str);
2424

25-
OOPETRIS_EXPORTED void trim(std::string& str);
25+
OOPETRIS_CORE_EXPORTED void trim(std::string& str);
2626

2727
} // namespace string

0 commit comments

Comments
 (0)