SPH
Public Member Functions | List of all members
Deserializer< Precise > Class Template Reference

Object for reading serialized primitives from input stream. More...

#include <Serializer.h>

Inheritance diagram for Deserializer< Precise >:
Noncopyable

Public Member Functions

 Deserializer (const Path &path)
 Opens a stream associated with given path and prepares the file for deserialization. More...
 
template<typename... TArgs>
void read (TArgs &... args)
 
void skip (const Size size)
 Skip a number of bytes in the stream; used to skip unused parameters or padding bytes. More...
 
- Public Member Functions inherited from Noncopyable
 Noncopyable ()=default
 
 Noncopyable (const Noncopyable &)=delete
 
 Noncopyable (Noncopyable &&)=default
 
Noncopyableoperator= (const Noncopyable &)=delete
 
Noncopyableoperator= (Noncopyable &&)=default
 

Detailed Description

template<bool Precise>
class Deserializer< Precise >

Object for reading serialized primitives from input stream.

Definition at line 124 of file Serializer.h.

Constructor & Destructor Documentation

◆ Deserializer()

template<bool Precise>
Deserializer< Precise >::Deserializer ( const Path path)
inline

Opens a stream associated with given path and prepares the file for deserialization.

Definition at line 131 of file Serializer.h.

Member Function Documentation

◆ read()

template<bool Precise>
template<typename... TArgs>
void Deserializer< Precise >::read ( TArgs &...  args)
inline

Deserialize a list of parameters from the binary file.

Returns
True on success, false if at least one parameter couldn't be read.
Note
Strings can be read with fixed length by passing char[], or by reading until first \0 by passing std::string parameter.
Exceptions
SerializerExceptionif reading failed

Definition at line 144 of file Serializer.h.

◆ skip()

template<bool Precise>
void Deserializer< Precise >::skip ( const Size  size)
inline

Skip a number of bytes in the stream; used to skip unused parameters or padding bytes.

Definition at line 149 of file Serializer.h.


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