4#if PROTOCOL_VERSION > 767
12#if PROTOCOL_VERSION > 767
25#if PROTOCOL_VERSION > 767
37 std::map<RecipeBookType, TypeSettings> output;
41 const bool b1 = ReadData<bool>(iter, length);
42 const bool b2 = ReadData<bool>(iter, length);
57 if (
auto it = states.find(
static_cast<RecipeBookType>(i)); it != states.end())
59 written_values = it->second;
61 WriteData<bool>(written_values.
open, container);
62 WriteData<bool>(written_values.
filtering, container);
66 std::optional<Json::Value>
SerializeStates(
const std::map<RecipeBookType, TypeSettings>& states)
const
70 for (
const auto& [k, v] : states)
72 output[std::to_string(
static_cast<int>(k))] = {
74 {
"filtering", v.filtering }
82#if PROTOCOL_VERSION < 768
86#if PROTOCOL_VERSION > 356 && PROTOCOL_VERSION < 768
90#if PROTOCOL_VERSION > 736 && PROTOCOL_VERSION < 768
97#if PROTOCOL_VERSION > 767
#define SERIALIZED_FIELD(Name,...)
Main class, basically a JsonVariant with extra utility functions it doesn't inherit JsonVariant direc...
std::optional< Json::Value > SerializeStates(const std::map< RecipeBookType, TypeSettings > &states) const
SERIALIZED_FIELD(States, Internal::CustomType< std::map< RecipeBookType, TypeSettings >, &THIS::ReadStates, &THIS::WriteStates, &THIS::SerializeStates >)
std::map< RecipeBookType, TypeSettings > ReadStates(ReadIterator &iter, size_t &length) const
DECLARE_READ_WRITE_SERIALIZE
void WriteStates(const std::map< RecipeBookType, TypeSettings > &states, WriteContainer &container) const
std::vector< unsigned char > WriteContainer
std::vector< unsigned char >::const_iterator ReadIterator