OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
Serialize Class Reference

#include <serialize.h>

Public Types

enum  Version : uint16_t {
  Current = 53 , MinVersion = 36 , Last_2025 = 53 , Last_2024 = 49 ,
  Last_2023 = 46 , Last_2022 = 41 , Last_2021 = 36 , First = 36
}
 

Public Member Functions

 Serialize (Tempest::ODevice &fout)
 
 Serialize (Tempest::IDevice &fin)
 
 Serialize (Serialize &&)=default
 
 ~Serialize ()
 
uint16_t version () const
 
void setVersion (uint16_t v)
 
uint16_t globalVersion () const
 
void setGlobalVersion (uint16_t v)
 
template<class ... Args>
bool setEntry (const Args &... args)
 
template<class ... Args>
uint32_t directorySize (const Args &... args)
 
void setContext (World *ctx)
 
std::string_view worldName () const
 
void writeBytes (const void *v, size_t sz)
 
void readBytes (void *v, size_t sz)
 
template<class ... Arg>
void write (const Arg &... a)
 
template<class ... Arg>
void read (Arg &... a)
 
void readNpc (zenkit::DaedalusVm &vm, std::shared_ptr< zenkit::INpc > &npc)
 

Detailed Description

Definition at line 33 of file serialize.h.

Member Enumeration Documentation

◆ Version

enum Serialize::Version : uint16_t
Enumerator
Current 
MinVersion 
Last_2025 
Last_2024 
Last_2023 
Last_2022 
Last_2021 
First 

Definition at line 35 of file serialize.h.

Constructor & Destructor Documentation

◆ Serialize() [1/3]

Serialize::Serialize ( Tempest::ODevice &  fout)

Definition at line 57 of file serialize.cpp.

◆ Serialize() [2/3]

Serialize::Serialize ( Tempest::IDevice &  fin)

Definition at line 68 of file serialize.cpp.

◆ Serialize() [3/3]

Serialize::Serialize ( Serialize &&  )
default

◆ ~Serialize()

Serialize::~Serialize ( )

Definition at line 78 of file serialize.cpp.

Member Function Documentation

◆ directorySize()

template<class ... Args>
uint32_t Serialize::directorySize ( const Args &...  args)
inline

Definition at line 63 of file serialize.h.

◆ globalVersion()

uint16_t Serialize::globalVersion ( ) const
inline

Definition at line 53 of file serialize.h.

◆ read()

template<class ... Arg>
void Serialize::read ( Arg &...  a)
inline

Definition at line 81 of file serialize.h.

◆ readBytes()

void Serialize::readBytes ( void *  v,
size_t  sz 
)

Definition at line 175 of file serialize.cpp.

◆ readNpc()

void Serialize::readNpc ( zenkit::DaedalusVm &  vm,
std::shared_ptr< zenkit::INpc > &  npc 
)

Definition at line 303 of file serialize.cpp.

◆ setContext()

void Serialize::setContext ( World ctx)
inline

Definition at line 68 of file serialize.h.

◆ setEntry()

template<class ... Args>
bool Serialize::setEntry ( const Args &...  args)
inline

Definition at line 57 of file serialize.h.

◆ setGlobalVersion()

void Serialize::setGlobalVersion ( uint16_t  v)
inline

Definition at line 54 of file serialize.h.

◆ setVersion()

void Serialize::setVersion ( uint16_t  v)
inline

Definition at line 52 of file serialize.h.

◆ version()

uint16_t Serialize::version ( ) const
inline

Definition at line 51 of file serialize.h.

◆ worldName()

std::string_view Serialize::worldName ( ) const

Definition at line 87 of file serialize.cpp.

◆ write()

template<class ... Arg>
void Serialize::write ( const Arg &...  a)
inline

Definition at line 76 of file serialize.h.

◆ writeBytes()

void Serialize::writeBytes ( const void *  v,
size_t  sz 
)

Definition at line 167 of file serialize.cpp.


The documentation for this class was generated from the following files: