Compare commits

...

4 Commits

Author SHA1 Message Date
Guillaume Jacquemin f68dee939e
Gvas: improve a loop to avoid a useless move. 2024-03-08 21:20:11 +01:00
Guillaume Jacquemin 3c79f39046
Gvas: separate Binary{Reader,Writer}.
The functionality has been moved to BinaryIo::{Reader,Writer} to
prepare for exporting build parts.
2024-03-08 21:18:17 +01:00
Guillaume Jacquemin 3bc750436f
Logger,Gvas: reintegrate into main project.
Separate libraries made things a bit messy, to be honest.
2024-03-08 20:55:05 +01:00
Guillaume Jacquemin e156196b98
Update copyright year.
Now's a good time as any, I guess.
2024-03-08 20:25:32 +01:00
145 changed files with 508 additions and 519 deletions

View File

@ -1,5 +1,5 @@
# MassBuilderSaveTool # MassBuilderSaveTool
# Copyright (C) 2021-2022 Guillaume Jacquemin # Copyright (C) 2021-2024 Guillaume Jacquemin
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

24
src/BinaryIo/BinaryIo.h Normal file
View File

@ -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 <https://www.gnu.org/licenses/>.
namespace BinaryIo {
class Reader;
class Writer;
}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -21,11 +21,11 @@
#include "../Logger/Logger.h" #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"); _file = std::fopen(filename.data(), "rb");
if(!_file) { if(!_file) {
@ -33,93 +33,93 @@ BinaryReader::BinaryReader(Containers::StringView filename) {
} }
} }
BinaryReader::~BinaryReader() { Reader::~Reader() {
closeFile(); closeFile();
} }
bool bool
BinaryReader::open() { Reader::open() {
return _file; return _file;
} }
bool bool
BinaryReader::eof() { Reader::eof() {
return std::feof(_file) != 0; return std::feof(_file) != 0;
} }
std::int64_t std::int64_t
BinaryReader::position() { Reader::position() {
return _ftelli64(_file); return _ftelli64(_file);
} }
bool bool
BinaryReader::seek(std::int64_t position) { Reader::seek(std::int64_t position) {
return _fseeki64(_file, position, SEEK_SET) == 0; return _fseeki64(_file, position, SEEK_SET) == 0;
} }
void void
BinaryReader::closeFile() { Reader::closeFile() {
std::fclose(_file); std::fclose(_file);
_file = nullptr; _file = nullptr;
} }
bool bool
BinaryReader::readChar(char& value) { Reader::readChar(char& value) {
return std::fread(&value, sizeof(char), 1, _file) == 1; return std::fread(&value, sizeof(char), 1, _file) == 1;
} }
bool bool
BinaryReader::readInt8(std::int8_t& value) { Reader::readInt8(std::int8_t& value) {
return std::fread(&value, sizeof(std::int8_t), 1, _file) == 1; return std::fread(&value, sizeof(std::int8_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readUint8(std::uint8_t& value) { Reader::readUint8(std::uint8_t& value) {
return std::fread(&value, sizeof(std::uint8_t), 1, _file) == 1; return std::fread(&value, sizeof(std::uint8_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readInt16(std::int16_t& value) { Reader::readInt16(std::int16_t& value) {
return std::fread(&value, sizeof(std::int16_t), 1, _file) == 1; return std::fread(&value, sizeof(std::int16_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readUint16(std::uint16_t& value) { Reader::readUint16(std::uint16_t& value) {
return std::fread(&value, sizeof(std::uint16_t), 1, _file) == 1; return std::fread(&value, sizeof(std::uint16_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readInt32(std::int32_t& value) { Reader::readInt32(std::int32_t& value) {
return std::fread(&value, sizeof(std::int32_t), 1, _file) == 1; return std::fread(&value, sizeof(std::int32_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readUint32(std::uint32_t& value) { Reader::readUint32(std::uint32_t& value) {
return std::fread(&value, sizeof(std::uint32_t), 1, _file) == 1; return std::fread(&value, sizeof(std::uint32_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readInt64(std::int64_t& value) { Reader::readInt64(std::int64_t& value) {
return std::fread(&value, sizeof(std::int64_t), 1, _file) == 1; return std::fread(&value, sizeof(std::int64_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readUint64(std::uint64_t& value) { Reader::readUint64(std::uint64_t& value) {
return std::fread(&value, sizeof(std::uint64_t), 1, _file) == 1; return std::fread(&value, sizeof(std::uint64_t), 1, _file) == 1;
} }
bool bool
BinaryReader::readFloat(float& value) { Reader::readFloat(float& value) {
return std::fread(&value, sizeof(float), 1, _file) == 1; return std::fread(&value, sizeof(float), 1, _file) == 1;
} }
bool bool
BinaryReader::readDouble(double& value) { Reader::readDouble(double& value) {
return std::fread(&value, sizeof(double), 1, _file) == 1; return std::fread(&value, sizeof(double), 1, _file) == 1;
} }
bool bool
BinaryReader::readArray(Containers::Array<char>& array, std::size_t count) { Reader::readArray(Containers::Array<char>& array, std::size_t count) {
if(array.size() < count) { if(array.size() < count) {
array = Containers::Array<char>{ValueInit, count}; array = Containers::Array<char>{ValueInit, count};
} }
@ -128,7 +128,7 @@ BinaryReader::readArray(Containers::Array<char>& array, std::size_t count) {
} }
bool bool
BinaryReader::readUEString(Containers::String& str) { Reader::readUEString(Containers::String& str) {
std::uint32_t length = 0; std::uint32_t length = 0;
if(!readUint32(length) || length == 0) { if(!readUint32(length) || length == 0) {
return false; return false;
@ -140,7 +140,7 @@ BinaryReader::readUEString(Containers::String& str) {
} }
std::int32_t std::int32_t
BinaryReader::peekChar() { Reader::peekChar() {
std::int32_t c; std::int32_t c;
c = std::fgetc(_file); c = std::fgetc(_file);
std::ungetc(c, _file); std::ungetc(c, _file);

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -25,12 +25,18 @@
using namespace Corrade; using namespace Corrade;
namespace Gvas { namespace BinaryIo {
class BinaryReader { class Reader {
public: public:
explicit BinaryReader(Containers::StringView filename); explicit Reader(Containers::StringView filename);
~BinaryReader(); ~Reader();
Reader(const Reader& other) = delete;
Reader& operator=(const Reader& other) = delete;
Reader(Reader&& other) = default;
Reader& operator=(Reader&& other) = default;
bool open(); bool open();
bool eof(); bool eof();

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -18,52 +18,52 @@
#include "../Logger/Logger.h" #include "../Logger/Logger.h"
#include "BinaryWriter.h" #include "Writer.h"
using namespace Containers::Literals; using namespace Containers::Literals;
namespace Gvas { namespace BinaryIo {
BinaryWriter::BinaryWriter(Containers::StringView filename) { Writer::Writer(Containers::StringView filename) {
_file = std::fopen(filename.data(), "wb"); _file = std::fopen(filename.data(), "wb");
if(!_file) { if(!_file) {
LOG_ERROR_FORMAT("Couldn't open {} for reading: {}", filename, std::strerror(errno)); LOG_ERROR_FORMAT("Couldn't open {} for reading: {}", filename, std::strerror(errno));
} }
} }
BinaryWriter::~BinaryWriter() { Writer::~Writer() {
closeFile(); closeFile();
} }
bool bool
BinaryWriter::open() { Writer::open() {
return _file; return _file;
} }
void void
BinaryWriter::closeFile() { Writer::closeFile() {
std::fflush(_file); std::fflush(_file);
std::fclose(_file); std::fclose(_file);
_file = nullptr; _file = nullptr;
} }
std::int64_t std::int64_t
BinaryWriter::position() { Writer::position() {
return _ftelli64(_file); return _ftelli64(_file);
} }
Containers::ArrayView<const char> Containers::ArrayView<const char>
BinaryWriter::array() const { Writer::array() const {
return _data; return _data;
} }
std::size_t std::size_t
BinaryWriter::arrayPosition() const { Writer::arrayPosition() const {
return _index; return _index;
} }
bool bool
BinaryWriter::flushToFile() { Writer::flushToFile() {
bool ret = writeArray(_data); bool ret = writeArray(_data);
std::fflush(_file); std::fflush(_file);
_data = Containers::Array<char>{}; _data = Containers::Array<char>{};
@ -72,62 +72,62 @@ BinaryWriter::flushToFile() {
} }
bool bool
BinaryWriter::writeChar(char value) { Writer::writeChar(char value) {
return std::fwrite(&value, sizeof(char), 1, _file) == 1; return std::fwrite(&value, sizeof(char), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeInt8(std::int8_t value) { Writer::writeInt8(std::int8_t value) {
return std::fwrite(&value, sizeof(std::int8_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::int8_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeUint8(std::uint8_t value) { Writer::writeUint8(std::uint8_t value) {
return std::fwrite(&value, sizeof(std::uint8_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::uint8_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeInt16(std::int16_t value) { Writer::writeInt16(std::int16_t value) {
return std::fwrite(&value, sizeof(std::int16_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::int16_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeUint16(std::uint16_t value) { Writer::writeUint16(std::uint16_t value) {
return std::fwrite(&value, sizeof(std::uint16_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::uint16_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeInt32(std::int32_t value) { Writer::writeInt32(std::int32_t value) {
return std::fwrite(&value, sizeof(std::int32_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::int32_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeUint32(std::uint32_t value) { Writer::writeUint32(std::uint32_t value) {
return std::fwrite(&value, sizeof(std::uint32_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::uint32_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeInt64(std::int64_t value) { Writer::writeInt64(std::int64_t value) {
return std::fwrite(&value, sizeof(std::int64_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::int64_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeUint64(std::uint64_t value) { Writer::writeUint64(std::uint64_t value) {
return std::fwrite(&value, sizeof(std::uint64_t), 1, _file) == 1; return std::fwrite(&value, sizeof(std::uint64_t), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeFloat(float value) { Writer::writeFloat(float value) {
return std::fwrite(&value, sizeof(float), 1, _file) == 1; return std::fwrite(&value, sizeof(float), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeDouble(double value) { Writer::writeDouble(double value) {
return std::fwrite(&value, sizeof(double), 1, _file) == 1; return std::fwrite(&value, sizeof(double), 1, _file) == 1;
} }
bool bool
BinaryWriter::writeArray(Containers::ArrayView<const char> array) { Writer::writeArray(Containers::ArrayView<const char> array) {
if(array.isEmpty()) { if(array.isEmpty()) {
return false; return false;
} }
@ -136,7 +136,7 @@ BinaryWriter::writeArray(Containers::ArrayView<const char> array) {
} }
bool bool
BinaryWriter::writeUEString(Containers::StringView str) { Writer::writeUEString(Containers::StringView str) {
if(str.size() > UINT32_MAX) { if(str.size() > UINT32_MAX) {
LOG_ERROR_FORMAT("String is too big. Expected size() < UINT32_MAX, got {} instead.", str.size()); LOG_ERROR_FORMAT("String is too big. Expected size() < UINT32_MAX, got {} instead.", str.size());
return false; return false;
@ -154,7 +154,7 @@ BinaryWriter::writeUEString(Containers::StringView str) {
} }
std::size_t std::size_t
BinaryWriter::writeUEStringToArray(Containers::StringView value) { Writer::writeUEStringToArray(Containers::StringView value) {
return writeValueToArray<std::uint32_t>(std::uint32_t(value.size()) + 1u) + return writeValueToArray<std::uint32_t>(std::uint32_t(value.size()) + 1u) +
writeDataToArray(Containers::ArrayView<const char>{value}) + writeDataToArray(Containers::ArrayView<const char>{value}) +
writeValueToArray<char>('\0'); writeValueToArray<char>('\0');

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -26,18 +26,18 @@
using namespace Corrade; using namespace Corrade;
namespace Gvas { namespace BinaryIo {
class BinaryWriter { class Writer {
public: public:
explicit BinaryWriter(Containers::StringView filename); explicit Writer(Containers::StringView filename);
~BinaryWriter(); ~Writer();
BinaryWriter(const BinaryWriter& other) = delete; Writer(const Writer& other) = delete;
BinaryWriter& operator=(const BinaryWriter& other) = delete; Writer& operator=(const Writer& other) = delete;
BinaryWriter(BinaryWriter&& other) = default; Writer(Writer&& other) = default;
BinaryWriter& operator=(BinaryWriter&& other) = default; Writer& operator=(Writer&& other) = default;
bool open(); bool open();

View File

@ -1,5 +1,5 @@
# MassBuilderSaveTool # MassBuilderSaveTool
# Copyright (C) 2021-2023 Guillaume Jacquemin # Copyright (C) 2021-2024 Guillaume Jacquemin
# #
# This program is free software: you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -36,8 +36,97 @@ set_directory_properties(PROPERTIES CORRADE_USE_PEDANTIC_FLAGS ON)
corrade_add_resource(Assets assets.conf) corrade_add_resource(Assets assets.conf)
add_subdirectory(Logger EXCLUDE_FROM_ALL) set(Logger_SOURCES
add_subdirectory(Gvas EXCLUDE_FROM_ALL) Logger/Logger.h
Logger/Logger.cpp
Logger/EntryType.h
Logger/MagnumLogBuffer.h
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
Gvas/Serialisers/AbstractUnrealProperty.h
Gvas/Serialisers/AbstractUnrealStruct.h
Gvas/Serialisers/ArrayProperty.h
Gvas/Serialisers/ArrayProperty.cpp
Gvas/Serialisers/BoolProperty.h
Gvas/Serialisers/BoolProperty.cpp
Gvas/Serialisers/ByteProperty.h
Gvas/Serialisers/ByteProperty.cpp
Gvas/Serialisers/ColourProperty.h
Gvas/Serialisers/ColourProperty.cpp
Gvas/Serialisers/DateTimeProperty.h
Gvas/Serialisers/DateTimeProperty.cpp
Gvas/Serialisers/EnumProperty.h
Gvas/Serialisers/EnumProperty.cpp
Gvas/Serialisers/FloatProperty.h
Gvas/Serialisers/FloatProperty.cpp
Gvas/Serialisers/GuidProperty.h
Gvas/Serialisers/GuidProperty.cpp
Gvas/Serialisers/IntProperty.h
Gvas/Serialisers/IntProperty.cpp
Gvas/Serialisers/MapProperty.h
Gvas/Serialisers/MapProperty.cpp
Gvas/Serialisers/ResourceProperty.h
Gvas/Serialisers/ResourceProperty.cpp
Gvas/Serialisers/RotatorProperty.h
Gvas/Serialisers/RotatorProperty.cpp
Gvas/Serialisers/StringProperty.h
Gvas/Serialisers/StringProperty.cpp
Gvas/Serialisers/SetProperty.h
Gvas/Serialisers/SetProperty.cpp
Gvas/Serialisers/Struct.h
Gvas/Serialisers/Struct.cpp
Gvas/Serialisers/TextProperty.h
Gvas/Serialisers/TextProperty.cpp
Gvas/Serialisers/UnrealProperty.h
Gvas/Serialisers/VectorProperty.h
Gvas/Serialisers/VectorProperty.cpp
Gvas/Serialisers/Vector2DProperty.h
Gvas/Serialisers/Vector2DProperty.cpp
Gvas/Types/Types.h
Gvas/Types/ArrayProperty.h
Gvas/Types/BoolProperty.h
Gvas/Types/ByteProperty.h
Gvas/Types/ColourStructProperty.h
Gvas/Types/DateTimeStructProperty.h
Gvas/Types/EnumProperty.h
Gvas/Types/FloatProperty.h
Gvas/Types/GenericStructProperty.h
Gvas/Types/GuidStructProperty.h
Gvas/Types/IntProperty.h
Gvas/Types/MapProperty.h
Gvas/Types/NoneProperty.h
Gvas/Types/RotatorStructProperty.h
Gvas/Types/SetProperty.h
Gvas/Types/StringProperty.h
Gvas/Types/StructProperty.h
Gvas/Types/ResourceItemValue.h
Gvas/Types/TextProperty.h
Gvas/Types/UnrealProperty.h
Gvas/Types/UnrealPropertyBase.h
Gvas/Types/Vector2DStructProperty.h
Gvas/Types/VectorStructProperty.h
Gvas/Gvas.h
Gvas/Debug.h
Gvas/Debug.cpp
Gvas/File.h
Gvas/File.cpp
Gvas/PropertySerialiser.h
Gvas/PropertySerialiser.cpp
)
if(CORRADE_TARGET_WINDOWS) if(CORRADE_TARGET_WINDOWS)
set(SAVETOOL_RC_FILE resource.rc) set(SAVETOOL_RC_FILE resource.rc)
@ -107,6 +196,9 @@ add_executable(MassBuilderSaveTool
Version/Version.cpp Version/Version.cpp
FontAwesome/IconsFontAwesome5.h FontAwesome/IconsFontAwesome5.h
FontAwesome/IconsFontAwesome5Brands.h FontAwesome/IconsFontAwesome5Brands.h
${Logger_SOURCES}
${BinaryIo_SOURCES}
${Gvas_SOURCES}
${SAVETOOL_RC_FILE} ${SAVETOOL_RC_FILE}
${Assets} ${Assets}
) )
@ -115,10 +207,6 @@ if(CORRADE_TARGET_WINDOWS)
set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE $<CONFIG:Release>) set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE $<CONFIG:Release>)
endif() endif()
if(CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions(Logger PRIVATE SAVETOOL_DEBUG_BUILD)
target_compile_definitions(MassBuilderSaveTool PRIVATE SAVETOOL_DEBUG_BUILD)
endif()
target_compile_definitions(MassBuilderSaveTool PRIVATE target_compile_definitions(MassBuilderSaveTool PRIVATE
SAVETOOL_VERSION_STRING="${SAVETOOL_PROJECT_VERSION}" SAVETOOL_VERSION_STRING="${SAVETOOL_PROJECT_VERSION}"
SAVETOOL_VERSION_MAJOR=1 SAVETOOL_VERSION_MAJOR=1
@ -146,8 +234,6 @@ target_link_libraries(MassBuilderSaveTool PRIVATE
Magnum::GL Magnum::GL
Magnum::Sdl2Application Magnum::Sdl2Application
MagnumIntegration::ImGui MagnumIntegration::ImGui
Logger
Gvas
CURL::libcurl_static CURL::libcurl_static
) )

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,102 +0,0 @@
# MassBuilderSaveTool
# Copyright (C) 2021-2023 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 <https://www.gnu.org/licenses/>.
add_library(Gvas STATIC EXCLUDE_FROM_ALL
Serialisers/Serialisers.h
Serialisers/AbstractUnrealCollectionProperty.h
Serialisers/AbstractUnrealProperty.h
Serialisers/AbstractUnrealStruct.h
Serialisers/ArrayProperty.h
Serialisers/ArrayProperty.cpp
Serialisers/BoolProperty.h
Serialisers/BoolProperty.cpp
Serialisers/ByteProperty.h
Serialisers/ByteProperty.cpp
Serialisers/ColourProperty.h
Serialisers/ColourProperty.cpp
Serialisers/DateTimeProperty.h
Serialisers/DateTimeProperty.cpp
Serialisers/EnumProperty.h
Serialisers/EnumProperty.cpp
Serialisers/FloatProperty.h
Serialisers/FloatProperty.cpp
Serialisers/GuidProperty.h
Serialisers/GuidProperty.cpp
Serialisers/IntProperty.h
Serialisers/IntProperty.cpp
Serialisers/MapProperty.h
Serialisers/MapProperty.cpp
Serialisers/ResourceProperty.h
Serialisers/ResourceProperty.cpp
Serialisers/RotatorProperty.h
Serialisers/RotatorProperty.cpp
Serialisers/StringProperty.h
Serialisers/StringProperty.cpp
Serialisers/SetProperty.h
Serialisers/SetProperty.cpp
Serialisers/Struct.h
Serialisers/Struct.cpp
Serialisers/TextProperty.h
Serialisers/TextProperty.cpp
Serialisers/UnrealProperty.h
Serialisers/VectorProperty.h
Serialisers/VectorProperty.cpp
Serialisers/Vector2DProperty.h
Serialisers/Vector2DProperty.cpp
Types/Types.h
Types/ArrayProperty.h
Types/BoolProperty.h
Types/ByteProperty.h
Types/ColourStructProperty.h
Types/DateTimeStructProperty.h
Types/EnumProperty.h
Types/FloatProperty.h
Types/GenericStructProperty.h
Types/GuidStructProperty.h
Types/IntProperty.h
Types/MapProperty.h
Types/NoneProperty.h
Types/RotatorStructProperty.h
Types/SetProperty.h
Types/StringProperty.h
Types/StructProperty.h
Types/ResourceItemValue.h
Types/TextProperty.h
Types/UnrealProperty.h
Types/UnrealPropertyBase.h
Types/Vector2DStructProperty.h
Types/VectorStructProperty.h
Gvas.h
Debug.h
Debug.cpp
File.h
File.cpp
BinaryReader.h
BinaryReader.cpp
BinaryWriter.h
BinaryWriter.cpp
PropertySerialiser.h
PropertySerialiser.cpp
)
target_link_libraries(Gvas PRIVATE
Corrade::Containers
Corrade::Utility
Magnum::Magnum
Logger
)

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -19,8 +19,8 @@
#include "../Logger/Logger.h" #include "../Logger/Logger.h"
#include "BinaryReader.h" #include "../BinaryIo/Reader.h"
#include "BinaryWriter.h" #include "../BinaryIo/Writer.h"
#include "File.h" #include "File.h"
@ -87,7 +87,7 @@ File::saveToFile() {
return false; return false;
} }
BinaryWriter writer{_filepath + ".tmp"_s}; BinaryIo::Writer writer{_filepath + ".tmp"_s};
if(!writer.open()) { if(!writer.open()) {
_lastError = "Couldn't open the file for saving."_s; _lastError = "Couldn't open the file for saving."_s;
@ -175,7 +175,7 @@ File::loadData() {
return; return;
} }
BinaryReader reader{_filepath}; BinaryIo::Reader reader{_filepath};
if(!reader.open()) { if(!reader.open()) {
_lastError = _filepath + " couldn't be opened."_s; _lastError = _filepath + " couldn't be opened."_s;
@ -227,9 +227,7 @@ File::loadData() {
_customFormatData = Containers::Array<CustomFormatDataEntry>{custom_format_data_size}; _customFormatData = Containers::Array<CustomFormatDataEntry>{custom_format_data_size};
for(std::uint32_t i = 0; i < custom_format_data_size; i++) { for(auto& entry : _customFormatData) {
CustomFormatDataEntry entry;
if(!reader.readStaticArray(entry.id) || if(!reader.readStaticArray(entry.id) ||
!reader.readInt32(entry.value)) !reader.readInt32(entry.value))
{ {
@ -237,8 +235,6 @@ File::loadData() {
LOG_ERROR(_lastError); LOG_ERROR(_lastError);
return; return;
} }
_customFormatData[i] = std::move(entry);
} }
if(!reader.readUEString(_saveType)) { if(!reader.readUEString(_saveType)) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -18,8 +18,6 @@
namespace Gvas { namespace Gvas {
class BinaryReader;
class BinaryWriter;
class File; class File;
class PropertySerialiser; class PropertySerialiser;

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -39,8 +39,8 @@
#include "Types/NoneProperty.h" #include "Types/NoneProperty.h"
#include "BinaryReader.h" #include "../BinaryIo/Reader.h"
#include "BinaryWriter.h" #include "../BinaryIo/Writer.h"
#include "PropertySerialiser.h" #include "PropertySerialiser.h"
@ -76,7 +76,7 @@ PropertySerialiser::instance() {
} }
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
PropertySerialiser::read(BinaryReader& reader) { PropertySerialiser::read(BinaryIo::Reader& reader) {
if(reader.peekChar() < 0 || reader.eof()) { if(reader.peekChar() < 0 || reader.eof()) {
return nullptr; return nullptr;
} }
@ -104,7 +104,7 @@ PropertySerialiser::read(BinaryReader& reader) {
} }
Types::UnrealPropertyBase::ptr 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) Containers::String name)
{ {
if(reader.peekChar() < 0 || reader.eof()) { if(reader.peekChar() < 0 || reader.eof()) {
@ -115,7 +115,7 @@ PropertySerialiser::readItem(BinaryReader& reader, Containers::String type, std:
} }
Containers::Array<Types::UnrealPropertyBase::ptr> Containers::Array<Types::UnrealPropertyBase::ptr>
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()) { if(reader.peekChar() < 0 || reader.eof()) {
return nullptr; return nullptr;
} }
@ -160,7 +160,7 @@ PropertySerialiser::readSet(BinaryReader& reader, Containers::StringView item_ty
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
PropertySerialiser::deserialise(Containers::String name, Containers::String type, std::size_t value_length, PropertySerialiser::deserialise(Containers::String name, Containers::String type, std::size_t value_length,
BinaryReader& reader) BinaryIo::Reader& reader)
{ {
Types::UnrealPropertyBase::ptr prop; Types::UnrealPropertyBase::ptr prop;
auto serialiser = getSerialiser(type); 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, 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); auto serialiser = getSerialiser(item_type);
if(!serialiser) { if(!serialiser) {
@ -193,7 +193,7 @@ bool PropertySerialiser::serialise(Types::UnrealPropertyBase::ptr& prop, Contain
} }
bool 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<Types::NoneProperty*>(prop.get())) { if(prop->name == "None" && prop->propertyType == "NoneProperty" && dynamic_cast<Types::NoneProperty*>(prop.get())) {
bytes_written += writer.writeUEStringToArray(*prop->name); bytes_written += writer.writeUEStringToArray(*prop->name);
return true; return true;
@ -218,7 +218,7 @@ PropertySerialiser::write(Types::UnrealPropertyBase::ptr& prop, std::size_t& byt
bool bool
PropertySerialiser::writeItem(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type, 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<Types::NoneProperty*>(prop.get())) { if(prop->name == "None" && prop->propertyType == "NoneProperty" && dynamic_cast<Types::NoneProperty*>(prop.get())) {
bytes_written += writer.writeUEStringToArray(*prop->name); bytes_written += writer.writeUEStringToArray(*prop->name);
@ -229,7 +229,8 @@ PropertySerialiser::writeItem(Types::UnrealPropertyBase::ptr& prop, Containers::
} }
bool PropertySerialiser::writeSet(Containers::ArrayView<Types::UnrealPropertyBase::ptr> props, bool PropertySerialiser::writeSet(Containers::ArrayView<Types::UnrealPropertyBase::ptr> 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); auto serialiser = getCollectionSerialiser(item_type);
if(serialiser) { if(serialiser) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -25,7 +25,7 @@
#include "Types/UnrealPropertyBase.h" #include "Types/UnrealPropertyBase.h"
#include "Gvas.h" #include "../BinaryIo/BinaryIo.h"
using namespace Corrade; using namespace Corrade;
@ -35,21 +35,21 @@ class PropertySerialiser {
public: public:
static auto instance() -> PropertySerialiser&; static auto instance() -> PropertySerialiser&;
auto read(BinaryReader& reader) -> Types::UnrealPropertyBase::ptr; auto read(BinaryIo::Reader& reader) -> Types::UnrealPropertyBase::ptr;
auto readItem(BinaryReader& reader, Containers::String type, std::size_t value_length, Containers::String name) auto readItem(BinaryIo::Reader& reader, Containers::String type, std::size_t value_length, Containers::String name)
-> Types::UnrealPropertyBase::ptr; -> 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<Types::UnrealPropertyBase::ptr>; -> Containers::Array<Types::UnrealPropertyBase::ptr>;
auto deserialise(Containers::String name, Containers::String type, std::size_t value_length, 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, bool serialise(Types::UnrealPropertyBase::ptr& prop, Containers::StringView item_type,
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, BinaryWriter& 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, 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<Types::UnrealPropertyBase::ptr> props, Containers::StringView item_type, bool writeSet(Containers::ArrayView<Types::UnrealPropertyBase::ptr> props, Containers::StringView item_type,
std::size_t& bytes_written, BinaryWriter& writer); std::size_t& bytes_written, BinaryIo::Writer& writer);
private: private:
PropertySerialiser(); PropertySerialiser();

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -22,6 +22,7 @@
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include "../Gvas.h" #include "../Gvas.h"
#include "../../BinaryIo/BinaryIo.h"
#include "../Types/UnrealPropertyBase.h" #include "../Types/UnrealPropertyBase.h"
using namespace Corrade; using namespace Corrade;
@ -41,11 +42,12 @@ class AbstractUnrealCollectionProperty {
virtual auto types() -> StringArrayView = 0; virtual auto types() -> StringArrayView = 0;
virtual auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> PropertyArray = 0;
virtual bool serialise(PropertyArrayView props, Containers::StringView item_type, 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;
}; };
}} }}

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -21,11 +21,11 @@
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include "../Gvas.h" #include "../Gvas.h"
#include "../../BinaryIo/BinaryIo.h"
#include "../Types/UnrealPropertyBase.h" #include "../Types/UnrealPropertyBase.h"
using namespace Corrade; using namespace Corrade;
namespace Gvas { namespace Serialisers { namespace Gvas { namespace Serialisers {
using StringArrayView = Containers::ArrayView<const Containers::String>; using StringArrayView = Containers::ArrayView<const Containers::String>;
@ -39,11 +39,11 @@ class AbstractUnrealProperty {
virtual auto types() -> StringArrayView = 0; virtual auto types() -> StringArrayView = 0;
virtual auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr = 0;
virtual bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, virtual bool serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) = 0; BinaryIo::Writer& writer, PropertySerialiser& serialiser) = 0;
}; };
}} }}

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -22,6 +22,7 @@
#include <Corrade/Containers/StringView.h> #include <Corrade/Containers/StringView.h>
#include "../Gvas.h" #include "../Gvas.h"
#include "../../BinaryIo/BinaryIo.h"
#include "../Types/UnrealPropertyBase.h" #include "../Types/UnrealPropertyBase.h"
using namespace Corrade; using namespace Corrade;
@ -36,9 +37,9 @@ class AbstractUnrealStruct {
virtual bool supportsType(Containers::StringView type) = 0; 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; std::size_t& bytes_written) = 0;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -16,8 +16,8 @@
#include <Corrade/Containers/String.h> #include <Corrade/Containers/String.h>
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../PropertySerialiser.h" #include "../PropertySerialiser.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
@ -27,7 +27,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
ArrayProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; Containers::String item_type;
if(!reader.readUEString(item_type)) { if(!reader.readUEString(item_type)) {
@ -55,8 +55,8 @@ ArrayProperty::deserialiseProperty(Containers::StringView name, Containers::Stri
} }
bool bool
ArrayProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, ArrayProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto array_prop = dynamic_cast<Types::ArrayProperty*>(prop.get()); auto array_prop = dynamic_cast<Types::ArrayProperty*>(prop.get());
if(!array_prop) { if(!array_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class ArrayProperty : public UnrealProperty<Types::ArrayProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "BoolProperty.h" #include "BoolProperty.h"
@ -31,7 +31,7 @@ BoolProperty::types() {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
BoolProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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) { if(value_length != 0) {
LOG_ERROR_FORMAT("Invalid value length for bool property {}. Expected 0, got {} instead.", name, value_length); 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 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) PropertySerialiser& serialiser)
{ {
auto bool_prop = dynamic_cast<Types::BoolProperty*>(prop.get()); auto bool_prop = dynamic_cast<Types::BoolProperty*>(prop.get());

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -34,10 +34,10 @@ class BoolProperty : public AbstractUnrealProperty {
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> 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; PropertySerialiser& serialiser) override;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "ByteProperty.h" #include "ByteProperty.h"
@ -31,7 +31,7 @@ ByteProperty::types() {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
ByteProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::ByteProperty>(); auto prop = Containers::pointer<Types::ByteProperty>();
@ -68,7 +68,7 @@ ByteProperty::deserialise(Containers::StringView name, Containers::StringView ty
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto byte_prop = dynamic_cast<Types::ByteProperty*>(prop.get()); auto byte_prop = dynamic_cast<Types::ByteProperty*>(prop.get());

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class ByteProperty : public AbstractUnrealProperty {
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> 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; PropertySerialiser& serialiser) override;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "ColourProperty.h" #include "ColourProperty.h"
@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
ColourProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::ColourStructProperty>(); auto prop = Containers::pointer<Types::ColourStructProperty>();
@ -40,7 +40,7 @@ ColourProperty::deserialiseProperty(Containers::StringView name, Containers::Str
bool bool
ColourProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, 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<Types::ColourStructProperty*>(prop.get()); auto colour_prop = dynamic_cast<Types::ColourStructProperty*>(prop.get());
if(!colour_prop) { if(!colour_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class ColourProperty : public UnrealProperty<Types::ColourStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "DateTimeProperty.h" #include "DateTimeProperty.h"
@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
DateTimeProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, 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<Types::DateTimeStructProperty>(); auto prop = Containers::pointer<Types::DateTimeStructProperty>();
@ -38,7 +38,7 @@ DateTimeProperty::deserialiseProperty(Containers::StringView name, Containers::S
bool bool
DateTimeProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, 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<Types::DateTimeStructProperty*>(prop.get()); auto dt_prop = dynamic_cast<Types::DateTimeStructProperty*>(prop.get());
if(!dt_prop) { if(!dt_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class DateTimeProperty : public UnrealProperty<Types::DateTimeStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "EnumProperty.h" #include "EnumProperty.h"
@ -31,7 +31,7 @@ EnumProperty::types() {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
EnumProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::EnumProperty>(); auto prop = Containers::pointer<Types::EnumProperty>();
@ -55,7 +55,7 @@ EnumProperty::deserialise(Containers::StringView name, Containers::StringView ty
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto enum_prop = dynamic_cast<Types::EnumProperty*>(prop.get()); auto enum_prop = dynamic_cast<Types::EnumProperty*>(prop.get());

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class EnumProperty : public AbstractUnrealProperty {
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> 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; PropertySerialiser& serialiser) override;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "FloatProperty.h" #include "FloatProperty.h"
@ -31,7 +31,7 @@ FloatProperty::types() {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
FloatProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::FloatProperty>(); auto prop = Containers::pointer<Types::FloatProperty>();
@ -50,7 +50,7 @@ FloatProperty::deserialise(Containers::StringView name, Containers::StringView t
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto float_prop = dynamic_cast<Types::FloatProperty*>(prop.get()); auto float_prop = dynamic_cast<Types::FloatProperty*>(prop.get());

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class FloatProperty : public AbstractUnrealProperty {
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> 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; PropertySerialiser& serialiser) override;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "GuidProperty.h" #include "GuidProperty.h"
@ -26,7 +26,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
GuidProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::GuidStructProperty>(); auto prop = Containers::pointer<Types::GuidStructProperty>();
@ -39,8 +39,8 @@ GuidProperty::deserialiseProperty(Containers::StringView name, Containers::Strin
} }
bool bool
GuidProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, GuidProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto guid_prop = dynamic_cast<Types::GuidStructProperty*>(prop.get()); auto guid_prop = dynamic_cast<Types::GuidStructProperty*>(prop.get());
if(!guid_prop) { if(!guid_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class GuidProperty : public UnrealProperty<Types::GuidStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "IntProperty.h" #include "IntProperty.h"
@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
IntProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::IntProperty>(); auto prop = Containers::pointer<Types::IntProperty>();
@ -55,8 +55,8 @@ IntProperty::deserialiseProperty(Containers::StringView name, Containers::String
} }
bool bool
IntProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, IntProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto int_prop = dynamic_cast<Types::IntProperty*>(prop.get()); auto int_prop = dynamic_cast<Types::IntProperty*>(prop.get());
if(!int_prop) { if(!int_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class IntProperty : public UnrealProperty<Types::IntProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../PropertySerialiser.h" #include "../PropertySerialiser.h"
#include "../Types/NoneProperty.h" #include "../Types/NoneProperty.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
@ -28,7 +28,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
MapProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::MapProperty>(); auto prop = Containers::pointer<Types::MapProperty>();
@ -110,8 +110,8 @@ MapProperty::deserialiseProperty(Containers::StringView name, Containers::String
} }
bool bool
MapProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, MapProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto map_prop = dynamic_cast<Types::MapProperty*>(prop.get()); auto map_prop = dynamic_cast<Types::MapProperty*>(prop.get());
if(!map_prop) { if(!map_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class MapProperty : public UnrealProperty<Types::MapProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../PropertySerialiser.h" #include "../PropertySerialiser.h"
#include "../Types/IntProperty.h" #include "../Types/IntProperty.h"
#include "../Types/NoneProperty.h" #include "../Types/NoneProperty.h"
@ -29,7 +29,8 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
ResourceProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, 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<Types::ResourceItemValue>(); auto prop = Containers::pointer<Types::ResourceItemValue>();
@ -81,7 +82,7 @@ ResourceProperty::deserialiseProperty(Containers::StringView name, Containers::S
bool bool
ResourceProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, 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<Types::ResourceItemValue*>(prop.get()); auto res_prop = dynamic_cast<Types::ResourceItemValue*>(prop.get());
if(!res_prop) { if(!res_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class ResourceProperty : public UnrealProperty<Types::ResourceItemValue> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "RotatorProperty.h" #include "RotatorProperty.h"
@ -24,7 +24,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
RotatorProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::RotatorStructProperty>(); auto prop = Containers::pointer<Types::RotatorStructProperty>();
@ -38,7 +38,7 @@ RotatorProperty::deserialiseProperty(Containers::StringView name, Containers::St
bool bool
RotatorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, RotatorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
BinaryWriter& writer, PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto rotator = dynamic_cast<Types::RotatorStructProperty*>(prop.get()); auto rotator = dynamic_cast<Types::RotatorStructProperty*>(prop.get());
if(!rotator) { if(!rotator) {
@ -46,7 +46,8 @@ RotatorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::si
return false; return false;
} }
bytes_written += writer.writeValueToArray<float>(rotator->x) + writer.writeValueToArray<float>(rotator->y) + bytes_written += writer.writeValueToArray<float>(rotator->x) +
writer.writeValueToArray<float>(rotator->y) +
writer.writeValueToArray<float>(rotator->z); writer.writeValueToArray<float>(rotator->z);
return true; return true;

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class RotatorProperty : public UnrealProperty<Types::RotatorStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../PropertySerialiser.h" #include "../PropertySerialiser.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
@ -25,7 +25,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
SetProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; Containers::String item_type;
if(!reader.readUEString(item_type)) { if(!reader.readUEString(item_type)) {
@ -59,8 +59,8 @@ SetProperty::deserialiseProperty(Containers::StringView name, Containers::String
} }
bool bool
SetProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, SetProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto set_prop = dynamic_cast<Types::SetProperty*>(prop.get()); auto set_prop = dynamic_cast<Types::SetProperty*>(prop.get());
if(!set_prop) { if(!set_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class SetProperty : public UnrealProperty<Types::SetProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "StringProperty.h" #include "StringProperty.h"
@ -33,7 +33,7 @@ StringProperty::types() {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
StringProperty::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::StringProperty>(type); auto prop = Containers::pointer<Types::StringProperty>(type);
@ -56,7 +56,7 @@ StringProperty::deserialise(Containers::StringView name, Containers::StringView
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto str_prop = dynamic_cast<Types::StringProperty*>(prop.get()); auto str_prop = dynamic_cast<Types::StringProperty*>(prop.get());

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -32,10 +32,10 @@ class StringProperty : public AbstractUnrealProperty {
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> 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; PropertySerialiser& serialiser) override;
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -16,8 +16,8 @@
#include <Corrade/Containers/String.h> #include <Corrade/Containers/String.h>
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../PropertySerialiser.h" #include "../PropertySerialiser.h"
#include "../Types/GenericStructProperty.h" #include "../Types/GenericStructProperty.h"
#include "../Types/NoneProperty.h" #include "../Types/NoneProperty.h"
@ -36,7 +36,7 @@ Struct::types() {
PropertyArray PropertyArray
Struct::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; Containers::String item_type;
if(!reader.readUEString(item_type)) { if(!reader.readUEString(item_type)) {
@ -89,7 +89,7 @@ Struct::deserialise(Containers::StringView name, Containers::StringView type, st
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
Struct::deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; Containers::String item_type;
if(!reader.readUEString(item_type)) { if(!reader.readUEString(item_type)) {
@ -127,7 +127,7 @@ Struct::deserialise(Containers::StringView name, Containers::StringView type, st
bool bool
Struct::serialise(PropertyArrayView props, Containers::StringView item_type, std::size_t& bytes_written, 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(*(props.front()->name));
bytes_written += writer.writeUEStringToArray(item_type); bytes_written += writer.writeUEStringToArray(item_type);
@ -170,7 +170,7 @@ Struct::serialise(PropertyArrayView props, Containers::StringView item_type, std
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto struct_prop = dynamic_cast<Types::StructProperty*>(prop.get()); auto struct_prop = dynamic_cast<Types::StructProperty*>(prop.get());
@ -198,7 +198,7 @@ Struct::serialise(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_writt
Types::StructProperty::ptr Types::StructProperty::ptr
Struct::readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length, Struct::readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length,
BinaryReader& reader, PropertySerialiser& serialiser) BinaryIo::Reader& reader, PropertySerialiser& serialiser)
{ {
static_cast<void>(value_length); static_cast<void>(value_length);
@ -223,7 +223,7 @@ Struct::readStructValue(Containers::StringView name, Containers::StringView type
} }
bool 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) PropertySerialiser& serialiser)
{ {
auto struct_prop = dynamic_cast<Types::GenericStructProperty*>(prop); auto struct_prop = dynamic_cast<Types::GenericStructProperty*>(prop);

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -34,21 +34,21 @@ class Struct : public AbstractUnrealProperty, public AbstractUnrealCollectionPro
auto types() -> StringArrayView override; auto types() -> StringArrayView override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> PropertyArray override;
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialise(PropertyArrayView props, Containers::StringView item_type, std::size_t& bytes_written, bool serialise(PropertyArrayView props, Containers::StringView item_type, std::size_t& bytes_written,
BinaryWriter& writer, PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) 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; PropertySerialiser& serialiser) override;
private: private:
auto readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length, auto readStructValue(Containers::StringView name, Containers::StringView type, std::size_t value_length,
BinaryReader& reader, PropertySerialiser& serialiser) -> Types::StructProperty::ptr; BinaryIo::Reader& reader, PropertySerialiser& serialiser) -> Types::StructProperty::ptr;
bool writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryWriter& writer, bool writeStructValue(Types::StructProperty* prop, std::size_t& bytes_written, BinaryIo::Writer& writer,
PropertySerialiser& serialiser); PropertySerialiser& serialiser);
}; };

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -18,8 +18,8 @@
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "TextProperty.h" #include "TextProperty.h"
@ -27,7 +27,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
TextProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::TextProperty>(); auto prop = Containers::pointer<Types::TextProperty>();
@ -73,8 +73,8 @@ TextProperty::deserialiseProperty(Containers::StringView name, Containers::Strin
} }
bool bool
TextProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, TextProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto text_prop = dynamic_cast<Types::TextProperty*>(prop.get()); auto text_prop = dynamic_cast<Types::TextProperty*>(prop.get());
if(!text_prop) { if(!text_prop) {

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class TextProperty : public UnrealProperty<Types::TextProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -52,13 +52,13 @@ class UnrealProperty : public AbstractUnrealProperty {
} }
auto deserialise(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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 -> Types::UnrealPropertyBase::ptr override
{ {
return deserialiseProperty(name, type, value_length, reader, serialiser); 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 PropertySerialiser& serialiser) override
{ {
return serialiseProperty(prop, bytes_written, writer, serialiser); return serialiseProperty(prop, bytes_written, writer, serialiser);
@ -66,11 +66,11 @@ class UnrealProperty : public AbstractUnrealProperty {
private: private:
virtual auto deserialiseProperty(Containers::StringView name, Containers::StringView type, virtual auto deserialiseProperty(Containers::StringView name, Containers::StringView type,
std::size_t value_length, BinaryReader& reader, PropertySerialiser& serialiser) std::size_t value_length, BinaryIo::Reader& reader,
-> Types::UnrealPropertyBase::ptr = 0; PropertySerialiser& serialiser) -> Types::UnrealPropertyBase::ptr = 0;
virtual bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, virtual bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
BinaryWriter& writer, PropertySerialiser& serialiser) = 0; BinaryIo::Writer& writer, PropertySerialiser& serialiser) = 0;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -14,8 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>. // along with this program. If not, see <https://www.gnu.org/licenses/>.
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "Vector2DProperty.h" #include "Vector2DProperty.h"
@ -24,7 +24,8 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
Vector2DProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, 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<Types::Vector2DStructProperty>(); auto prop = Containers::pointer<Types::Vector2DStructProperty>();
@ -38,7 +39,7 @@ Vector2DProperty::deserialiseProperty(Containers::StringView name, Containers::S
bool bool
Vector2DProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, Vector2DProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
BinaryWriter& writer, PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto vector = dynamic_cast<Types::Vector2DStructProperty*>(prop.get()); auto vector = dynamic_cast<Types::Vector2DStructProperty*>(prop.get());
if(!vector) { if(!vector) {
@ -46,7 +47,8 @@ Vector2DProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::s
return false; return false;
} }
bytes_written += writer.writeValueToArray<float>(vector->x) + writer.writeValueToArray<float>(vector->y); bytes_written += writer.writeValueToArray<float>(vector->x) +
writer.writeValueToArray<float>(vector->y);
return true; return true;
} }

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class Vector2DProperty : public UnrealProperty<Types::Vector2DStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -16,8 +16,8 @@
#include "../../Logger/Logger.h" #include "../../Logger/Logger.h"
#include "../BinaryReader.h" #include "../../BinaryIo/Reader.h"
#include "../BinaryWriter.h" #include "../../BinaryIo/Writer.h"
#include "VectorProperty.h" #include "VectorProperty.h"
@ -25,7 +25,7 @@ namespace Gvas { namespace Serialisers {
Types::UnrealPropertyBase::ptr Types::UnrealPropertyBase::ptr
VectorProperty::deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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<Types::VectorStructProperty>(); auto prop = Containers::pointer<Types::VectorStructProperty>();
@ -39,7 +39,7 @@ VectorProperty::deserialiseProperty(Containers::StringView name, Containers::Str
bool bool
VectorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, VectorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
BinaryWriter& writer, PropertySerialiser& serialiser) BinaryIo::Writer& writer, PropertySerialiser& serialiser)
{ {
auto vector = dynamic_cast<Types::VectorStructProperty*>(prop.get()); auto vector = dynamic_cast<Types::VectorStructProperty*>(prop.get());
if(!vector) { if(!vector) {
@ -47,7 +47,8 @@ VectorProperty::serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::siz
return false; return false;
} }
bytes_written += writer.writeValueToArray<float>(vector->x) + writer.writeValueToArray<float>(vector->y) + bytes_written += writer.writeValueToArray<float>(vector->x) +
writer.writeValueToArray<float>(vector->y) +
writer.writeValueToArray<float>(vector->z); writer.writeValueToArray<float>(vector->z);
return true; return true;

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by
@ -30,10 +30,10 @@ class VectorProperty : public UnrealProperty<Types::VectorStructProperty> {
private: private:
auto deserialiseProperty(Containers::StringView name, Containers::StringView type, std::size_t value_length, 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; -> Types::UnrealPropertyBase::ptr override;
bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written, BinaryWriter& writer, bool serialiseProperty(Types::UnrealPropertyBase::ptr& prop, std::size_t& bytes_written,
PropertySerialiser& serialiser) override; BinaryIo::Writer& writer, PropertySerialiser& serialiser) override;
}; };
}} }}

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,28 +0,0 @@
# MassBuilderSaveTool
# Copyright (C) 2021-2023 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 <https://www.gnu.org/licenses/>.
add_library(Logger STATIC EXCLUDE_FROM_ALL
Logger.h
Logger.cpp
EntryType.h
MagnumLogBuffer.h
MagnumLogBuffer.cpp
)
target_link_libraries(Logger PRIVATE
Corrade::Utility
Magnum::Magnum
)

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,5 @@
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
// MassBuilderSaveTool // MassBuilderSaveTool
// Copyright (C) 2021-2023 Guillaume Jacquemin // Copyright (C) 2021-2024 Guillaume Jacquemin
// //
// This program is free software: you can redistribute it and/or modify // 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 // it under the terms of the GNU General Public License as published by

Some files were not shown because too many files have changed in this diff Show More