BillySheet/include/characteristic/adresse.hpp

28 lines
676 B
C++
Raw Normal View History

2022-01-10 21:16:05 +01:00
#ifndef BILLYSHEET_ADRESSE_HPP
#define BILLYSHEET_ADRESSE_HPP
2022-01-14 22:58:16 +01:00
#include "characteristic.hpp"
2022-01-14 22:06:25 +01:00
#include <nlohmann/json.hpp>
using json = nlohmann::json;
2022-01-10 21:16:05 +01:00
namespace character::characteristic {
2024-01-28 20:31:50 +01:00
class Adresse final : public Characteristic {
public:
Adresse() noexcept: Characteristic(1, 0, 0, 0) {}
2022-01-14 22:06:25 +01:00
2024-01-28 20:31:50 +01:00
~Adresse() noexcept final = default;
2022-01-14 22:06:25 +01:00
2024-01-28 20:31:50 +01:00
friend void from_json(const json &j, Adresse &adresse) {
nlohmann::from_json(j, static_cast<Characteristic &>(adresse));
}
};
2022-01-14 22:06:25 +01:00
2024-01-28 20:31:50 +01:00
static void to_json(json &j, const Adresse &adresse) {
to_json(j, static_cast<Characteristic>(adresse));
}
2022-01-10 21:16:05 +01:00
}
#endif //BILLYSHEET_ADRESSE_HPP