2#include "main/ResourceManager.hpp"
7namespace StevEngine::Utilities {
35 template <
typename T> T
Read();
42 template <
typename T>
void Write(
const T& data);
94 const std::stringstream&
GetStream()
const {
return stream; }
104 std::stringstream stream;
Container for loaded resource data.
Definition ResourceManager.hpp:11
T Read()
Read data of specified type from stream.
void Write(const T &data)
Write data of specified type to stream.
Stream & operator>>(T &out)
Read data of specified type from stream.
Definition Stream.hpp:59
void WriteToFile(const char *path) const
Write full stream content to a file.
Definition Stream.cpp:8
Stream(StreamType type)
Create new stream of type.
Definition Stream.hpp:28
void ReadFromFile(const Resources::Resource &file)
Read content from a file to stream.
Definition Stream.cpp:15
std::stringstream & GetStream()
Get underlying std::stringstream object.
Definition Stream.hpp:88
const StreamType type
Type of serialization used by stream.
Definition Stream.hpp:22
Stream(const Stream &stream)
make a copy of a stream
Definition Stream.hpp:100
const std::stringstream & GetStream() const
Get underlying std::stringstream object.
Definition Stream.hpp:94
Stream & operator<<(const T &data)
Write data of specified type to stream.
Definition Stream.hpp:50