diff --git a/src/BinaryIo/BinaryIo.h b/src/BinaryIo/BinaryIo.h new file mode 100644 index 0000000..8cc09a6 --- /dev/null +++ b/src/BinaryIo/BinaryIo.h @@ -0,0 +1,24 @@ +#pragma once + +// MassBuilderSaveTool +// Copyright (C) 2021-2024 Guillaume Jacquemin +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +namespace BinaryIo { + +class Reader; +class Writer; + +} diff --git a/src/Gvas/BinaryReader.cpp b/src/BinaryIo/Reader.cpp similarity index 73% rename from src/Gvas/BinaryReader.cpp rename to src/BinaryIo/Reader.cpp index bc876fe..c00edfc 100644 --- a/src/Gvas/BinaryReader.cpp +++ b/src/BinaryIo/Reader.cpp @@ -21,11 +21,11 @@ #include "../Logger/Logger.h" -#include "BinaryReader.h" +#include "Reader.h" -namespace Gvas { +namespace BinaryIo { -BinaryReader::BinaryReader(Containers::StringView filename) { +Reader::Reader(Containers::StringView filename) { _file = std::fopen(filename.data(), "rb"); if(!_file) { @@ -33,93 +33,93 @@ BinaryReader::BinaryReader(Containers::StringView filename) { } } -BinaryReader::~BinaryReader() { +Reader::~Reader() { closeFile(); } bool -BinaryReader::open() { +Reader::open() { return _file; } bool -BinaryReader::eof() { +Reader::eof() { return std::feof(_file) != 0; } std::int64_t -BinaryReader::position() { +Reader::position() { return _ftelli64(_file); } bool -BinaryReader::seek(std::int64_t position) { +Reader::seek(std::int64_t position) { return _fseeki64(_file, position, SEEK_SET) == 0; } void -BinaryReader::closeFile() { +Reader::closeFile() { std::fclose(_file); _file = nullptr; } bool -BinaryReader::readChar(char& value) { +Reader::readChar(char& value) { return std::fread(&value, sizeof(char), 1, _file) == 1; } bool -BinaryReader::readInt8(std::int8_t& value) { +Reader::readInt8(std::int8_t& value) { return std::fread(&value, sizeof(std::int8_t), 1, _file) == 1; } bool -BinaryReader::readUint8(std::uint8_t& value) { +Reader::readUint8(std::uint8_t& value) { return std::fread(&value, sizeof(std::uint8_t), 1, _file) == 1; } bool -BinaryReader::readInt16(std::int16_t& value) { +Reader::readInt16(std::int16_t& value) { return std::fread(&value, sizeof(std::int16_t), 1, _file) == 1; } bool -BinaryReader::readUint16(std::uint16_t& value) { +Reader::readUint16(std::uint16_t& value) { return std::fread(&value, sizeof(std::uint16_t), 1, _file) == 1; } bool -BinaryReader::readInt32(std::int32_t& value) { +Reader::readInt32(std::int32_t& value) { return std::fread(&value, sizeof(std::int32_t), 1, _file) == 1; } bool -BinaryReader::readUint32(std::uint32_t& value) { +Reader::readUint32(std::uint32_t& value) { return std::fread(&value, sizeof(std::uint32_t), 1, _file) == 1; } bool -BinaryReader::readInt64(std::int64_t& value) { +Reader::readInt64(std::int64_t& value) { return std::fread(&value, sizeof(std::int64_t), 1, _file) == 1; } bool -BinaryReader::readUint64(std::uint64_t& value) { +Reader::readUint64(std::uint64_t& value) { return std::fread(&value, sizeof(std::uint64_t), 1, _file) == 1; } bool -BinaryReader::readFloat(float& value) { +Reader::readFloat(float& value) { return std::fread(&value, sizeof(float), 1, _file) == 1; } bool -BinaryReader::readDouble(double& value) { +Reader::readDouble(double& value) { return std::fread(&value, sizeof(double), 1, _file) == 1; } bool -BinaryReader::readArray(Containers::Array& array, std::size_t count) { +Reader::readArray(Containers::Array& array, std::size_t count) { if(array.size() < count) { array = Containers::Array{ValueInit, count}; } @@ -128,7 +128,7 @@ BinaryReader::readArray(Containers::Array& array, std::size_t count) { } bool -BinaryReader::readUEString(Containers::String& str) { +Reader::readUEString(Containers::String& str) { std::uint32_t length = 0; if(!readUint32(length) || length == 0) { return false; @@ -140,7 +140,7 @@ BinaryReader::readUEString(Containers::String& str) { } std::int32_t -BinaryReader::peekChar() { +Reader::peekChar() { std::int32_t c; c = std::fgetc(_file); std::ungetc(c, _file); diff --git a/src/Gvas/BinaryReader.h b/src/BinaryIo/Reader.h similarity index 87% rename from src/Gvas/BinaryReader.h rename to src/BinaryIo/Reader.h index 4fc52b9..794470f 100644 --- a/src/Gvas/BinaryReader.h +++ b/src/BinaryIo/Reader.h @@ -25,12 +25,18 @@ using namespace Corrade; -namespace Gvas { +namespace BinaryIo { -class BinaryReader { +class Reader { public: - explicit BinaryReader(Containers::StringView filename); - ~BinaryReader(); + explicit Reader(Containers::StringView filename); + ~Reader(); + + Reader(const Reader& other) = delete; + Reader& operator=(const Reader& other) = delete; + + Reader(Reader&& other) = default; + Reader& operator=(Reader&& other) = default; bool open(); bool eof(); diff --git a/src/Gvas/BinaryWriter.cpp b/src/BinaryIo/Writer.cpp similarity index 75% rename from src/Gvas/BinaryWriter.cpp rename to src/BinaryIo/Writer.cpp index 1b3d904..4a0bb5d 100644 --- a/src/Gvas/BinaryWriter.cpp +++ b/src/BinaryIo/Writer.cpp @@ -18,52 +18,52 @@ #include "../Logger/Logger.h" -#include "BinaryWriter.h" +#include "Writer.h" using namespace Containers::Literals; -namespace Gvas { +namespace BinaryIo { -BinaryWriter::BinaryWriter(Containers::StringView filename) { +Writer::Writer(Containers::StringView filename) { _file = std::fopen(filename.data(), "wb"); if(!_file) { LOG_ERROR_FORMAT("Couldn't open {} for reading: {}", filename, std::strerror(errno)); } } -BinaryWriter::~BinaryWriter() { +Writer::~Writer() { closeFile(); } bool -BinaryWriter::open() { +Writer::open() { return _file; } void -BinaryWriter::closeFile() { +Writer::closeFile() { std::fflush(_file); std::fclose(_file); _file = nullptr; } std::int64_t -BinaryWriter::position() { +Writer::position() { return _ftelli64(_file); } Containers::ArrayView -BinaryWriter::array() const { +Writer::array() const { return _data; } std::size_t -BinaryWriter::arrayPosition() const { +Writer::arrayPosition() const { return _index; } bool -BinaryWriter::flushToFile() { +Writer::flushToFile() { bool ret = writeArray(_data); std::fflush(_file); _data = Containers::Array{}; @@ -72,62 +72,62 @@ BinaryWriter::flushToFile() { } bool -BinaryWriter::writeChar(char value) { +Writer::writeChar(char value) { return std::fwrite(&value, sizeof(char), 1, _file) == 1; } bool -BinaryWriter::writeInt8(std::int8_t value) { +Writer::writeInt8(std::int8_t value) { return std::fwrite(&value, sizeof(std::int8_t), 1, _file) == 1; } bool -BinaryWriter::writeUint8(std::uint8_t value) { +Writer::writeUint8(std::uint8_t value) { return std::fwrite(&value, sizeof(std::uint8_t), 1, _file) == 1; } bool -BinaryWriter::writeInt16(std::int16_t value) { +Writer::writeInt16(std::int16_t value) { return std::fwrite(&value, sizeof(std::int16_t), 1, _file) == 1; } bool -BinaryWriter::writeUint16(std::uint16_t value) { +Writer::writeUint16(std::uint16_t value) { return std::fwrite(&value, sizeof(std::uint16_t), 1, _file) == 1; } bool -BinaryWriter::writeInt32(std::int32_t value) { +Writer::writeInt32(std::int32_t value) { return std::fwrite(&value, sizeof(std::int32_t), 1, _file) == 1; } bool -BinaryWriter::writeUint32(std::uint32_t value) { +Writer::writeUint32(std::uint32_t value) { return std::fwrite(&value, sizeof(std::uint32_t), 1, _file) == 1; } bool -BinaryWriter::writeInt64(std::int64_t value) { +Writer::writeInt64(std::int64_t value) { return std::fwrite(&value, sizeof(std::int64_t), 1, _file) == 1; } bool -BinaryWriter::writeUint64(std::uint64_t value) { +Writer::writeUint64(std::uint64_t value) { return std::fwrite(&value, sizeof(std::uint64_t), 1, _file) == 1; } bool -BinaryWriter::writeFloat(float value) { +Writer::writeFloat(float value) { return std::fwrite(&value, sizeof(float), 1, _file) == 1; } bool -BinaryWriter::writeDouble(double value) { +Writer::writeDouble(double value) { return std::fwrite(&value, sizeof(double), 1, _file) == 1; } bool -BinaryWriter::writeArray(Containers::ArrayView array) { +Writer::writeArray(Containers::ArrayView array) { if(array.isEmpty()) { return false; } @@ -136,7 +136,7 @@ BinaryWriter::writeArray(Containers::ArrayView array) { } bool -BinaryWriter::writeUEString(Containers::StringView str) { +Writer::writeUEString(Containers::StringView str) { if(str.size() > UINT32_MAX) { LOG_ERROR_FORMAT("String is too big. Expected size() < UINT32_MAX, got {} instead.", str.size()); return false; @@ -154,7 +154,7 @@ BinaryWriter::writeUEString(Containers::StringView str) { } std::size_t -BinaryWriter::writeUEStringToArray(Containers::StringView value) { +Writer::writeUEStringToArray(Containers::StringView value) { return writeValueToArray(std::uint32_t(value.size()) + 1u) + writeDataToArray(Containers::ArrayView{value}) + writeValueToArray('\0'); diff --git a/src/Gvas/BinaryWriter.h b/src/BinaryIo/Writer.h similarity index 90% rename from src/Gvas/BinaryWriter.h rename to src/BinaryIo/Writer.h index 9018a9b..763622e 100644 --- a/src/Gvas/BinaryWriter.h +++ b/src/BinaryIo/Writer.h @@ -26,18 +26,18 @@ using namespace Corrade; -namespace Gvas { +namespace BinaryIo { -class BinaryWriter { +class Writer { public: - explicit BinaryWriter(Containers::StringView filename); - ~BinaryWriter(); + explicit Writer(Containers::StringView filename); + ~Writer(); - BinaryWriter(const BinaryWriter& other) = delete; - BinaryWriter& operator=(const BinaryWriter& other) = delete; + Writer(const Writer& other) = delete; + Writer& operator=(const Writer& other) = delete; - BinaryWriter(BinaryWriter&& other) = default; - BinaryWriter& operator=(BinaryWriter&& other) = default; + Writer(Writer&& other) = default; + Writer& operator=(Writer&& other) = default; bool open(); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cce246b..67291af 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -44,6 +44,14 @@ set(Logger_SOURCES Logger/MagnumLogBuffer.cpp ) +set(BinaryIo_SOURCES + BinaryIo/BinaryIo.h + BinaryIo/Reader.h + BinaryIo/Reader.cpp + BinaryIo/Writer.h + BinaryIo/Writer.cpp +) + set(Gvas_SOURCES Gvas/Serialisers/Serialisers.h Gvas/Serialisers/AbstractUnrealCollectionProperty.h @@ -189,6 +197,7 @@ add_executable(MassBuilderSaveTool FontAwesome/IconsFontAwesome5.h FontAwesome/IconsFontAwesome5Brands.h ${Logger_SOURCES} + ${BinaryIo_SOURCES} ${Gvas_SOURCES} ${SAVETOOL_RC_FILE} ${Assets} diff --git a/src/Gvas/File.cpp b/src/Gvas/File.cpp index 7e9b0aa..1146d8b 100644 --- a/src/Gvas/File.cpp +++ b/src/Gvas/File.cpp @@ -19,8 +19,8 @@ #include "../Logger/Logger.h" -#include "BinaryReader.h" -#include "BinaryWriter.h" +#include "../BinaryIo/Reader.h" +#include "../BinaryIo/Writer.h" #include "File.h" @@ -87,7 +87,7 @@ File::saveToFile() { return false; } - BinaryWriter writer{_filepath + ".tmp"_s}; + BinaryIo::Writer writer{_filepath + ".tmp"_s}; if(!writer.open()) { _lastError = "Couldn't open the file for saving."_s; @@ -175,7 +175,7 @@ File::loadData() { return; } - BinaryReader reader{_filepath}; + BinaryIo::Reader reader{_filepath}; if(!reader.open()) { _lastError = _filepath + " couldn't be opened."_s; diff --git a/src/Gvas/Gvas.h b/src/Gvas/Gvas.h index 0d52b13..cec8a20 100644 --- a/src/Gvas/Gvas.h +++ b/src/Gvas/Gvas.h @@ -18,8 +18,6 @@ namespace Gvas { -class BinaryReader; -class BinaryWriter; class File; class PropertySerialiser; diff --git a/src/Gvas/PropertySerialiser.cpp b/src/Gvas/PropertySerialiser.cpp index e60cfae..81c590f 100644 --- a/src/Gvas/PropertySerialiser.cpp +++ b/src/Gvas/PropertySerialiser.cpp @@ -39,8 +39,8 @@ #include "Types/NoneProperty.h" -#include "BinaryReader.h" -#include "BinaryWriter.h" +#include "../BinaryIo/Reader.h" +#include "../BinaryIo/Writer.h" #include "PropertySerialiser.h" @@ -76,7 +76,7 @@ PropertySerialiser::instance() { } Types::UnrealPropertyBase::ptr -PropertySerialiser::read(BinaryReader& reader) { +PropertySerialiser::read(BinaryIo::Reader& reader) { if(reader.peekChar() < 0 || reader.eof()) { return nullptr; } @@ -104,7 +104,7 @@ PropertySerialiser::read(BinaryReader& reader) { } Types::UnrealPropertyBase::ptr -PropertySerialiser::readItem(BinaryReader& reader, Containers::String type, std::size_t value_length, +PropertySerialiser::readItem(BinaryIo::Reader& reader, Containers::String type, std::size_t value_length, Containers::String name) { if(reader.peekChar() < 0 || reader.eof()) { @@ -115,7 +115,7 @@ PropertySerialiser::readItem(BinaryReader& reader, Containers::String type, std: } Containers::Array -PropertySerialiser::readSet(BinaryReader& reader, Containers::StringView item_type, std::uint32_t count) { +PropertySerialiser::readSet(BinaryIo::Reader& reader, Containers::StringView item_type, std::uint32_t count) { if(reader.peekChar() < 0 || reader.eof()) { return nullptr; } @@ -160,7 +160,7 @@ PropertySerialiser::readSet(BinaryReader& reader, Containers::StringView item_ty Types::UnrealPropertyBase::ptr PropertySerialiser::deserialise(Containers::String name, Containers::String type, std::size_t value_length, - BinaryReader& reader) + BinaryIo::Reader& reader) { Types::UnrealPropertyBase::ptr prop; auto serialiser = getSerialiser(type); @@ -183,7 +183,7 @@ PropertySerialiser::deserialise(Containers::String name, Containers::String type } bool PropertySerialiser::serialise(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer) + std::size_t& bytes_written, BinaryIo::Writer& writer) { auto serialiser = getSerialiser(item_type); if(!serialiser) { @@ -193,7 +193,7 @@ bool PropertySerialiser::serialise(Types::UnrealPropertyBase::ptr& prop, Contain } bool -PropertySerialiser::write(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer) { +PropertySerialiser::write(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer) { if(prop->name == "None" && prop->propertyType == "NoneProperty" && dynamic_cast(prop.get())) { bytes_written += writer.writeUEStringToArray(*prop->name); return true; @@ -218,7 +218,7 @@ PropertySerialiser::write(Types::UnrealPropertyBase::ptr& prop, std::size_t& byt bool PropertySerialiser::writeItem(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer) + std::size_t& bytes_written, BinaryIo::Writer& writer) { if(prop->name == "None" && prop->propertyType == "NoneProperty" && dynamic_cast(prop.get())) { bytes_written += writer.writeUEStringToArray(*prop->name); @@ -229,7 +229,8 @@ PropertySerialiser::writeItem(Types::UnrealPropertyBase::ptr& prop, Containers:: } bool PropertySerialiser::writeSet(Containers::ArrayView props, - Containers::StringView item_type, std::size_t& bytes_written, BinaryWriter& writer) + Containers::StringView item_type, std::size_t& bytes_written, + BinaryIo::Writer& writer) { auto serialiser = getCollectionSerialiser(item_type); if(serialiser) { diff --git a/src/Gvas/PropertySerialiser.h b/src/Gvas/PropertySerialiser.h index 4989642..99b3cd6 100644 --- a/src/Gvas/PropertySerialiser.h +++ b/src/Gvas/PropertySerialiser.h @@ -25,7 +25,7 @@ #include "Types/UnrealPropertyBase.h" -#include "Gvas.h" +#include "../BinaryIo/BinaryIo.h" using namespace Corrade; @@ -35,21 +35,21 @@ class PropertySerialiser { public: static auto instance() -> PropertySerialiser&; - auto read(BinaryReader& reader) -> Types::UnrealPropertyBase::ptr; - auto readItem(BinaryReader& reader, Containers::String type, std::size_t value_length, Containers::String name) + auto read(BinaryIo::Reader& reader) -> Types::UnrealPropertyBase::ptr; + auto readItem(BinaryIo::Reader& reader, Containers::String type, std::size_t value_length, Containers::String name) -> Types::UnrealPropertyBase::ptr; - auto readSet(BinaryReader& reader, Containers::StringView item_type, std::uint32_t count) + auto readSet(BinaryIo::Reader& reader, Containers::StringView item_type, std::uint32_t count) -> Containers::Array; auto deserialise(Containers::String name, Containers::String type, std::size_t value_length, - BinaryReader& reader) -> Types::UnrealPropertyBase::ptr; + BinaryIo::Reader& reader) -> Types::UnrealPropertyBase::ptr; bool serialise(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer); - bool write(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer); + std::size_t& bytes_written, BinaryIo::Writer& writer); + bool write(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer); bool writeItem(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer); + std::size_t& bytes_written, BinaryIo::Writer& writer); bool writeSet(Containers::ArrayView props, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer); + std::size_t& bytes_written, BinaryIo::Writer& writer); private: PropertySerialiser(); diff --git a/src/Gvas/Serialisers/AbstractUnrealCollectionProperty.h b/src/Gvas/Serialisers/AbstractUnrealCollectionProperty.h index a4cefb6..db440d6 100644 --- a/src/Gvas/Serialisers/AbstractUnrealCollectionProperty.h +++ b/src/Gvas/Serialisers/AbstractUnrealCollectionProperty.h @@ -22,6 +22,7 @@ #include #include "../Gvas.h" +#include "../../BinaryIo/BinaryIo.h" #include "../Types/UnrealPropertyBase.h" using namespace Corrade; @@ -41,11 +42,12 @@ class AbstractUnrealCollectionProperty { virtual auto types() -> StringArrayView = 0; virtual auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - std::uint32_t count, BinaryReader& reader, PropertySerialiser& serialiser) + std::uint32_t count, BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> PropertyArray = 0; virtual bool serialise(PropertyArrayView props, Containers::StringView item_type, - std::size_t& bytes_written, BinaryWriter& writer, PropertySerialiser& serialiser) = 0; + std::size_t& bytes_written, BinaryIo::Writer& writer, + PropertySerialiser& serialiser) = 0; }; }} diff --git a/src/Gvas/Serialisers/AbstractUnrealProperty.h b/src/Gvas/Serialisers/AbstractUnrealProperty.h index f0945f2..061e95c 100644 --- a/src/Gvas/Serialisers/AbstractUnrealProperty.h +++ b/src/Gvas/Serialisers/AbstractUnrealProperty.h @@ -21,11 +21,11 @@ #include #include "../Gvas.h" +#include "../../BinaryIo/BinaryIo.h" #include "../Types/UnrealPropertyBase.h" using namespace Corrade; - namespace Gvas { namespace Serialisers { using StringArrayView = Containers::ArrayView; @@ -39,11 +39,11 @@ class AbstractUnrealProperty { virtual auto types() -> StringArrayView = 0; virtual auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr = 0; - virtual bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) = 0; + virtual bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) = 0; }; }} diff --git a/src/Gvas/Serialisers/AbstractUnrealStruct.h b/src/Gvas/Serialisers/AbstractUnrealStruct.h index 1232e21..715c2e7 100644 --- a/src/Gvas/Serialisers/AbstractUnrealStruct.h +++ b/src/Gvas/Serialisers/AbstractUnrealStruct.h @@ -22,6 +22,7 @@ #include #include "../Gvas.h" +#include "../../BinaryIo/BinaryIo.h" #include "../Types/UnrealPropertyBase.h" using namespace Corrade; @@ -36,9 +37,9 @@ class AbstractUnrealStruct { virtual bool supportsType(Containers::StringView type) = 0; - virtual auto deserialise(BinaryReader& reader) -> Types::UnrealPropertyBase::ptr = 0; + virtual auto deserialise(BinaryIo::Reader& reader) -> Types::UnrealPropertyBase::ptr = 0; - virtual bool serialise(Types::UnrealPropertyBase::ptr& structProp, BinaryWriter& writer, + virtual bool serialise(Types::UnrealPropertyBase::ptr& structProp, BinaryIo::Writer& writer, std::size_t& bytes_written) = 0; }; diff --git a/src/Gvas/Serialisers/ArrayProperty.cpp b/src/Gvas/Serialisers/ArrayProperty.cpp index d1305ad..a6e2047 100644 --- a/src/Gvas/Serialisers/ArrayProperty.cpp +++ b/src/Gvas/Serialisers/ArrayProperty.cpp @@ -16,8 +16,8 @@ #include -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../PropertySerialiser.h" #include "../../Logger/Logger.h" @@ -27,7 +27,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr ArrayProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { Containers::String item_type; if(!reader.readUEString(item_type)) { @@ -55,8 +55,8 @@ ArrayProperty::deserialiseProperty(Containers::StringView name, Containers::Stri } bool -ArrayProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +ArrayProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto array_prop = dynamic_cast(prop.get()); if(!array_prop) { diff --git a/src/Gvas/Serialisers/ArrayProperty.h b/src/Gvas/Serialisers/ArrayProperty.h index 078a79c..2ed6f56 100644 --- a/src/Gvas/Serialisers/ArrayProperty.h +++ b/src/Gvas/Serialisers/ArrayProperty.h @@ -32,10 +32,10 @@ class ArrayProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/BoolProperty.cpp b/src/Gvas/Serialisers/BoolProperty.cpp index 0d831f5..3f38495 100644 --- a/src/Gvas/Serialisers/BoolProperty.cpp +++ b/src/Gvas/Serialisers/BoolProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "BoolProperty.h" @@ -31,7 +31,7 @@ BoolProperty::types() { Types::UnrealPropertyBase::ptr BoolProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { if(value_length != 0) { LOG_ERROR_FORMAT("Invalid value length for bool property {}. Expected 0, got {} instead.", name, value_length); @@ -56,7 +56,7 @@ BoolProperty::deserialise(Containers::StringView name, Containers::StringView ty } bool -BoolProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +BoolProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto bool_prop = dynamic_cast(prop.get()); diff --git a/src/Gvas/Serialisers/BoolProperty.h b/src/Gvas/Serialisers/BoolProperty.h index 9af5fab..b36a66d 100644 --- a/src/Gvas/Serialisers/BoolProperty.h +++ b/src/Gvas/Serialisers/BoolProperty.h @@ -34,10 +34,10 @@ class BoolProperty : public AbstractUnrealProperty { auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; diff --git a/src/Gvas/Serialisers/ByteProperty.cpp b/src/Gvas/Serialisers/ByteProperty.cpp index 7f92233..ca0a104 100644 --- a/src/Gvas/Serialisers/ByteProperty.cpp +++ b/src/Gvas/Serialisers/ByteProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "ByteProperty.h" @@ -31,7 +31,7 @@ ByteProperty::types() { Types::UnrealPropertyBase::ptr ByteProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -68,7 +68,7 @@ ByteProperty::deserialise(Containers::StringView name, Containers::StringView ty } bool -ByteProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +ByteProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto byte_prop = dynamic_cast(prop.get()); diff --git a/src/Gvas/Serialisers/ByteProperty.h b/src/Gvas/Serialisers/ByteProperty.h index fccbad0..f5e97c4 100644 --- a/src/Gvas/Serialisers/ByteProperty.h +++ b/src/Gvas/Serialisers/ByteProperty.h @@ -32,10 +32,10 @@ class ByteProperty : public AbstractUnrealProperty { auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; diff --git a/src/Gvas/Serialisers/ColourProperty.cpp b/src/Gvas/Serialisers/ColourProperty.cpp index 4d5a7b0..fd39617 100644 --- a/src/Gvas/Serialisers/ColourProperty.cpp +++ b/src/Gvas/Serialisers/ColourProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "ColourProperty.h" @@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr ColourProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -40,7 +40,7 @@ ColourProperty::deserialiseProperty(Containers::StringView name, Containers::Str bool ColourProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto colour_prop = dynamic_cast(prop.get()); if(!colour_prop) { diff --git a/src/Gvas/Serialisers/ColourProperty.h b/src/Gvas/Serialisers/ColourProperty.h index 6d5f5a7..b86061c 100644 --- a/src/Gvas/Serialisers/ColourProperty.h +++ b/src/Gvas/Serialisers/ColourProperty.h @@ -32,10 +32,10 @@ class ColourProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/DateTimeProperty.cpp b/src/Gvas/Serialisers/DateTimeProperty.cpp index 8eb2ed8..1a4caf3 100644 --- a/src/Gvas/Serialisers/DateTimeProperty.cpp +++ b/src/Gvas/Serialisers/DateTimeProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "DateTimeProperty.h" @@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr DateTimeProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, - std::size_t value_length, BinaryReader& reader, PropertySerialiser& serialiser) + std::size_t value_length, BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -38,7 +38,7 @@ DateTimeProperty::deserialiseProperty(Containers::StringView name, Containers::S bool DateTimeProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto dt_prop = dynamic_cast(prop.get()); if(!dt_prop) { diff --git a/src/Gvas/Serialisers/DateTimeProperty.h b/src/Gvas/Serialisers/DateTimeProperty.h index d96c86c..6d7822e 100644 --- a/src/Gvas/Serialisers/DateTimeProperty.h +++ b/src/Gvas/Serialisers/DateTimeProperty.h @@ -30,10 +30,10 @@ class DateTimeProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/EnumProperty.cpp b/src/Gvas/Serialisers/EnumProperty.cpp index dbb133e..c475cf4 100644 --- a/src/Gvas/Serialisers/EnumProperty.cpp +++ b/src/Gvas/Serialisers/EnumProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "EnumProperty.h" @@ -31,7 +31,7 @@ EnumProperty::types() { Types::UnrealPropertyBase::ptr EnumProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -55,7 +55,7 @@ EnumProperty::deserialise(Containers::StringView name, Containers::StringView ty } bool -EnumProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +EnumProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto enum_prop = dynamic_cast(prop.get()); diff --git a/src/Gvas/Serialisers/EnumProperty.h b/src/Gvas/Serialisers/EnumProperty.h index 86ebd8f..3ed25f9 100644 --- a/src/Gvas/Serialisers/EnumProperty.h +++ b/src/Gvas/Serialisers/EnumProperty.h @@ -32,10 +32,10 @@ class EnumProperty : public AbstractUnrealProperty { auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; diff --git a/src/Gvas/Serialisers/FloatProperty.cpp b/src/Gvas/Serialisers/FloatProperty.cpp index 0833533..84ee2b1 100644 --- a/src/Gvas/Serialisers/FloatProperty.cpp +++ b/src/Gvas/Serialisers/FloatProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "FloatProperty.h" @@ -31,7 +31,7 @@ FloatProperty::types() { Types::UnrealPropertyBase::ptr FloatProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -50,7 +50,7 @@ FloatProperty::deserialise(Containers::StringView name, Containers::StringView t } bool -FloatProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +FloatProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto float_prop = dynamic_cast(prop.get()); diff --git a/src/Gvas/Serialisers/FloatProperty.h b/src/Gvas/Serialisers/FloatProperty.h index 752c194..2a94b10 100644 --- a/src/Gvas/Serialisers/FloatProperty.h +++ b/src/Gvas/Serialisers/FloatProperty.h @@ -32,10 +32,10 @@ class FloatProperty : public AbstractUnrealProperty { auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; diff --git a/src/Gvas/Serialisers/GuidProperty.cpp b/src/Gvas/Serialisers/GuidProperty.cpp index 9b8ccc0..8d1f04b 100644 --- a/src/Gvas/Serialisers/GuidProperty.cpp +++ b/src/Gvas/Serialisers/GuidProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "GuidProperty.h" @@ -26,7 +26,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr GuidProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -39,8 +39,8 @@ GuidProperty::deserialiseProperty(Containers::StringView name, Containers::Strin } bool -GuidProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +GuidProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto guid_prop = dynamic_cast(prop.get()); if(!guid_prop) { diff --git a/src/Gvas/Serialisers/GuidProperty.h b/src/Gvas/Serialisers/GuidProperty.h index 0fe5378..a704a9f 100644 --- a/src/Gvas/Serialisers/GuidProperty.h +++ b/src/Gvas/Serialisers/GuidProperty.h @@ -30,10 +30,10 @@ class GuidProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/IntProperty.cpp b/src/Gvas/Serialisers/IntProperty.cpp index 156118f..f4b24ea 100644 --- a/src/Gvas/Serialisers/IntProperty.cpp +++ b/src/Gvas/Serialisers/IntProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "IntProperty.h" @@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr IntProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -55,8 +55,8 @@ IntProperty::deserialiseProperty(Containers::StringView name, Containers::String } bool -IntProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +IntProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto int_prop = dynamic_cast(prop.get()); if(!int_prop) { diff --git a/src/Gvas/Serialisers/IntProperty.h b/src/Gvas/Serialisers/IntProperty.h index 9f8108d..7b9002b 100644 --- a/src/Gvas/Serialisers/IntProperty.h +++ b/src/Gvas/Serialisers/IntProperty.h @@ -30,10 +30,10 @@ class IntProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/MapProperty.cpp b/src/Gvas/Serialisers/MapProperty.cpp index 992e5d7..4fbb216 100644 --- a/src/Gvas/Serialisers/MapProperty.cpp +++ b/src/Gvas/Serialisers/MapProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../PropertySerialiser.h" #include "../Types/NoneProperty.h" #include "../../Logger/Logger.h" @@ -28,7 +28,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr MapProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -110,8 +110,8 @@ MapProperty::deserialiseProperty(Containers::StringView name, Containers::String } bool -MapProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +MapProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto map_prop = dynamic_cast(prop.get()); if(!map_prop) { diff --git a/src/Gvas/Serialisers/MapProperty.h b/src/Gvas/Serialisers/MapProperty.h index 7bf2231..efd6553 100644 --- a/src/Gvas/Serialisers/MapProperty.h +++ b/src/Gvas/Serialisers/MapProperty.h @@ -30,10 +30,10 @@ class MapProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/ResourceProperty.cpp b/src/Gvas/Serialisers/ResourceProperty.cpp index 2564fe1..58f9403 100644 --- a/src/Gvas/Serialisers/ResourceProperty.cpp +++ b/src/Gvas/Serialisers/ResourceProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../PropertySerialiser.h" #include "../Types/IntProperty.h" #include "../Types/NoneProperty.h" @@ -29,7 +29,8 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr ResourceProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, - std::size_t value_length, BinaryReader& reader, PropertySerialiser& serialiser) + std::size_t value_length, BinaryIo::Reader& reader, + PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -81,7 +82,7 @@ ResourceProperty::deserialiseProperty(Containers::StringView name, Containers::S bool ResourceProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto res_prop = dynamic_cast(prop.get()); if(!res_prop) { diff --git a/src/Gvas/Serialisers/ResourceProperty.h b/src/Gvas/Serialisers/ResourceProperty.h index 7f933a5..351a5bd 100644 --- a/src/Gvas/Serialisers/ResourceProperty.h +++ b/src/Gvas/Serialisers/ResourceProperty.h @@ -30,10 +30,10 @@ class ResourceProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/RotatorProperty.cpp b/src/Gvas/Serialisers/RotatorProperty.cpp index d468e20..c3759a2 100644 --- a/src/Gvas/Serialisers/RotatorProperty.cpp +++ b/src/Gvas/Serialisers/RotatorProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "RotatorProperty.h" @@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr RotatorProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -38,7 +38,7 @@ RotatorProperty::deserialiseProperty(Containers::StringView name, Containers::St bool RotatorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto rotator = dynamic_cast(prop.get()); if(!rotator) { @@ -46,7 +46,8 @@ RotatorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::si return false; } - bytes_written += writer.writeValueToArray(rotator->x) + writer.writeValueToArray(rotator->y) + + bytes_written += writer.writeValueToArray(rotator->x) + + writer.writeValueToArray(rotator->y) + writer.writeValueToArray(rotator->z); return true; diff --git a/src/Gvas/Serialisers/RotatorProperty.h b/src/Gvas/Serialisers/RotatorProperty.h index 6eb7f1c..63fdb4e 100644 --- a/src/Gvas/Serialisers/RotatorProperty.h +++ b/src/Gvas/Serialisers/RotatorProperty.h @@ -30,10 +30,10 @@ class RotatorProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/SetProperty.cpp b/src/Gvas/Serialisers/SetProperty.cpp index 61eb199..d6ffd4b 100644 --- a/src/Gvas/Serialisers/SetProperty.cpp +++ b/src/Gvas/Serialisers/SetProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../PropertySerialiser.h" #include "../../Logger/Logger.h" @@ -25,7 +25,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr SetProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { Containers::String item_type; if(!reader.readUEString(item_type)) { @@ -59,8 +59,8 @@ SetProperty::deserialiseProperty(Containers::StringView name, Containers::String } bool -SetProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +SetProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto set_prop = dynamic_cast(prop.get()); if(!set_prop) { diff --git a/src/Gvas/Serialisers/SetProperty.h b/src/Gvas/Serialisers/SetProperty.h index d95a39c..5291d9f 100644 --- a/src/Gvas/Serialisers/SetProperty.h +++ b/src/Gvas/Serialisers/SetProperty.h @@ -30,10 +30,10 @@ class SetProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/StringProperty.cpp b/src/Gvas/Serialisers/StringProperty.cpp index b329628..0dbe810 100644 --- a/src/Gvas/Serialisers/StringProperty.cpp +++ b/src/Gvas/Serialisers/StringProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "StringProperty.h" @@ -33,7 +33,7 @@ StringProperty::types() { Types::UnrealPropertyBase::ptr StringProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(type); @@ -56,7 +56,7 @@ StringProperty::deserialise(Containers::StringView name, Containers::StringView } bool -StringProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +StringProperty::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto str_prop = dynamic_cast(prop.get()); diff --git a/src/Gvas/Serialisers/StringProperty.h b/src/Gvas/Serialisers/StringProperty.h index cc783da..ceba34b 100644 --- a/src/Gvas/Serialisers/StringProperty.h +++ b/src/Gvas/Serialisers/StringProperty.h @@ -32,10 +32,10 @@ class StringProperty : public AbstractUnrealProperty { auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; diff --git a/src/Gvas/Serialisers/Struct.cpp b/src/Gvas/Serialisers/Struct.cpp index 65b5074..e73ac8a 100644 --- a/src/Gvas/Serialisers/Struct.cpp +++ b/src/Gvas/Serialisers/Struct.cpp @@ -16,8 +16,8 @@ #include -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../PropertySerialiser.h" #include "../Types/GenericStructProperty.h" #include "../Types/NoneProperty.h" @@ -36,7 +36,7 @@ Struct::types() { PropertyArray Struct::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - std::uint32_t count, BinaryReader& reader, PropertySerialiser& serialiser) + std::uint32_t count, BinaryIo::Reader& reader, PropertySerialiser& serialiser) { Containers::String item_type; if(!reader.readUEString(item_type)) { @@ -89,7 +89,7 @@ Struct::deserialise(Containers::StringView name, Containers::StringView type, st Types::UnrealPropertyBase::ptr Struct::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { Containers::String item_type; if(!reader.readUEString(item_type)) { @@ -127,7 +127,7 @@ Struct::deserialise(Containers::StringView name, Containers::StringView type, st bool Struct::serialise(PropertyArrayView props, Containers::StringView item_type, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { bytes_written += writer.writeUEStringToArray(*(props.front()->name)); bytes_written += writer.writeUEStringToArray(item_type); @@ -170,7 +170,7 @@ Struct::serialise(PropertyArrayView props, Containers::StringView item_type, std } bool -Struct::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, +Struct::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto struct_prop = dynamic_cast(prop.get()); @@ -198,7 +198,7 @@ Struct::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_writt Types::StructProperty::ptr Struct::readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { static_cast(value_length); @@ -223,7 +223,7 @@ Struct::readStructValue(Containers::StringView name, Containers::StringView type } bool -Struct::writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryWriter& writer, +Struct::writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto struct_prop = dynamic_cast(prop); diff --git a/src/Gvas/Serialisers/Struct.h b/src/Gvas/Serialisers/Struct.h index 19931f2..18bd2b3 100644 --- a/src/Gvas/Serialisers/Struct.h +++ b/src/Gvas/Serialisers/Struct.h @@ -34,21 +34,21 @@ class Struct : public AbstractUnrealProperty, public AbstractUnrealCollectionPro auto types() -> StringArrayView override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - std::uint32_t count, BinaryReader& reader, PropertySerialiser& serialiser) + std::uint32_t count, BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> PropertyArray override; auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; bool serialise(PropertyArrayView props, Containers::StringView item_type, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) override; - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; private: auto readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) -> Types::StructProperty::ptr; - bool writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryWriter& writer, + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::StructProperty::ptr; + bool writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser); }; diff --git a/src/Gvas/Serialisers/TextProperty.cpp b/src/Gvas/Serialisers/TextProperty.cpp index 3b51846..7525958 100644 --- a/src/Gvas/Serialisers/TextProperty.cpp +++ b/src/Gvas/Serialisers/TextProperty.cpp @@ -18,8 +18,8 @@ #include "../../Logger/Logger.h" -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "TextProperty.h" @@ -27,7 +27,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr TextProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -73,8 +73,8 @@ TextProperty::deserialiseProperty(Containers::StringView name, Containers::Strin } bool -TextProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) +TextProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto text_prop = dynamic_cast(prop.get()); if(!text_prop) { diff --git a/src/Gvas/Serialisers/TextProperty.h b/src/Gvas/Serialisers/TextProperty.h index 3d47cbe..804743f 100644 --- a/src/Gvas/Serialisers/TextProperty.h +++ b/src/Gvas/Serialisers/TextProperty.h @@ -30,10 +30,10 @@ class TextProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/UnrealProperty.h b/src/Gvas/Serialisers/UnrealProperty.h index 507dde8..208a00f 100644 --- a/src/Gvas/Serialisers/UnrealProperty.h +++ b/src/Gvas/Serialisers/UnrealProperty.h @@ -52,13 +52,13 @@ class UnrealProperty : public AbstractUnrealProperty { } auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override { return deserialiseProperty(name, type, value_length, reader, serialiser); } - bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, + bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryIo::Writer& writer, PropertySerialiser& serialiser) override { return serialiseProperty(prop, bytes_written, writer, serialiser); @@ -66,11 +66,11 @@ class UnrealProperty : public AbstractUnrealProperty { private: virtual auto deserialiseProperty(Containers::StringView name, Containers::StringView type, - std::size_t value_length, BinaryReader& reader, PropertySerialiser& serialiser) - -> Types::UnrealPropertyBase::ptr = 0; + std::size_t value_length, BinaryIo::Reader& reader, + PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr = 0; virtual bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) = 0; + BinaryIo::Writer& writer, PropertySerialiser& serialiser) = 0; }; }} diff --git a/src/Gvas/Serialisers/Vector2DProperty.cpp b/src/Gvas/Serialisers/Vector2DProperty.cpp index f58fde0..e1eea29 100644 --- a/src/Gvas/Serialisers/Vector2DProperty.cpp +++ b/src/Gvas/Serialisers/Vector2DProperty.cpp @@ -14,8 +14,8 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "../../Logger/Logger.h" #include "Vector2DProperty.h" @@ -24,7 +24,8 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr Vector2DProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, - std::size_t value_length, BinaryReader& reader, PropertySerialiser& serialiser) + std::size_t value_length, BinaryIo::Reader& reader, + PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -38,7 +39,7 @@ Vector2DProperty::deserialiseProperty(Containers::StringView name, Containers::S bool Vector2DProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto vector = dynamic_cast(prop.get()); if(!vector) { @@ -46,7 +47,8 @@ Vector2DProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::s return false; } - bytes_written += writer.writeValueToArray(vector->x) + writer.writeValueToArray(vector->y); + bytes_written += writer.writeValueToArray(vector->x) + + writer.writeValueToArray(vector->y); return true; } diff --git a/src/Gvas/Serialisers/Vector2DProperty.h b/src/Gvas/Serialisers/Vector2DProperty.h index 4789d6b..eb1935a 100644 --- a/src/Gvas/Serialisers/Vector2DProperty.h +++ b/src/Gvas/Serialisers/Vector2DProperty.h @@ -30,10 +30,10 @@ class Vector2DProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }} diff --git a/src/Gvas/Serialisers/VectorProperty.cpp b/src/Gvas/Serialisers/VectorProperty.cpp index 7c8294f..964097c 100644 --- a/src/Gvas/Serialisers/VectorProperty.cpp +++ b/src/Gvas/Serialisers/VectorProperty.cpp @@ -16,8 +16,8 @@ #include "../../Logger/Logger.h" -#include "../BinaryReader.h" -#include "../BinaryWriter.h" +#include "../../BinaryIo/Reader.h" +#include "../../BinaryIo/Writer.h" #include "VectorProperty.h" @@ -25,7 +25,7 @@ namespace Gvas { namespace Serialisers { Types::UnrealPropertyBase::ptr VectorProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) { auto prop = Containers::pointer(); @@ -39,7 +39,7 @@ VectorProperty::deserialiseProperty(Containers::StringView name, Containers::Str bool VectorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, - BinaryWriter& writer, PropertySerialiser& serialiser) + BinaryIo::Writer& writer, PropertySerialiser& serialiser) { auto vector = dynamic_cast(prop.get()); if(!vector) { @@ -47,7 +47,8 @@ VectorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::siz return false; } - bytes_written += writer.writeValueToArray(vector->x) + writer.writeValueToArray(vector->y) + + bytes_written += writer.writeValueToArray(vector->x) + + writer.writeValueToArray(vector->y) + writer.writeValueToArray(vector->z); return true; diff --git a/src/Gvas/Serialisers/VectorProperty.h b/src/Gvas/Serialisers/VectorProperty.h index e24881f..94ce181 100644 --- a/src/Gvas/Serialisers/VectorProperty.h +++ b/src/Gvas/Serialisers/VectorProperty.h @@ -30,10 +30,10 @@ class VectorProperty : public UnrealProperty { private: auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, - BinaryReader& reader, PropertySerialiser& serialiser) + BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr override; - bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, - PropertySerialiser& serialiser) override; + bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, + BinaryIo::Writer& writer, PropertySerialiser& serialiser) override; }; }}