Project Alice
Loading...
Searching...
No Matches
serialization.hpp File Reference
#include <vector>
#include "container_types.hpp"
#include "unordered_dense.h"
#include "text.hpp"
#include "simple_fs.hpp"
Include dependency graph for serialization.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sys::scenario_header
 
struct  sys::save_header
 
struct  sys::mod_identifier
 
struct  sys::scenario_size
 

Namespaces

namespace  sys
 

Functions

template<typename T >
size_t sys::serialize_size (std::vector< T > const &vec)
 
template<typename T >
uint8_tsys::serialize (uint8_t *ptr_in, std::vector< T > const &vec)
 
template<typename T >
uint8_t const * sys::deserialize (uint8_t const *ptr_in, std::vector< T > &vec)
 
template<typename T >
uint8_tsys::memcpy_serialize (uint8_t *ptr_in, T const &obj)
 
template<typename T >
uint8_t const * sys::memcpy_deserialize (uint8_t const *ptr_in, T &obj)
 
template<typename T , typename tag_type >
size_t sys::serialize_size (tagged_vector< T, tag_type > const &vec)
 
template<typename T , typename tag_type >
uint8_tsys::serialize (uint8_t *ptr_in, tagged_vector< T, tag_type > const &vec)
 
template<typename T , typename tag_type >
uint8_t const * sys::deserialize (uint8_t const *ptr_in, tagged_vector< T, tag_type > &vec)
 
size_t sys::serialize_size (ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec)
 
size_t sys::serialize_size (ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec)
 
uint8_tsys::serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec)
 
uint8_tsys::serialize (uint8_t *ptr_in, ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > const &vec)
 
uint8_t const * sys::deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< dcon::text_key, uint32_t, text::vector_backed_ci_hash, text::vector_backed_ci_eq > &vec)
 
uint8_t const * sys::deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::set< dcon::text_key, text::vector_backed_ci_hash, text::vector_backed_ci_eq > &vec)
 
size_t sys::serialize_size (ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > const &vec)
 
uint8_tsys::serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > const &vec)
 
uint8_t const * sys::deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< dcon::modifier_id, dcon::gfx_object_id, sys::modifier_hash > &vec)
 
size_t sys::serialize_size (ankerl::unordered_dense::map< uint16_t, dcon::text_key > const &vec)
 
uint8_tsys::serialize (uint8_t *ptr_in, ankerl::unordered_dense::map< uint16_t, dcon::text_key > const &vec)
 
uint8_t const * sys::deserialize (uint8_t const *ptr_in, ankerl::unordered_dense::map< uint16_t, dcon::text_key > &vec)
 
void sys::read_mod_path (uint8_t const *ptr_in, uint8_t const *lim, native_string &path_out)
 
uint8_t const * sys::load_mod_path (uint8_t const *ptr_in, sys::state &state)
 
uint8_tsys::write_mod_path (uint8_t *ptr_in, native_string const &path_in)
 
size_t sys::sizeof_mod_path (native_string const &path_in)
 
uint8_t const * sys::read_scenario_header (uint8_t const *ptr_in, scenario_header &header_out)
 
uint8_t const * sys::read_save_header (uint8_t const *ptr_in, save_header &header_out)
 
uint8_tsys::write_scenario_header (uint8_t *ptr_in, scenario_header const &header_in)
 
uint8_tsys::write_save_header (uint8_t *ptr_in, save_header const &header_in)
 
size_t sys::sizeof_scenario_header (scenario_header const &header_in)
 
size_t sys::sizeof_save_header (save_header const &header_in)
 
mod_identifier sys::extract_mod_information (uint8_t const *ptr_in, uint64_t file_size)
 
uint8_tsys::write_compressed_section (uint8_t *ptr_out, uint8_t const *ptr_in, uint32_t uncompressed_size)
 
uint8_t const * sys::read_scenario_section (uint8_t const *ptr_in, uint8_t const *section_end, sys::state &state)
 
uint8_t const * sys::read_save_section (uint8_t const *ptr_in, uint8_t const *section_end, sys::state &state)
 
uint8_tsys::write_scenario_section (uint8_t *ptr_in, sys::state &state)
 
uint8_tsys::write_save_section (uint8_t *ptr_in, sys::state &state)
 
scenario_size sys::sizeof_scenario_section (sys::state &state)
 
size_t sys::sizeof_save_section (sys::state &state)
 
void sys::write_scenario_file (sys::state &state, native_string_view name, uint32_t count)
 
bool sys::try_read_scenario_file (sys::state &state, native_string_view name)
 
bool sys::try_read_scenario_and_save_file (sys::state &state, native_string_view name)
 
bool sys::try_read_scenario_as_save_file (sys::state &state, native_string_view name)
 
void sys::write_save_file (sys::state &state, save_type type, std::string const &name)
 
bool sys::try_read_save_file (sys::state &state, native_string_view name)
 

Variables

constexpr uint32_t sys::save_file_version = 42
 
constexpr uint32_t sys::scenario_file_version = 135 + save_file_version