Gaia-ECS v0.9.3
A simple and powerful entity component system
Loading...
Searching...
No Matches
gaia::ser::bin_stream Class Reference

Default in-memory binary backend used by ECS world/runtime serialization. Provides aligned raw read/write and can be wrapped into serializer via make_serializer(). More...

#include <ser_binary.h>

Public Member Functions

void save_raw (const void *src, uint32_t size, serialization_type_id id)
 Writes raw bytes with type-aware alignment.
 
void load_raw (void *src, uint32_t size, serialization_type_id id)
 Reads raw bytes with type-aware alignment.
 
const char * data () const
 Returns pointer to serialized bytes.
 
void reset ()
 Clears buffered data and resets stream position.
 
uint32_t tell () const
 Returns current stream cursor position in bytes.
 
uint32_t bytes () const
 Returns total buffered byte count.
 
void seek (uint32_t pos)
 Moves stream cursor to an absolute byte position.
 
template<typename T >
void save (const T &data)
 Convenience typed save routed through serializer traversal.
 
template<typename T >
void load (T &data)
 Convenience typed load routed through serializer traversal.
 

Detailed Description

Default in-memory binary backend used by ECS world/runtime serialization. Provides aligned raw read/write and can be wrapped into serializer via make_serializer().


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