Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
RuleArchive.cpp File Reference
#include "RuleArchive.hpp"
#include "RuleOptions.hpp"
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for RuleArchive.cpp:

Go to the source code of this file.

Namespaces

namespace  monopoly
 
namespace  monopoly::rules
 
namespace  monopoly::rules::archive
 

Macros

#define WRITE_OPTION(field)    writeNumber(writer, options.field)
 
#define WRITE_BOOL_OPTION(field)    writer.boolean(options.field)
 
#define READ_OPTION(field)    if (!readNumber(reader, options.field)) return false
 
#define READ_BOOL_OPTION(field)    if (!reader.boolean(options.field)) return false
 

Functions

bool monopoly::rules::archive::encodeSave (const GameState &state, const AIStateArray &aiStates, std::vector< std::uint8_t > &result)
 
bool monopoly::rules::archive::decodeSave (std::span< const std::uint8_t > data, GameState &state, AIStateArray *aiStates)
 
bool monopoly::rules::archive::encodeOptions (const GameOptions &options, std::vector< std::uint8_t > &result)
 
bool monopoly::rules::archive::decodeOptions (std::span< const std::uint8_t > data, GameOptions &result)
 

Macro Definition Documentation

◆ READ_BOOL_OPTION

#define READ_BOOL_OPTION (   field)     if (!reader.boolean(options.field)) return false

◆ READ_OPTION

#define READ_OPTION (   field)     if (!readNumber(reader, options.field)) return false

◆ WRITE_BOOL_OPTION

#define WRITE_BOOL_OPTION (   field)     writer.boolean(options.field)

◆ WRITE_OPTION

#define WRITE_OPTION (   field)     writeNumber(writer, options.field)