AssetTypeID;No circular Dependency;AssetHeader
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m17s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 27s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 26s
Bigfoot / Clang Format Checks (push) Failing after 11s
Some checks failed
Bigfoot / Build & Test Debug (Unity Build: OFF) (push) Successful in 2m17s
Bigfoot / Build & Test Debug (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: OFF) (push) Successful in 25s
Bigfoot / Build & Test RelWithDebInfo (Unity Build: ON) (push) Successful in 26s
Bigfoot / Build & Test Release (Unity Build: OFF) (push) Successful in 27s
Bigfoot / Build & Test Release (Unity Build: ON) (push) Successful in 26s
Bigfoot / Clang Format Checks (push) Failing after 11s
This commit is contained in:
@@ -1,22 +1,22 @@
|
|||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* \file FlatTime.cpp
|
* \file AssetTypeID.cpp
|
||||||
*
|
*
|
||||||
* \author Romain BOULLARD
|
* \author Romain BOULLARD
|
||||||
* \date February 2026
|
* \date February 2026
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#include <System/Time/FlatTime.hpp>
|
#include <Engine/BigFile/Asset/AssetTypeID.hpp>
|
||||||
|
|
||||||
namespace flatbuffers
|
namespace flatbuffers
|
||||||
{
|
{
|
||||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time)
|
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID)
|
||||||
{
|
{
|
||||||
return Bigfoot::Flat::Time {p_time.Epoch()};
|
return Bigfoot::Flat::AssetTypeID {p_assetTypeID};
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
|
|
||||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime)
|
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID)
|
||||||
{
|
{
|
||||||
return Bigfoot::Time {p_flatTime.epoch()};
|
return Bigfoot::AssetTypeID {p_flatAssetTypeID.value()};
|
||||||
}
|
}
|
||||||
} // namespace flatbuffers
|
} // namespace flatbuffers
|
||||||
@@ -7,7 +7,6 @@ CREATE TABLE IF NOT EXISTS AssetHeader (
|
|||||||
Name TEXT NOT NULL UNIQUE,
|
Name TEXT NOT NULL UNIQUE,
|
||||||
TypeID INTEGER NOT NULL,
|
TypeID INTEGER NOT NULL,
|
||||||
TypeName TEXT NOT NULL,
|
TypeName TEXT NOT NULL,
|
||||||
Version INTEGER NOT NULL,
|
|
||||||
|
|
||||||
CreateTime INTEGER NOT NULL DEFAULT(CAST(unixepoch('subsec') AS INTEGER) * 1000000),
|
CreateTime INTEGER NOT NULL DEFAULT(CAST(unixepoch('subsec') AS INTEGER) * 1000000),
|
||||||
ModificationTime INTEGER NOT NULL DEFAULT(CAST(unixepoch('subsec') AS INTEGER) * 1000000),
|
ModificationTime INTEGER NOT NULL DEFAULT(CAST(unixepoch('subsec') AS INTEGER) * 1000000),
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
|
include "Engine/BigFile/Asset/AssetTypeID.fbs";
|
||||||
|
native_include "Engine/BigFile/Asset/AssetTypeID.hpp";
|
||||||
|
|
||||||
include "System/UUID/UUID.fbs";
|
include "System/UUID/UUID.fbs";
|
||||||
include "System/Time/Time.fbs";
|
native_include "System/UUID/UUID.hpp";
|
||||||
|
|
||||||
namespace Bigfoot.Flat;
|
namespace Bigfoot.Flat;
|
||||||
|
|
||||||
table AssetHeader
|
table AssetHeader
|
||||||
{
|
{
|
||||||
uuid: UUID (native_inline);
|
uuid: UUID (required, native_inline);
|
||||||
name: string;
|
name: string (required);
|
||||||
type_id: ulong;
|
type_id: AssetTypeID (required, native_inline);
|
||||||
type_name: string;
|
type_name: string (required);
|
||||||
version: uint;
|
version: uint;
|
||||||
|
|
||||||
create_time: Time (native_inline);
|
|
||||||
modification_time: Time (native_inline);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
root_type AssetHeader;
|
root_type AssetHeader;
|
||||||
@@ -13,9 +13,10 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
FLATBUFFERS_VERSION_REVISION == 19,
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
#include "System/UUID/FlatUUID.hpp"
|
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||||
#include "System/Time/FlatTime.hpp"
|
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||||
#include "System/Time/Time_generated.hpp"
|
#include "System/UUID/UUID.hpp"
|
||||||
|
#include "Engine/BigFile/Asset/AssetTypeID_generated.hpp"
|
||||||
#include "System/UUID/UUID_generated.hpp"
|
#include "System/UUID/UUID_generated.hpp"
|
||||||
|
|
||||||
#include "EASTL/unique_ptr.h"
|
#include "EASTL/unique_ptr.h"
|
||||||
@@ -37,11 +38,9 @@ struct AssetHeaderT : public ::flatbuffers::NativeTable {
|
|||||||
}
|
}
|
||||||
::Bigfoot::UUID uuid{};
|
::Bigfoot::UUID uuid{};
|
||||||
eastl::string name{};
|
eastl::string name{};
|
||||||
uint64_t type_id = 0;
|
::Bigfoot::AssetTypeID type_id{};
|
||||||
eastl::string type_name{};
|
eastl::string type_name{};
|
||||||
uint32_t version = 0;
|
uint32_t version = 0;
|
||||||
::Bigfoot::Time create_time{};
|
|
||||||
::Bigfoot::Time modification_time{};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||||
@@ -59,9 +58,7 @@ struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|||||||
VT_NAME = 6,
|
VT_NAME = 6,
|
||||||
VT_TYPE_ID = 8,
|
VT_TYPE_ID = 8,
|
||||||
VT_TYPE_NAME = 10,
|
VT_TYPE_NAME = 10,
|
||||||
VT_VERSION = 12,
|
VT_VERSION = 12
|
||||||
VT_CREATE_TIME = 14,
|
|
||||||
VT_MODIFICATION_TIME = 16
|
|
||||||
};
|
};
|
||||||
const Bigfoot::Flat::UUID *uuid() const {
|
const Bigfoot::Flat::UUID *uuid() const {
|
||||||
return GetStruct<const Bigfoot::Flat::UUID *>(VT_UUID);
|
return GetStruct<const Bigfoot::Flat::UUID *>(VT_UUID);
|
||||||
@@ -69,8 +66,8 @@ struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|||||||
const ::flatbuffers::String *name() const {
|
const ::flatbuffers::String *name() const {
|
||||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
||||||
}
|
}
|
||||||
uint64_t type_id() const {
|
const Bigfoot::Flat::AssetTypeID *type_id() const {
|
||||||
return GetField<uint64_t>(VT_TYPE_ID, 0);
|
return GetStruct<const Bigfoot::Flat::AssetTypeID *>(VT_TYPE_ID);
|
||||||
}
|
}
|
||||||
const ::flatbuffers::String *type_name() const {
|
const ::flatbuffers::String *type_name() const {
|
||||||
return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
|
return GetPointer<const ::flatbuffers::String *>(VT_TYPE_NAME);
|
||||||
@@ -78,24 +75,16 @@ struct AssetHeader FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|||||||
uint32_t version() const {
|
uint32_t version() const {
|
||||||
return GetField<uint32_t>(VT_VERSION, 0);
|
return GetField<uint32_t>(VT_VERSION, 0);
|
||||||
}
|
}
|
||||||
const Bigfoot::Flat::Time *create_time() const {
|
|
||||||
return GetStruct<const Bigfoot::Flat::Time *>(VT_CREATE_TIME);
|
|
||||||
}
|
|
||||||
const Bigfoot::Flat::Time *modification_time() const {
|
|
||||||
return GetStruct<const Bigfoot::Flat::Time *>(VT_MODIFICATION_TIME);
|
|
||||||
}
|
|
||||||
template <bool B = false>
|
template <bool B = false>
|
||||||
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
bool Verify(::flatbuffers::VerifierTemplate<B> &verifier) const {
|
||||||
return VerifyTableStart(verifier) &&
|
return VerifyTableStart(verifier) &&
|
||||||
VerifyField<Bigfoot::Flat::UUID>(verifier, VT_UUID, 1) &&
|
VerifyFieldRequired<Bigfoot::Flat::UUID>(verifier, VT_UUID, 1) &&
|
||||||
VerifyOffset(verifier, VT_NAME) &&
|
VerifyOffsetRequired(verifier, VT_NAME) &&
|
||||||
verifier.VerifyString(name()) &&
|
verifier.VerifyString(name()) &&
|
||||||
VerifyField<uint64_t>(verifier, VT_TYPE_ID, 8) &&
|
VerifyFieldRequired<Bigfoot::Flat::AssetTypeID>(verifier, VT_TYPE_ID, 8) &&
|
||||||
VerifyOffset(verifier, VT_TYPE_NAME) &&
|
VerifyOffsetRequired(verifier, VT_TYPE_NAME) &&
|
||||||
verifier.VerifyString(type_name()) &&
|
verifier.VerifyString(type_name()) &&
|
||||||
VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
|
VerifyField<uint32_t>(verifier, VT_VERSION, 4) &&
|
||||||
VerifyField<Bigfoot::Flat::Time>(verifier, VT_CREATE_TIME, 8) &&
|
|
||||||
VerifyField<Bigfoot::Flat::Time>(verifier, VT_MODIFICATION_TIME, 8) &&
|
|
||||||
verifier.EndTable();
|
verifier.EndTable();
|
||||||
}
|
}
|
||||||
AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
AssetHeaderT *UnPack(const ::flatbuffers::resolver_function_t *_resolver = nullptr) const;
|
||||||
@@ -113,8 +102,8 @@ struct AssetHeaderBuilder {
|
|||||||
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
||||||
fbb_.AddOffset(AssetHeader::VT_NAME, name);
|
fbb_.AddOffset(AssetHeader::VT_NAME, name);
|
||||||
}
|
}
|
||||||
void add_type_id(uint64_t type_id) {
|
void add_type_id(const Bigfoot::Flat::AssetTypeID *type_id) {
|
||||||
fbb_.AddElement<uint64_t>(AssetHeader::VT_TYPE_ID, type_id, 0);
|
fbb_.AddStruct(AssetHeader::VT_TYPE_ID, type_id);
|
||||||
}
|
}
|
||||||
void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) {
|
void add_type_name(::flatbuffers::Offset<::flatbuffers::String> type_name) {
|
||||||
fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name);
|
fbb_.AddOffset(AssetHeader::VT_TYPE_NAME, type_name);
|
||||||
@@ -122,12 +111,6 @@ struct AssetHeaderBuilder {
|
|||||||
void add_version(uint32_t version) {
|
void add_version(uint32_t version) {
|
||||||
fbb_.AddElement<uint32_t>(AssetHeader::VT_VERSION, version, 0);
|
fbb_.AddElement<uint32_t>(AssetHeader::VT_VERSION, version, 0);
|
||||||
}
|
}
|
||||||
void add_create_time(const Bigfoot::Flat::Time *create_time) {
|
|
||||||
fbb_.AddStruct(AssetHeader::VT_CREATE_TIME, create_time);
|
|
||||||
}
|
|
||||||
void add_modification_time(const Bigfoot::Flat::Time *modification_time) {
|
|
||||||
fbb_.AddStruct(AssetHeader::VT_MODIFICATION_TIME, modification_time);
|
|
||||||
}
|
|
||||||
explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
explicit AssetHeaderBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||||
: fbb_(_fbb) {
|
: fbb_(_fbb) {
|
||||||
start_ = fbb_.StartTable();
|
start_ = fbb_.StartTable();
|
||||||
@@ -135,6 +118,10 @@ struct AssetHeaderBuilder {
|
|||||||
::flatbuffers::Offset<AssetHeader> Finish() {
|
::flatbuffers::Offset<AssetHeader> Finish() {
|
||||||
const auto end = fbb_.EndTable(start_);
|
const auto end = fbb_.EndTable(start_);
|
||||||
auto o = ::flatbuffers::Offset<AssetHeader>(end);
|
auto o = ::flatbuffers::Offset<AssetHeader>(end);
|
||||||
|
fbb_.Required(o, AssetHeader::VT_UUID);
|
||||||
|
fbb_.Required(o, AssetHeader::VT_NAME);
|
||||||
|
fbb_.Required(o, AssetHeader::VT_TYPE_ID);
|
||||||
|
fbb_.Required(o, AssetHeader::VT_TYPE_NAME);
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -143,17 +130,13 @@ inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(
|
|||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||||
const Bigfoot::Flat::UUID *uuid = nullptr,
|
const Bigfoot::Flat::UUID *uuid = nullptr,
|
||||||
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
||||||
uint64_t type_id = 0,
|
const Bigfoot::Flat::AssetTypeID *type_id = nullptr,
|
||||||
::flatbuffers::Offset<::flatbuffers::String> type_name = 0,
|
::flatbuffers::Offset<::flatbuffers::String> type_name = 0,
|
||||||
uint32_t version = 0,
|
uint32_t version = 0) {
|
||||||
const Bigfoot::Flat::Time *create_time = nullptr,
|
|
||||||
const Bigfoot::Flat::Time *modification_time = nullptr) {
|
|
||||||
AssetHeaderBuilder builder_(_fbb);
|
AssetHeaderBuilder builder_(_fbb);
|
||||||
builder_.add_type_id(type_id);
|
|
||||||
builder_.add_modification_time(modification_time);
|
|
||||||
builder_.add_create_time(create_time);
|
|
||||||
builder_.add_version(version);
|
builder_.add_version(version);
|
||||||
builder_.add_type_name(type_name);
|
builder_.add_type_name(type_name);
|
||||||
|
builder_.add_type_id(type_id);
|
||||||
builder_.add_name(name);
|
builder_.add_name(name);
|
||||||
builder_.add_uuid(uuid);
|
builder_.add_uuid(uuid);
|
||||||
return builder_.Finish();
|
return builder_.Finish();
|
||||||
@@ -177,11 +160,9 @@ inline void AssetHeader::UnPackTo(AssetHeaderT *_o, const ::flatbuffers::resolve
|
|||||||
(void)_resolver;
|
(void)_resolver;
|
||||||
{ auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); }
|
{ auto _e = uuid(); if (_e) _o->uuid = ::flatbuffers::UnPack(*_e); }
|
||||||
{ auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); }
|
{ auto _e = name(); if (_e) _o->name = eastl::string(_e->c_str(), _e->size()); }
|
||||||
{ auto _e = type_id(); _o->type_id = _e; }
|
{ auto _e = type_id(); if (_e) _o->type_id = ::flatbuffers::UnPack(*_e); }
|
||||||
{ auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); }
|
{ auto _e = type_name(); if (_e) _o->type_name = eastl::string(_e->c_str(), _e->size()); }
|
||||||
{ auto _e = version(); _o->version = _e; }
|
{ auto _e = version(); _o->version = _e; }
|
||||||
{ auto _e = create_time(); if (_e) _o->create_time = ::flatbuffers::UnPack(*_e); }
|
|
||||||
{ auto _e = modification_time(); if (_e) _o->modification_time = ::flatbuffers::UnPack(*_e); }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
inline ::flatbuffers::Offset<AssetHeader> CreateAssetHeader(::flatbuffers::FlatBufferBuilder &_fbb, const AssetHeaderT *_o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||||
@@ -193,48 +174,40 @@ inline ::flatbuffers::Offset<AssetHeader> AssetHeader::Pack(::flatbuffers::FlatB
|
|||||||
(void)_o;
|
(void)_o;
|
||||||
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
struct _VectorArgs { ::flatbuffers::FlatBufferBuilder *__fbb; const AssetHeaderT* __o; const ::flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
|
||||||
auto _uuid = ::flatbuffers::Pack(_o->uuid);
|
auto _uuid = ::flatbuffers::Pack(_o->uuid);
|
||||||
auto _name = _o->name.empty() ? _fbb.CreateSharedString("") : _fbb.CreateString(_o->name);
|
auto _name = _fbb.CreateString(_o->name);
|
||||||
auto _type_id = _o->type_id;
|
auto _type_id = ::flatbuffers::Pack(_o->type_id);
|
||||||
auto _type_name = _o->type_name.empty() ? _fbb.CreateSharedString("") : _fbb.CreateString(_o->type_name);
|
auto _type_name = _fbb.CreateString(_o->type_name);
|
||||||
auto _version = _o->version;
|
auto _version = _o->version;
|
||||||
auto _create_time = ::flatbuffers::Pack(_o->create_time);
|
|
||||||
auto _modification_time = ::flatbuffers::Pack(_o->modification_time);
|
|
||||||
return Bigfoot::Flat::CreateAssetHeader(
|
return Bigfoot::Flat::CreateAssetHeader(
|
||||||
_fbb,
|
_fbb,
|
||||||
&_uuid,
|
&_uuid,
|
||||||
_name,
|
_name,
|
||||||
_type_id,
|
&_type_id,
|
||||||
_type_name,
|
_type_name,
|
||||||
_version,
|
_version);
|
||||||
&_create_time,
|
|
||||||
&_modification_time);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable() {
|
inline const ::flatbuffers::TypeTable *AssetHeaderTypeTable() {
|
||||||
static const ::flatbuffers::TypeCode type_codes[] = {
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
{ ::flatbuffers::ET_SEQUENCE, 0, 0 },
|
||||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||||
{ ::flatbuffers::ET_ULONG, 0, -1 },
|
|
||||||
{ ::flatbuffers::ET_STRING, 0, -1 },
|
|
||||||
{ ::flatbuffers::ET_UINT, 0, -1 },
|
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 },
|
{ ::flatbuffers::ET_SEQUENCE, 0, 1 },
|
||||||
{ ::flatbuffers::ET_SEQUENCE, 0, 1 }
|
{ ::flatbuffers::ET_STRING, 0, -1 },
|
||||||
|
{ ::flatbuffers::ET_UINT, 0, -1 }
|
||||||
};
|
};
|
||||||
static const ::flatbuffers::TypeFunction type_refs[] = {
|
static const ::flatbuffers::TypeFunction type_refs[] = {
|
||||||
Bigfoot::Flat::UUIDTypeTable,
|
Bigfoot::Flat::UUIDTypeTable,
|
||||||
Bigfoot::Flat::TimeTypeTable
|
Bigfoot::Flat::AssetTypeIDTypeTable
|
||||||
};
|
};
|
||||||
static const char * const names[] = {
|
static const char * const names[] = {
|
||||||
"uuid",
|
"uuid",
|
||||||
"name",
|
"name",
|
||||||
"type_id",
|
"type_id",
|
||||||
"type_name",
|
"type_name",
|
||||||
"version",
|
"version"
|
||||||
"create_time",
|
|
||||||
"modification_time"
|
|
||||||
};
|
};
|
||||||
static const ::flatbuffers::TypeTable tt = {
|
static const ::flatbuffers::TypeTable tt = {
|
||||||
::flatbuffers::ST_TABLE, 7, type_codes, type_refs, nullptr, nullptr, names
|
::flatbuffers::ST_TABLE, 5, type_codes, type_refs, nullptr, nullptr, names
|
||||||
};
|
};
|
||||||
return &tt;
|
return &tt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace Bigfoot.Flat;
|
||||||
|
|
||||||
|
struct AssetTypeID (native_type: "::Bigfoot::AssetTypeID")
|
||||||
|
{
|
||||||
|
value: ulong;
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/*********************************************************************
|
||||||
|
* \file AssetTypeID.hpp
|
||||||
|
*
|
||||||
|
* \author Romain BOULLARD
|
||||||
|
* \date February 2026
|
||||||
|
*********************************************************************/
|
||||||
|
#ifndef BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
||||||
|
#define BIGFOOT_ENGINE_ASSETTYPEID_HPP
|
||||||
|
#include <Engine/BigFile/Asset/AssetTypeID_generated.hpp>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace Bigfoot
|
||||||
|
{
|
||||||
|
using AssetTypeID = std::uint64_t;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::AssetTypeID Pack(const Bigfoot::AssetTypeID& p_assetTypeID);
|
||||||
|
Bigfoot::AssetTypeID UnPack(const Bigfoot::Flat::AssetTypeID& p_flatAssetTypeID);
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||||
|
#define FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||||
|
|
||||||
|
#include "flatbuffers/flatbuffers.h"
|
||||||
|
|
||||||
|
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||||
|
// generated, otherwise it may not be compatible.
|
||||||
|
static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
||||||
|
FLATBUFFERS_VERSION_MINOR == 12 &&
|
||||||
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
|
#include "EASTL/unique_ptr.h"
|
||||||
|
#include "EASTL/string.h"
|
||||||
|
|
||||||
|
namespace Bigfoot {
|
||||||
|
namespace Flat {
|
||||||
|
|
||||||
|
struct AssetTypeID;
|
||||||
|
|
||||||
|
inline const ::flatbuffers::TypeTable *AssetTypeIDTypeTable();
|
||||||
|
|
||||||
|
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) AssetTypeID FLATBUFFERS_FINAL_CLASS {
|
||||||
|
private:
|
||||||
|
uint64_t value_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
struct Traits;
|
||||||
|
static const ::flatbuffers::TypeTable *MiniReflectTypeTable() {
|
||||||
|
return AssetTypeIDTypeTable();
|
||||||
|
}
|
||||||
|
static FLATBUFFERS_CONSTEXPR_CPP11 const char *GetFullyQualifiedName() {
|
||||||
|
return "Bigfoot.Flat.AssetTypeID";
|
||||||
|
}
|
||||||
|
AssetTypeID()
|
||||||
|
: value_(0) {
|
||||||
|
}
|
||||||
|
AssetTypeID(uint64_t _value)
|
||||||
|
: value_(::flatbuffers::EndianScalar(_value)) {
|
||||||
|
}
|
||||||
|
uint64_t value() const {
|
||||||
|
return ::flatbuffers::EndianScalar(value_);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
FLATBUFFERS_STRUCT_END(AssetTypeID, 8);
|
||||||
|
|
||||||
|
struct AssetTypeID::Traits {
|
||||||
|
using type = AssetTypeID;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline const ::flatbuffers::TypeTable *AssetTypeIDTypeTable() {
|
||||||
|
static const ::flatbuffers::TypeCode type_codes[] = {
|
||||||
|
{ ::flatbuffers::ET_ULONG, 0, -1 }
|
||||||
|
};
|
||||||
|
static const int64_t values[] = { 0, 8 };
|
||||||
|
static const char * const names[] = {
|
||||||
|
"value"
|
||||||
|
};
|
||||||
|
static const ::flatbuffers::TypeTable tt = {
|
||||||
|
::flatbuffers::ST_STRUCT, 1, type_codes, nullptr, nullptr, values, names
|
||||||
|
};
|
||||||
|
return &tt;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Flat
|
||||||
|
} // namespace Bigfoot
|
||||||
|
|
||||||
|
#endif // FLATBUFFERS_GENERATED_ASSETTYPEID_BIGFOOT_FLAT_H_
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file FlatTime.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date February 2026
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_SYSTEM_FLATTIME_HPP
|
|
||||||
#define BIGFOOT_SYSTEM_FLATTIME_HPP
|
|
||||||
#include <System/Time/Time.hpp>
|
|
||||||
#include <System/Time/Time_generated.hpp>
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time);
|
|
||||||
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime);
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
native_include "System/Time/FlatTime.hpp";
|
|
||||||
|
|
||||||
namespace Bigfoot.Flat;
|
namespace Bigfoot.Flat;
|
||||||
|
|
||||||
struct Time (native_type: "::Bigfoot::Time")
|
struct Time (native_type: "::Bigfoot::Time")
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#ifndef BIGFOOT_SYSTEM_TIME_HPP
|
#ifndef BIGFOOT_SYSTEM_TIME_HPP
|
||||||
#define BIGFOOT_SYSTEM_TIME_HPP
|
#define BIGFOOT_SYSTEM_TIME_HPP
|
||||||
|
#include <System/Time/Time_generated.hpp>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <compare>
|
#include <compare>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
@@ -65,4 +67,12 @@ class Time
|
|||||||
};
|
};
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time);
|
||||||
|
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime);
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
FLATBUFFERS_VERSION_REVISION == 19,
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
#include "System/Time/FlatTime.hpp"
|
|
||||||
|
|
||||||
#include "EASTL/unique_ptr.h"
|
#include "EASTL/unique_ptr.h"
|
||||||
#include "EASTL/string.h"
|
#include "EASTL/string.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file FlatUUID.hpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date December 2025
|
|
||||||
*********************************************************************/
|
|
||||||
#ifndef BIGFOOT_SYSTEM_FLATUUID_HPP
|
|
||||||
#define BIGFOOT_SYSTEM_FLATUUID_HPP
|
|
||||||
#include <System/UUID/UUID.hpp>
|
|
||||||
#include <System/UUID/UUID_generated.hpp>
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid);
|
|
||||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID);
|
|
||||||
} // namespace flatbuffers
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
native_include "System/UUID/FlatUUID.hpp";
|
|
||||||
|
|
||||||
namespace Bigfoot.Flat;
|
namespace Bigfoot.Flat;
|
||||||
|
|
||||||
struct UUID (native_type: "::Bigfoot::UUID")
|
struct UUID (native_type: "::Bigfoot::UUID")
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
#ifndef BIGFOOT_SYSTEM_UUID_HPP
|
#ifndef BIGFOOT_SYSTEM_UUID_HPP
|
||||||
#define BIGFOOT_SYSTEM_UUID_HPP
|
#define BIGFOOT_SYSTEM_UUID_HPP
|
||||||
|
#include <System/UUID/UUID_generated.hpp>
|
||||||
|
|
||||||
#include <uuid.h>
|
#include <uuid.h>
|
||||||
|
|
||||||
@@ -118,6 +119,8 @@ struct std::formatter<Bigfoot::UUID, char>
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
#if defined BIGFOOT_NOT_OPTIMIZED
|
#if defined BIGFOOT_NOT_OPTIMIZED
|
||||||
#include <quill/DeferredFormatCodec.h>
|
#include <quill/DeferredFormatCodec.h>
|
||||||
|
|
||||||
@@ -141,4 +144,12 @@ struct quill::Codec<Bigfoot::UUID>: quill::DeferredFormatCodec<Bigfoot::UUID>
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid);
|
||||||
|
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID);
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
FLATBUFFERS_VERSION_REVISION == 19,
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
#include "System/UUID/FlatUUID.hpp"
|
|
||||||
|
|
||||||
#include "EASTL/unique_ptr.h"
|
#include "EASTL/unique_ptr.h"
|
||||||
#include "EASTL/string.h"
|
#include "EASTL/string.h"
|
||||||
|
|
||||||
|
|||||||
@@ -119,3 +119,20 @@ Time Time::Now()
|
|||||||
return Time {epochInMicroSeconds};
|
return Time {epochInMicroSeconds};
|
||||||
}
|
}
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::Time Pack(const Bigfoot::Time& p_time)
|
||||||
|
{
|
||||||
|
return Bigfoot::Flat::Time {p_time.Epoch()};
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
Bigfoot::Time UnPack(const Bigfoot::Flat::Time& p_flatTime)
|
||||||
|
{
|
||||||
|
return Bigfoot::Time {p_flatTime.epoch()};
|
||||||
|
}
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
/*********************************************************************
|
|
||||||
* \file FlatUUID.cpp
|
|
||||||
*
|
|
||||||
* \author Romain BOULLARD
|
|
||||||
* \date December 2025
|
|
||||||
*********************************************************************/
|
|
||||||
#include <System/UUID/FlatUUID.hpp>
|
|
||||||
|
|
||||||
namespace flatbuffers
|
|
||||||
{
|
|
||||||
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid)
|
|
||||||
{
|
|
||||||
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid;
|
|
||||||
return Bigfoot::Flat::UUID {
|
|
||||||
std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> {reinterpret_cast<const std::uint8_t*>(bytes.data()),
|
|
||||||
bytes.size()}};
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
|
||||||
|
|
||||||
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID)
|
|
||||||
{
|
|
||||||
const std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> bytesView {p_flatUUID.bytes()->data(),
|
|
||||||
p_flatUUID.bytes()->size()};
|
|
||||||
return Bigfoot::UUID {std::as_bytes(bytesView)};
|
|
||||||
}
|
|
||||||
} // namespace flatbuffers
|
|
||||||
@@ -85,3 +85,25 @@ uuids::uuid_random_generator UUID::GetUUIDGenerator()
|
|||||||
return uuids::uuid_random_generator {ms_randomGenerator};
|
return uuids::uuid_random_generator {ms_randomGenerator};
|
||||||
}
|
}
|
||||||
} // namespace Bigfoot
|
} // namespace Bigfoot
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
namespace flatbuffers
|
||||||
|
{
|
||||||
|
Bigfoot::Flat::UUID Pack(const Bigfoot::UUID& p_uuid)
|
||||||
|
{
|
||||||
|
const std::span<const std::byte, Bigfoot::UUID::UUID_BYTE_SIZE> bytes = p_uuid;
|
||||||
|
return Bigfoot::Flat::UUID {
|
||||||
|
std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> {reinterpret_cast<const std::uint8_t*>(bytes.data()),
|
||||||
|
bytes.size()}};
|
||||||
|
}
|
||||||
|
|
||||||
|
/****************************************************************************************/
|
||||||
|
|
||||||
|
Bigfoot::UUID UnPack(const Bigfoot::Flat::UUID& p_flatUUID)
|
||||||
|
{
|
||||||
|
const std::span<const std::uint8_t, Bigfoot::UUID::UUID_BYTE_SIZE> bytesView {p_flatUUID.bytes()->data(),
|
||||||
|
p_flatUUID.bytes()->size()};
|
||||||
|
return Bigfoot::UUID {std::as_bytes(bytesView)};
|
||||||
|
}
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <Utils/TargetMacros.h>
|
#include <Utils/TargetMacros.h>
|
||||||
|
|
||||||
#include <EngineTests/BigFileInfo_generated.hpp>
|
#include <EngineTests/BigFileInfo_generated.hpp>
|
||||||
|
#include <EngineTests/BigFile/Asset/AssetA_generated.hpp>
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ static_assert(FLATBUFFERS_VERSION_MAJOR == 25 &&
|
|||||||
FLATBUFFERS_VERSION_REVISION == 19,
|
FLATBUFFERS_VERSION_REVISION == 19,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
#include "System/UUID/FlatUUID.hpp"
|
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||||
#include "System/Time/FlatTime.hpp"
|
#include "Engine/BigFile/Asset/AssetTypeID.hpp"
|
||||||
|
#include "System/UUID/UUID.hpp"
|
||||||
#include "Engine/BigFile/Asset/AssetHeader_generated.hpp"
|
#include "Engine/BigFile/Asset/AssetHeader_generated.hpp"
|
||||||
|
|
||||||
#include "EASTL/unique_ptr.h"
|
#include "EASTL/unique_ptr.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user