Files
NazaraEngine/include/Nazara/Core/SerializationContext.hpp
Jérôme Leclercq 03e2801dbe Split engine to packages NazaraUtils and NZSL (#375)
* Move code to NazaraUtils and NZSL packages

* Reorder includes

* Tests: Remove glslang and spirv-tools deps

* Tests: Remove glslang init

* Remove NazaraUtils tests and fix Vector4Test

* Fix Linux compilation

* Update msys2-build.yml

* Fix assimp package

* Update xmake.lua

* Update xmake.lua

* Fix shader compilation on MinGW

* Final fixes

* The final fix 2: the fix strikes back!

* Disable cache on CI

* The return of the fix™️
2022-05-25 19:36:10 +02:00

38 lines
1.1 KiB
C++

// Copyright (C) 2022 Jérôme "Lynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_CORE_SERIALIZATIONCONTEXT_HPP
#define NAZARA_CORE_SERIALIZATIONCONTEXT_HPP
#include <Nazara/Prerequisites.hpp>
#include <Nazara/Core/Config.hpp>
#include <Nazara/Utils/Endianness.hpp>
#include <Nazara/Utils/MovablePtr.hpp>
#include <Nazara/Utils/TypeTag.hpp>
namespace Nz
{
class Stream;
struct NAZARA_CORE_API SerializationContext
{
MovablePtr<Stream> stream;
Endianness endianness = Endianness::BigEndian; //< Default to Big Endian encoding
UInt8 readBitPos = 8; //< 8 means no bit is currently read
UInt8 readByte; //< Undefined value, will be initialized at the first bit read
UInt8 writeBitPos = 8; //< 8 means no bit is currently wrote
UInt8 writeByte; //< Undefined value, will be initialized at the first bit write
void FlushBits();
inline void ResetReadBitPosition();
inline void ResetWriteBitPosition();
};
}
#include <Nazara/Core/SerializationContext.inl>
#endif // NAZARA_CORE_SERIALIZATIONCONTEXT_HPP