Brunot
Loading...
Searching...
No Matches
CardPositionSelectedMessage.h
Go to the documentation of this file.
1
11// ____ __ __ __
12// /\__ _\/\ \ /\ \/\ \
13// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
14// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
15// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
16// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
17// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
18
19
20#pragma once
21#include "Message.h"
22#include "System/Json.h"
23
24namespace sys
25{
26class Json;
27}
28
29using Stream = sys::Json;
30
32{
33
35 CardPositionSelectedMessage(int x, int y);
40 ~CardPositionSelectedMessage() override = default;
41
42 auto clone() const -> std::unique_ptr<Message> override
43 {
44 return std::make_unique<CardPositionSelectedMessage>(*this);
45 }
46
47 auto load(Stream& stream) -> void override;
48
49 auto save(Stream& stream) const -> void override;
50
51 friend auto to_json(json& j, const CardPositionSelectedMessage& obj) -> void;
52 friend auto from_json(const json& j, CardPositionSelectedMessage& obj) -> void;
53
54 int posX, posY;
55};
sys::Json Stream
Definition AudioObject.h:20
nlohmann::json json
Definition Json.cpp:19
Definition Json.h:32
the type of elements in a basic_json container
Definition GameObject.h:32
Definition CardPositionSelectedMessage.h:32
auto save(Stream &stream) const -> void override
Definition CardPositionSelectedMessage.cpp:36
int posY
Definition CardPositionSelectedMessage.h:54
CardPositionSelectedMessage(const CardPositionSelectedMessage &other)=default
int posX
Definition CardPositionSelectedMessage.h:54
auto operator=(CardPositionSelectedMessage &&other) noexcept -> CardPositionSelectedMessage &=default
auto clone() const -> std::unique_ptr< Message > override
Definition CardPositionSelectedMessage.h:42
auto operator=(const CardPositionSelectedMessage &other) -> CardPositionSelectedMessage &=default
friend auto to_json(json &j, const CardPositionSelectedMessage &obj) -> void
Definition CardPositionSelectedMessage.cpp:41
auto load(Stream &stream) -> void override
Definition CardPositionSelectedMessage.cpp:31
friend auto from_json(const json &j, CardPositionSelectedMessage &obj) -> void
Definition CardPositionSelectedMessage.cpp:49
~CardPositionSelectedMessage() override=default
CardPositionSelectedMessage(CardPositionSelectedMessage &&other) noexcept=default
Message()=default