mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 21:24:14 +00:00
update goldens with namespace
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
|
||||||
#ifndef FLATBUFFERS_GENERATED_BASIC_H_
|
#ifndef FLATBUFFERS_GENERATED_BASIC_FLATBUFFERS_GOLDENS_H_
|
||||||
#define FLATBUFFERS_GENERATED_BASIC_H_
|
#define FLATBUFFERS_GENERATED_BASIC_FLATBUFFERS_GOLDENS_H_
|
||||||
|
|
||||||
#include "flatbuffers/flatbuffers.h"
|
#include "flatbuffers/flatbuffers.h"
|
||||||
|
|
||||||
@@ -10,9 +10,12 @@
|
|||||||
// generated, otherwise it may not be compatible.
|
// generated, otherwise it may not be compatible.
|
||||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
|
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
|
||||||
FLATBUFFERS_VERSION_MINOR == 5 &&
|
FLATBUFFERS_VERSION_MINOR == 5 &&
|
||||||
FLATBUFFERS_VERSION_REVISION == 9,
|
FLATBUFFERS_VERSION_REVISION == 26,
|
||||||
"Non-compatible flatbuffers version included");
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
|
namespace flatbuffers {
|
||||||
|
namespace goldens {
|
||||||
|
|
||||||
struct Galaxy;
|
struct Galaxy;
|
||||||
struct GalaxyBuilder;
|
struct GalaxyBuilder;
|
||||||
|
|
||||||
@@ -69,8 +72,8 @@ struct Universe FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
|||||||
double age() const {
|
double age() const {
|
||||||
return GetField<double>(VT_AGE, 0.0);
|
return GetField<double>(VT_AGE, 0.0);
|
||||||
}
|
}
|
||||||
const ::flatbuffers::Vector<::flatbuffers::Offset<Galaxy>> *galaxies() const {
|
const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>> *galaxies() const {
|
||||||
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<Galaxy>> *>(VT_GALAXIES);
|
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>> *>(VT_GALAXIES);
|
||||||
}
|
}
|
||||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||||
return VerifyTableStart(verifier) &&
|
return VerifyTableStart(verifier) &&
|
||||||
@@ -89,7 +92,7 @@ struct UniverseBuilder {
|
|||||||
void add_age(double age) {
|
void add_age(double age) {
|
||||||
fbb_.AddElement<double>(Universe::VT_AGE, age, 0.0);
|
fbb_.AddElement<double>(Universe::VT_AGE, age, 0.0);
|
||||||
}
|
}
|
||||||
void add_galaxies(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Galaxy>>> galaxies) {
|
void add_galaxies(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>>> galaxies) {
|
||||||
fbb_.AddOffset(Universe::VT_GALAXIES, galaxies);
|
fbb_.AddOffset(Universe::VT_GALAXIES, galaxies);
|
||||||
}
|
}
|
||||||
explicit UniverseBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
explicit UniverseBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||||
@@ -106,7 +109,7 @@ struct UniverseBuilder {
|
|||||||
inline ::flatbuffers::Offset<Universe> CreateUniverse(
|
inline ::flatbuffers::Offset<Universe> CreateUniverse(
|
||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||||
double age = 0.0,
|
double age = 0.0,
|
||||||
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<Galaxy>>> galaxies = 0) {
|
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>>> galaxies = 0) {
|
||||||
UniverseBuilder builder_(_fbb);
|
UniverseBuilder builder_(_fbb);
|
||||||
builder_.add_age(age);
|
builder_.add_age(age);
|
||||||
builder_.add_galaxies(galaxies);
|
builder_.add_galaxies(galaxies);
|
||||||
@@ -116,42 +119,45 @@ inline ::flatbuffers::Offset<Universe> CreateUniverse(
|
|||||||
inline ::flatbuffers::Offset<Universe> CreateUniverseDirect(
|
inline ::flatbuffers::Offset<Universe> CreateUniverseDirect(
|
||||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||||
double age = 0.0,
|
double age = 0.0,
|
||||||
const std::vector<::flatbuffers::Offset<Galaxy>> *galaxies = nullptr) {
|
const std::vector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>> *galaxies = nullptr) {
|
||||||
auto galaxies__ = galaxies ? _fbb.CreateVector<::flatbuffers::Offset<Galaxy>>(*galaxies) : 0;
|
auto galaxies__ = galaxies ? _fbb.CreateVector<::flatbuffers::Offset<flatbuffers::goldens::Galaxy>>(*galaxies) : 0;
|
||||||
return CreateUniverse(
|
return flatbuffers::goldens::CreateUniverse(
|
||||||
_fbb,
|
_fbb,
|
||||||
age,
|
age,
|
||||||
galaxies__);
|
galaxies__);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const Universe *GetUniverse(const void *buf) {
|
inline const flatbuffers::goldens::Universe *GetUniverse(const void *buf) {
|
||||||
return ::flatbuffers::GetRoot<Universe>(buf);
|
return ::flatbuffers::GetRoot<flatbuffers::goldens::Universe>(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline const Universe *GetSizePrefixedUniverse(const void *buf) {
|
inline const flatbuffers::goldens::Universe *GetSizePrefixedUniverse(const void *buf) {
|
||||||
return ::flatbuffers::GetSizePrefixedRoot<Universe>(buf);
|
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::goldens::Universe>(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool VerifyUniverseBuffer(
|
inline bool VerifyUniverseBuffer(
|
||||||
::flatbuffers::Verifier &verifier) {
|
::flatbuffers::Verifier &verifier) {
|
||||||
return verifier.VerifyBuffer<Universe>(nullptr);
|
return verifier.VerifyBuffer<flatbuffers::goldens::Universe>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool VerifySizePrefixedUniverseBuffer(
|
inline bool VerifySizePrefixedUniverseBuffer(
|
||||||
::flatbuffers::Verifier &verifier) {
|
::flatbuffers::Verifier &verifier) {
|
||||||
return verifier.VerifySizePrefixedBuffer<Universe>(nullptr);
|
return verifier.VerifySizePrefixedBuffer<flatbuffers::goldens::Universe>(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void FinishUniverseBuffer(
|
inline void FinishUniverseBuffer(
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
::flatbuffers::FlatBufferBuilder &fbb,
|
||||||
::flatbuffers::Offset<Universe> root) {
|
::flatbuffers::Offset<flatbuffers::goldens::Universe> root) {
|
||||||
fbb.Finish(root);
|
fbb.Finish(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void FinishSizePrefixedUniverseBuffer(
|
inline void FinishSizePrefixedUniverseBuffer(
|
||||||
::flatbuffers::FlatBufferBuilder &fbb,
|
::flatbuffers::FlatBufferBuilder &fbb,
|
||||||
::flatbuffers::Offset<Universe> root) {
|
::flatbuffers::Offset<flatbuffers::goldens::Universe> root) {
|
||||||
fbb.FinishSizePrefixed(root);
|
fbb.FinishSizePrefixed(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // FLATBUFFERS_GENERATED_BASIC_H_
|
} // namespace goldens
|
||||||
|
} // namespace flatbuffers
|
||||||
|
|
||||||
|
#endif // FLATBUFFERS_GENERATED_BASIC_FLATBUFFERS_GOLDENS_H_
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
|
|
||||||
|
namespace flatbuffers.goldens
|
||||||
|
{
|
||||||
|
|
||||||
using global::System;
|
using global::System;
|
||||||
using global::System.Collections.Generic;
|
using global::System.Collections.Generic;
|
||||||
using global::Google.FlatBuffers;
|
using global::Google.FlatBuffers;
|
||||||
@@ -18,7 +21,7 @@ public struct Galaxy : IFlatbufferObject
|
|||||||
|
|
||||||
public long NumStars { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
public long NumStars { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetLong(o + __p.bb_pos) : (long)0; } }
|
||||||
|
|
||||||
public static Offset<Galaxy> CreateGalaxy(FlatBufferBuilder builder,
|
public static Offset<flatbuffers.goldens.Galaxy> CreateGalaxy(FlatBufferBuilder builder,
|
||||||
long num_stars = 0) {
|
long num_stars = 0) {
|
||||||
builder.StartTable(1);
|
builder.StartTable(1);
|
||||||
Galaxy.AddNumStars(builder, num_stars);
|
Galaxy.AddNumStars(builder, num_stars);
|
||||||
@@ -27,9 +30,9 @@ public struct Galaxy : IFlatbufferObject
|
|||||||
|
|
||||||
public static void StartGalaxy(FlatBufferBuilder builder) { builder.StartTable(1); }
|
public static void StartGalaxy(FlatBufferBuilder builder) { builder.StartTable(1); }
|
||||||
public static void AddNumStars(FlatBufferBuilder builder, long numStars) { builder.AddLong(0, numStars, 0); }
|
public static void AddNumStars(FlatBufferBuilder builder, long numStars) { builder.AddLong(0, numStars, 0); }
|
||||||
public static Offset<Galaxy> EndGalaxy(FlatBufferBuilder builder) {
|
public static Offset<flatbuffers.goldens.Galaxy> EndGalaxy(FlatBufferBuilder builder) {
|
||||||
int o = builder.EndTable();
|
int o = builder.EndTable();
|
||||||
return new Offset<Galaxy>(o);
|
return new Offset<flatbuffers.goldens.Galaxy>(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,3 +46,5 @@ static public class GalaxyVerify
|
|||||||
&& verifier.VerifyTableEnd(tablePos);
|
&& verifier.VerifyTableEnd(tablePos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,6 +2,9 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
|
|
||||||
|
namespace flatbuffers.goldens
|
||||||
|
{
|
||||||
|
|
||||||
using global::System;
|
using global::System;
|
||||||
using global::System.Collections.Generic;
|
using global::System.Collections.Generic;
|
||||||
using global::Google.FlatBuffers;
|
using global::Google.FlatBuffers;
|
||||||
@@ -18,10 +21,10 @@ public struct Universe : IFlatbufferObject
|
|||||||
public Universe __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
public Universe __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||||
|
|
||||||
public double Age { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)0.0; } }
|
public double Age { get { int o = __p.__offset(4); return o != 0 ? __p.bb.GetDouble(o + __p.bb_pos) : (double)0.0; } }
|
||||||
public Galaxy? Galaxies(int j) { int o = __p.__offset(6); return o != 0 ? (Galaxy?)(new Galaxy()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
|
public flatbuffers.goldens.Galaxy? Galaxies(int j) { int o = __p.__offset(6); return o != 0 ? (flatbuffers.goldens.Galaxy?)(new flatbuffers.goldens.Galaxy()).__assign(__p.__indirect(__p.__vector(o) + j * 4), __p.bb) : null; }
|
||||||
public int GalaxiesLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
|
public int GalaxiesLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
|
||||||
|
|
||||||
public static Offset<Universe> CreateUniverse(FlatBufferBuilder builder,
|
public static Offset<flatbuffers.goldens.Universe> CreateUniverse(FlatBufferBuilder builder,
|
||||||
double age = 0.0,
|
double age = 0.0,
|
||||||
VectorOffset galaxiesOffset = default(VectorOffset)) {
|
VectorOffset galaxiesOffset = default(VectorOffset)) {
|
||||||
builder.StartTable(2);
|
builder.StartTable(2);
|
||||||
@@ -33,17 +36,17 @@ public struct Universe : IFlatbufferObject
|
|||||||
public static void StartUniverse(FlatBufferBuilder builder) { builder.StartTable(2); }
|
public static void StartUniverse(FlatBufferBuilder builder) { builder.StartTable(2); }
|
||||||
public static void AddAge(FlatBufferBuilder builder, double age) { builder.AddDouble(0, age, 0.0); }
|
public static void AddAge(FlatBufferBuilder builder, double age) { builder.AddDouble(0, age, 0.0); }
|
||||||
public static void AddGalaxies(FlatBufferBuilder builder, VectorOffset galaxiesOffset) { builder.AddOffset(1, galaxiesOffset.Value, 0); }
|
public static void AddGalaxies(FlatBufferBuilder builder, VectorOffset galaxiesOffset) { builder.AddOffset(1, galaxiesOffset.Value, 0); }
|
||||||
public static VectorOffset CreateGalaxiesVector(FlatBufferBuilder builder, Offset<Galaxy>[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
|
public static VectorOffset CreateGalaxiesVector(FlatBufferBuilder builder, Offset<flatbuffers.goldens.Galaxy>[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddOffset(data[i].Value); return builder.EndVector(); }
|
||||||
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, Offset<Galaxy>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, Offset<flatbuffers.goldens.Galaxy>[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
||||||
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, ArraySegment<Offset<Galaxy>> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, ArraySegment<Offset<flatbuffers.goldens.Galaxy>> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
||||||
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<Offset<Galaxy>>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
public static VectorOffset CreateGalaxiesVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<Offset<flatbuffers.goldens.Galaxy>>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
||||||
public static void StartGalaxiesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
public static void StartGalaxiesVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
||||||
public static Offset<Universe> EndUniverse(FlatBufferBuilder builder) {
|
public static Offset<flatbuffers.goldens.Universe> EndUniverse(FlatBufferBuilder builder) {
|
||||||
int o = builder.EndTable();
|
int o = builder.EndTable();
|
||||||
return new Offset<Universe>(o);
|
return new Offset<flatbuffers.goldens.Universe>(o);
|
||||||
}
|
}
|
||||||
public static void FinishUniverseBuffer(FlatBufferBuilder builder, Offset<Universe> offset) { builder.Finish(offset.Value); }
|
public static void FinishUniverseBuffer(FlatBufferBuilder builder, Offset<flatbuffers.goldens.Universe> offset) { builder.Finish(offset.Value); }
|
||||||
public static void FinishSizePrefixedUniverseBuffer(FlatBufferBuilder builder, Offset<Universe> offset) { builder.FinishSizePrefixed(offset.Value); }
|
public static void FinishSizePrefixedUniverseBuffer(FlatBufferBuilder builder, Offset<flatbuffers.goldens.Universe> offset) { builder.FinishSizePrefixed(offset.Value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -53,7 +56,9 @@ static public class UniverseVerify
|
|||||||
{
|
{
|
||||||
return verifier.VerifyTableStart(tablePos)
|
return verifier.VerifyTableStart(tablePos)
|
||||||
&& verifier.VerifyField(tablePos, 4 /*Age*/, 8 /*double*/, 8, false)
|
&& verifier.VerifyField(tablePos, 4 /*Age*/, 8 /*double*/, 8, false)
|
||||||
&& verifier.VerifyVectorOfTables(tablePos, 6 /*Galaxies*/, GalaxyVerify.Verify, false)
|
&& verifier.VerifyVectorOfTables(tablePos, 6 /*Galaxies*/, flatbuffers.goldens.GalaxyVerify.Verify, false)
|
||||||
&& verifier.VerifyTableEnd(tablePos);
|
&& verifier.VerifyTableEnd(tablePos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable
|
// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable
|
||||||
|
|
||||||
|
library flatbuffers.goldens;
|
||||||
|
|
||||||
import 'dart:typed_data' show Uint8List;
|
import 'dart:typed_data' show Uint8List;
|
||||||
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Galaxy
|
package goldens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
flatbuffers "github.com/google/flatbuffers/go"
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
||||||
|
|
||||||
package Universe
|
package goldens
|
||||||
|
|
||||||
import (
|
import (
|
||||||
flatbuffers "github.com/google/flatbuffers/go"
|
flatbuffers "github.com/google/flatbuffers/go"
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
package flatbuffers.goldens;
|
||||||
|
|
||||||
import com.google.flatbuffers.BaseVector;
|
import com.google.flatbuffers.BaseVector;
|
||||||
import com.google.flatbuffers.BooleanVector;
|
import com.google.flatbuffers.BooleanVector;
|
||||||
import com.google.flatbuffers.ByteVector;
|
import com.google.flatbuffers.ByteVector;
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
package flatbuffers.goldens;
|
||||||
|
|
||||||
import com.google.flatbuffers.BaseVector;
|
import com.google.flatbuffers.BaseVector;
|
||||||
import com.google.flatbuffers.BooleanVector;
|
import com.google.flatbuffers.BooleanVector;
|
||||||
import com.google.flatbuffers.ByteVector;
|
import com.google.flatbuffers.ByteVector;
|
||||||
@@ -26,11 +28,11 @@ public final class Universe extends Table {
|
|||||||
public Universe __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
public Universe __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
||||||
|
|
||||||
public double age() { int o = __offset(4); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; }
|
public double age() { int o = __offset(4); return o != 0 ? bb.getDouble(o + bb_pos) : 0.0; }
|
||||||
public Galaxy galaxies(int j) { return galaxies(new Galaxy(), j); }
|
public flatbuffers.goldens.Galaxy galaxies(int j) { return galaxies(new flatbuffers.goldens.Galaxy(), j); }
|
||||||
public Galaxy galaxies(Galaxy obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
|
public flatbuffers.goldens.Galaxy galaxies(flatbuffers.goldens.Galaxy obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; }
|
||||||
public int galaxiesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
|
public int galaxiesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; }
|
||||||
public Galaxy.Vector galaxiesVector() { return galaxiesVector(new Galaxy.Vector()); }
|
public flatbuffers.goldens.Galaxy.Vector galaxiesVector() { return galaxiesVector(new flatbuffers.goldens.Galaxy.Vector()); }
|
||||||
public Galaxy.Vector galaxiesVector(Galaxy.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
|
public flatbuffers.goldens.Galaxy.Vector galaxiesVector(flatbuffers.goldens.Galaxy.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; }
|
||||||
|
|
||||||
public static int createUniverse(FlatBufferBuilder builder,
|
public static int createUniverse(FlatBufferBuilder builder,
|
||||||
double age,
|
double age,
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
package flatbuffers.goldens
|
||||||
|
|
||||||
import com.google.flatbuffers.BaseVector
|
import com.google.flatbuffers.BaseVector
|
||||||
import com.google.flatbuffers.BooleanVector
|
import com.google.flatbuffers.BooleanVector
|
||||||
import com.google.flatbuffers.ByteVector
|
import com.google.flatbuffers.ByteVector
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
package flatbuffers.goldens
|
||||||
|
|
||||||
import com.google.flatbuffers.BaseVector
|
import com.google.flatbuffers.BaseVector
|
||||||
import com.google.flatbuffers.BooleanVector
|
import com.google.flatbuffers.BooleanVector
|
||||||
import com.google.flatbuffers.ByteVector
|
import com.google.flatbuffers.ByteVector
|
||||||
@@ -31,8 +33,8 @@ class Universe : Table() {
|
|||||||
val o = __offset(4)
|
val o = __offset(4)
|
||||||
return if(o != 0) bb.getDouble(o + bb_pos) else 0.0
|
return if(o != 0) bb.getDouble(o + bb_pos) else 0.0
|
||||||
}
|
}
|
||||||
fun galaxies(j: Int) : Galaxy? = galaxies(Galaxy(), j)
|
fun galaxies(j: Int) : flatbuffers.goldens.Galaxy? = galaxies(flatbuffers.goldens.Galaxy(), j)
|
||||||
fun galaxies(obj: Galaxy, j: Int) : Galaxy? {
|
fun galaxies(obj: flatbuffers.goldens.Galaxy, j: Int) : flatbuffers.goldens.Galaxy? {
|
||||||
val o = __offset(6)
|
val o = __offset(6)
|
||||||
return if (o != 0) {
|
return if (o != 0) {
|
||||||
obj.__assign(__indirect(__vector(o) + j * 4), bb)
|
obj.__assign(__indirect(__vector(o) + j * 4), bb)
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
import flatbuffers
|
import flatbuffers
|
||||||
|
|
||||||
|
namespace flatbuffers.goldens
|
||||||
|
|
||||||
class Galaxy
|
class Galaxy
|
||||||
|
|
||||||
class Universe
|
class Universe
|
||||||
|
|
||||||
class Galaxy : flatbuffers_handle
|
class Galaxy : flatbuffers.handle
|
||||||
def num_stars() -> int:
|
def num_stars() -> int:
|
||||||
return buf_.flatbuffers_field_int64(pos_, 4, 0)
|
return flatbuffers.field_int64(buf_, pos_, 4, 0)
|
||||||
|
|
||||||
def GetRootAsGalaxy(buf:string): return Galaxy { buf, buf.flatbuffers_indirect(0) }
|
def GetRootAsGalaxy(buf:string): return Galaxy { buf, flatbuffers.indirect(buf, 0) }
|
||||||
|
|
||||||
struct GalaxyBuilder:
|
struct GalaxyBuilder:
|
||||||
b_:flatbuffers_builder
|
b_:flatbuffers.builder
|
||||||
def start():
|
def start():
|
||||||
b_.StartObject(1)
|
b_.StartObject(1)
|
||||||
return this
|
return this
|
||||||
@@ -22,33 +24,33 @@ struct GalaxyBuilder:
|
|||||||
def end():
|
def end():
|
||||||
return b_.EndObject()
|
return b_.EndObject()
|
||||||
|
|
||||||
class Universe : flatbuffers_handle
|
class Universe : flatbuffers.handle
|
||||||
def age() -> float:
|
def age() -> float:
|
||||||
return buf_.flatbuffers_field_float64(pos_, 4, 0.0)
|
return flatbuffers.field_float64(buf_, pos_, 4, 0.0)
|
||||||
def galaxies(i:int) -> Galaxy:
|
def galaxies(i:int) -> flatbuffers.goldens.Galaxy:
|
||||||
return Galaxy { buf_, buf_.flatbuffers_indirect(buf_.flatbuffers_field_vector(pos_, 6) + i * 4) }
|
return flatbuffers.goldens.Galaxy { buf_, flatbuffers.indirect(buf_, flatbuffers.field_vector(buf_, pos_, 6) + i * 4) }
|
||||||
def galaxies_length() -> int:
|
def galaxies_length() -> int:
|
||||||
return buf_.flatbuffers_field_vector_len(pos_, 6)
|
return flatbuffers.field_vector_len(buf_, pos_, 6)
|
||||||
|
|
||||||
def GetRootAsUniverse(buf:string): return Universe { buf, buf.flatbuffers_indirect(0) }
|
def GetRootAsUniverse(buf:string): return Universe { buf, flatbuffers.indirect(buf, 0) }
|
||||||
|
|
||||||
struct UniverseBuilder:
|
struct UniverseBuilder:
|
||||||
b_:flatbuffers_builder
|
b_:flatbuffers.builder
|
||||||
def start():
|
def start():
|
||||||
b_.StartObject(2)
|
b_.StartObject(2)
|
||||||
return this
|
return this
|
||||||
def add_age(age:float):
|
def add_age(age:float):
|
||||||
b_.PrependFloat64Slot(0, age, 0.0)
|
b_.PrependFloat64Slot(0, age, 0.0)
|
||||||
return this
|
return this
|
||||||
def add_galaxies(galaxies:flatbuffers_offset):
|
def add_galaxies(galaxies:flatbuffers.offset):
|
||||||
b_.PrependUOffsetTRelativeSlot(1, galaxies)
|
b_.PrependUOffsetTRelativeSlot(1, galaxies)
|
||||||
return this
|
return this
|
||||||
def end():
|
def end():
|
||||||
return b_.EndObject()
|
return b_.EndObject()
|
||||||
|
|
||||||
def UniverseStartGalaxiesVector(b_:flatbuffers_builder, n_:int):
|
def UniverseStartGalaxiesVector(b_:flatbuffers.builder, n_:int):
|
||||||
b_.StartVector(4, n_, 4)
|
b_.StartVector(4, n_, 4)
|
||||||
def UniverseCreateGalaxiesVector(b_:flatbuffers_builder, v_:[flatbuffers_offset]):
|
def UniverseCreateGalaxiesVector(b_:flatbuffers.builder, v_:[flatbuffers.offset]):
|
||||||
b_.StartVector(4, v_.length, 4)
|
b_.StartVector(4, v_.length, 4)
|
||||||
reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
|
reverse(v_) e_: b_.PrependUOffsetTRelative(e_)
|
||||||
return b_.EndVector(v_.length)
|
return b_.EndVector(v_.length)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Automatically generated by the FlatBuffers compiler, do not modify.
|
Automatically generated by the FlatBuffers compiler, do not modify.
|
||||||
Or modify. I'm a message, not a cop.
|
Or modify. I'm a message, not a cop.
|
||||||
|
|
||||||
flatc version: 23.5.9
|
flatc version: 23.5.26
|
||||||
|
|
||||||
Declared by : //basic.fbs
|
Declared by : //basic.fbs
|
||||||
Rooting type : Universe (//basic.fbs)
|
Rooting type : Universe (//basic.fbs)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
Automatically generated by the FlatBuffers compiler, do not modify.
|
Automatically generated by the FlatBuffers compiler, do not modify.
|
||||||
Or modify. I'm a message, not a cop.
|
Or modify. I'm a message, not a cop.
|
||||||
|
|
||||||
flatc version: 23.5.9
|
flatc version: 23.5.26
|
||||||
|
|
||||||
Declared by : //basic.fbs
|
Declared by : //basic.fbs
|
||||||
Rooting type : Universe (//basic.fbs)
|
Rooting type : Universe (//basic.fbs)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Automatically generated by the FlatBuffers compiler, do not modify.
|
Automatically generated by the FlatBuffers compiler, do not modify.
|
||||||
Or modify. I'm a message, not a cop.
|
Or modify. I'm a message, not a cop.
|
||||||
|
|
||||||
flatc version: 23.5.9
|
flatc version: 23.5.26
|
||||||
|
|
||||||
Declared by : //basic.fbs
|
Declared by : //basic.fbs
|
||||||
Rooting type : Universe (//basic.fbs)
|
Rooting type : Universe (//basic.fbs)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Automatically generated by the FlatBuffers compiler, do not modify.
|
Automatically generated by the FlatBuffers compiler, do not modify.
|
||||||
Or modify. I'm a message, not a cop.
|
Or modify. I'm a message, not a cop.
|
||||||
|
|
||||||
flatc version: 23.5.9
|
flatc version: 23.5.26
|
||||||
|
|
||||||
Declared by : //basic.fbs
|
Declared by : //basic.fbs
|
||||||
Rooting type : Universe (//basic.fbs)
|
Rooting type : Universe (//basic.fbs)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
namespace flatbuffers\goldens;
|
||||||
|
|
||||||
use \Google\FlatBuffers\Struct;
|
use \Google\FlatBuffers\Struct;
|
||||||
use \Google\FlatBuffers\Table;
|
use \Google\FlatBuffers\Table;
|
||||||
use \Google\FlatBuffers\ByteBuffer;
|
use \Google\FlatBuffers\ByteBuffer;
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
namespace flatbuffers\goldens;
|
||||||
|
|
||||||
use \Google\FlatBuffers\Struct;
|
use \Google\FlatBuffers\Struct;
|
||||||
use \Google\FlatBuffers\Table;
|
use \Google\FlatBuffers\Table;
|
||||||
use \Google\FlatBuffers\ByteBuffer;
|
use \Google\FlatBuffers\ByteBuffer;
|
||||||
0
goldens/py/flatbuffers/__init__.py
Normal file
0
goldens/py/flatbuffers/__init__.py
Normal file
@@ -1,6 +1,6 @@
|
|||||||
# automatically generated by the FlatBuffers compiler, do not modify
|
# automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
# namespace:
|
# namespace: goldens
|
||||||
|
|
||||||
import flatbuffers
|
import flatbuffers
|
||||||
from flatbuffers.compat import import_numpy
|
from flatbuffers.compat import import_numpy
|
||||||
@@ -40,7 +40,7 @@ def Start(builder):
|
|||||||
def GalaxyAddNumStars(builder, numStars):
|
def GalaxyAddNumStars(builder, numStars):
|
||||||
builder.PrependInt64Slot(0, numStars, 0)
|
builder.PrependInt64Slot(0, numStars, 0)
|
||||||
|
|
||||||
def AddNumStars(builder: flatbuffers.Builder, numStars: int):
|
def AddNumStars(builder, numStars):
|
||||||
GalaxyAddNumStars(builder, numStars)
|
GalaxyAddNumStars(builder, numStars)
|
||||||
|
|
||||||
def GalaxyEnd(builder):
|
def GalaxyEnd(builder):
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# automatically generated by the FlatBuffers compiler, do not modify
|
# automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
# namespace:
|
# namespace: goldens
|
||||||
|
|
||||||
import flatbuffers
|
import flatbuffers
|
||||||
from flatbuffers.compat import import_numpy
|
from flatbuffers.compat import import_numpy
|
||||||
@@ -38,7 +38,7 @@ class Universe(object):
|
|||||||
x = self._tab.Vector(o)
|
x = self._tab.Vector(o)
|
||||||
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
|
x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4
|
||||||
x = self._tab.Indirect(x)
|
x = self._tab.Indirect(x)
|
||||||
from .Galaxy import Galaxy
|
from flatbuffers.goldens.Galaxy import Galaxy
|
||||||
obj = Galaxy()
|
obj = Galaxy()
|
||||||
obj.Init(self._tab.Bytes, x)
|
obj.Init(self._tab.Bytes, x)
|
||||||
return obj
|
return obj
|
||||||
@@ -65,13 +65,13 @@ def Start(builder):
|
|||||||
def UniverseAddAge(builder, age):
|
def UniverseAddAge(builder, age):
|
||||||
builder.PrependFloat64Slot(0, age, 0.0)
|
builder.PrependFloat64Slot(0, age, 0.0)
|
||||||
|
|
||||||
def AddAge(builder: flatbuffers.Builder, age: float):
|
def AddAge(builder, age):
|
||||||
UniverseAddAge(builder, age)
|
UniverseAddAge(builder, age)
|
||||||
|
|
||||||
def UniverseAddGalaxies(builder, galaxies):
|
def UniverseAddGalaxies(builder, galaxies):
|
||||||
builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(galaxies), 0)
|
builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(galaxies), 0)
|
||||||
|
|
||||||
def AddGalaxies(builder: flatbuffers.Builder, galaxies: int):
|
def AddGalaxies(builder, galaxies):
|
||||||
UniverseAddGalaxies(builder, galaxies)
|
UniverseAddGalaxies(builder, galaxies)
|
||||||
|
|
||||||
def UniverseStartGalaxiesVector(builder, numElems):
|
def UniverseStartGalaxiesVector(builder, numElems):
|
||||||
0
goldens/py/flatbuffers/goldens/__init__.py
Normal file
0
goldens/py/flatbuffers/goldens/__init__.py
Normal file
@@ -9,6 +9,23 @@ use core::cmp::Ordering;
|
|||||||
extern crate flatbuffers;
|
extern crate flatbuffers;
|
||||||
use self::flatbuffers::{EndianScalar, Follow};
|
use self::flatbuffers::{EndianScalar, Follow};
|
||||||
|
|
||||||
|
#[allow(unused_imports, dead_code)]
|
||||||
|
pub mod flatbuffers {
|
||||||
|
|
||||||
|
use core::mem;
|
||||||
|
use core::cmp::Ordering;
|
||||||
|
|
||||||
|
extern crate flatbuffers;
|
||||||
|
use self::flatbuffers::{EndianScalar, Follow};
|
||||||
|
#[allow(unused_imports, dead_code)]
|
||||||
|
pub mod goldens {
|
||||||
|
|
||||||
|
use core::mem;
|
||||||
|
use core::cmp::Ordering;
|
||||||
|
|
||||||
|
extern crate flatbuffers;
|
||||||
|
use self::flatbuffers::{EndianScalar, Follow};
|
||||||
|
|
||||||
pub enum GalaxyOffset {}
|
pub enum GalaxyOffset {}
|
||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
|
|
||||||
@@ -32,8 +49,8 @@ impl<'a> Galaxy<'a> {
|
|||||||
Galaxy { _tab: table }
|
Galaxy { _tab: table }
|
||||||
}
|
}
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
||||||
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||||
args: &'args GalaxyArgs
|
args: &'args GalaxyArgs
|
||||||
) -> flatbuffers::WIPOffset<Galaxy<'bldr>> {
|
) -> flatbuffers::WIPOffset<Galaxy<'bldr>> {
|
||||||
let mut builder = GalaxyBuilder::new(_fbb);
|
let mut builder = GalaxyBuilder::new(_fbb);
|
||||||
@@ -75,17 +92,17 @@ impl<'a> Default for GalaxyArgs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct GalaxyBuilder<'a: 'b, 'b> {
|
pub struct GalaxyBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
||||||
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||||
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
||||||
}
|
}
|
||||||
impl<'a: 'b, 'b> GalaxyBuilder<'a, 'b> {
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> GalaxyBuilder<'a, 'b, A> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn add_num_stars(&mut self, num_stars: i64) {
|
pub fn add_num_stars(&mut self, num_stars: i64) {
|
||||||
self.fbb_.push_slot::<i64>(Galaxy::VT_NUM_STARS, num_stars, 0);
|
self.fbb_.push_slot::<i64>(Galaxy::VT_NUM_STARS, num_stars, 0);
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> GalaxyBuilder<'a, 'b> {
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> GalaxyBuilder<'a, 'b, A> {
|
||||||
let start = _fbb.start_table();
|
let start = _fbb.start_table();
|
||||||
GalaxyBuilder {
|
GalaxyBuilder {
|
||||||
fbb_: _fbb,
|
fbb_: _fbb,
|
||||||
@@ -130,8 +147,8 @@ impl<'a> Universe<'a> {
|
|||||||
Universe { _tab: table }
|
Universe { _tab: table }
|
||||||
}
|
}
|
||||||
#[allow(unused_mut)]
|
#[allow(unused_mut)]
|
||||||
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
||||||
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||||
args: &'args UniverseArgs<'args>
|
args: &'args UniverseArgs<'args>
|
||||||
) -> flatbuffers::WIPOffset<Universe<'bldr>> {
|
) -> flatbuffers::WIPOffset<Universe<'bldr>> {
|
||||||
let mut builder = UniverseBuilder::new(_fbb);
|
let mut builder = UniverseBuilder::new(_fbb);
|
||||||
@@ -184,11 +201,11 @@ impl<'a> Default for UniverseArgs<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct UniverseBuilder<'a: 'b, 'b> {
|
pub struct UniverseBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
||||||
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||||
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
||||||
}
|
}
|
||||||
impl<'a: 'b, 'b> UniverseBuilder<'a, 'b> {
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> UniverseBuilder<'a, 'b, A> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn add_age(&mut self, age: f64) {
|
pub fn add_age(&mut self, age: f64) {
|
||||||
self.fbb_.push_slot::<f64>(Universe::VT_AGE, age, 0.0);
|
self.fbb_.push_slot::<f64>(Universe::VT_AGE, age, 0.0);
|
||||||
@@ -198,7 +215,7 @@ impl<'a: 'b, 'b> UniverseBuilder<'a, 'b> {
|
|||||||
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Universe::VT_GALAXIES, galaxies);
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Universe::VT_GALAXIES, galaxies);
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UniverseBuilder<'a, 'b> {
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> UniverseBuilder<'a, 'b, A> {
|
||||||
let start = _fbb.start_table();
|
let start = _fbb.start_table();
|
||||||
UniverseBuilder {
|
UniverseBuilder {
|
||||||
fbb_: _fbb,
|
fbb_: _fbb,
|
||||||
@@ -281,13 +298,16 @@ pub unsafe fn size_prefixed_root_as_universe_unchecked(buf: &[u8]) -> Universe {
|
|||||||
flatbuffers::size_prefixed_root_unchecked::<Universe>(buf)
|
flatbuffers::size_prefixed_root_unchecked::<Universe>(buf)
|
||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn finish_universe_buffer<'a, 'b>(
|
pub fn finish_universe_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
|
||||||
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
|
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||||
root: flatbuffers::WIPOffset<Universe<'a>>) {
|
root: flatbuffers::WIPOffset<Universe<'a>>) {
|
||||||
fbb.finish(root, None);
|
fbb.finish(root, None);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn finish_size_prefixed_universe_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<Universe<'a>>) {
|
pub fn finish_size_prefixed_universe_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<Universe<'a>>) {
|
||||||
fbb.finish_size_prefixed(root, None);
|
fbb.finish_size_prefixed(root, None);
|
||||||
}
|
}
|
||||||
|
} // pub mod goldens
|
||||||
|
} // pub mod flatbuffers
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// This file should contain the basics of flatbuffers that all languages should
|
// This file should contain the basics of flatbuffers that all languages should
|
||||||
// support.
|
// support.
|
||||||
|
|
||||||
|
namespace flatbuffers.goldens;
|
||||||
|
|
||||||
table Galaxy {
|
table Galaxy {
|
||||||
num_stars:long;
|
num_stars:long;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
import FlatBuffers
|
import FlatBuffers
|
||||||
|
|
||||||
public struct Galaxy: FlatBufferObject, Verifiable {
|
public struct flatbuffers_goldens_Galaxy: FlatBufferObject, Verifiable {
|
||||||
|
|
||||||
static func validateVersion() { FlatBuffersVersion_23_5_26() }
|
static func validateVersion() { FlatBuffersVersion_23_5_26() }
|
||||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||||
@@ -27,9 +27,9 @@ public struct Galaxy: FlatBufferObject, Verifiable {
|
|||||||
_ fbb: inout FlatBufferBuilder,
|
_ fbb: inout FlatBufferBuilder,
|
||||||
numStars: Int64 = 0
|
numStars: Int64 = 0
|
||||||
) -> Offset {
|
) -> Offset {
|
||||||
let __start = Galaxy.startGalaxy(&fbb)
|
let __start = flatbuffers_goldens_Galaxy.startGalaxy(&fbb)
|
||||||
Galaxy.add(numStars: numStars, &fbb)
|
flatbuffers_goldens_Galaxy.add(numStars: numStars, &fbb)
|
||||||
return Galaxy.endGalaxy(&fbb, start: __start)
|
return flatbuffers_goldens_Galaxy.endGalaxy(&fbb, start: __start)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
||||||
@@ -39,7 +39,7 @@ public struct Galaxy: FlatBufferObject, Verifiable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct Universe: FlatBufferObject, Verifiable {
|
public struct flatbuffers_goldens_Universe: FlatBufferObject, Verifiable {
|
||||||
|
|
||||||
static func validateVersion() { FlatBuffersVersion_23_5_26() }
|
static func validateVersion() { FlatBuffersVersion_23_5_26() }
|
||||||
public var __buffer: ByteBuffer! { return _accessor.bb }
|
public var __buffer: ByteBuffer! { return _accessor.bb }
|
||||||
@@ -58,7 +58,7 @@ public struct Universe: FlatBufferObject, Verifiable {
|
|||||||
public var age: Double { let o = _accessor.offset(VTOFFSET.age.v); return o == 0 ? 0.0 : _accessor.readBuffer(of: Double.self, at: o) }
|
public var age: Double { let o = _accessor.offset(VTOFFSET.age.v); return o == 0 ? 0.0 : _accessor.readBuffer(of: Double.self, at: o) }
|
||||||
public var hasGalaxies: Bool { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? false : true }
|
public var hasGalaxies: Bool { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? false : true }
|
||||||
public var galaxiesCount: Int32 { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? 0 : _accessor.vector(count: o) }
|
public var galaxiesCount: Int32 { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? 0 : _accessor.vector(count: o) }
|
||||||
public func galaxies(at index: Int32) -> Galaxy? { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? nil : Galaxy(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
|
public func galaxies(at index: Int32) -> flatbuffers_goldens_Galaxy? { let o = _accessor.offset(VTOFFSET.galaxies.v); return o == 0 ? nil : flatbuffers_goldens_Galaxy(_accessor.bb, o: _accessor.indirect(_accessor.vector(at: o) + index * 4)) }
|
||||||
public static func startUniverse(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 2) }
|
public static func startUniverse(_ fbb: inout FlatBufferBuilder) -> UOffset { fbb.startTable(with: 2) }
|
||||||
public static func add(age: Double, _ fbb: inout FlatBufferBuilder) { fbb.add(element: age, def: 0.0, at: VTOFFSET.age.p) }
|
public static func add(age: Double, _ fbb: inout FlatBufferBuilder) { fbb.add(element: age, def: 0.0, at: VTOFFSET.age.p) }
|
||||||
public static func addVectorOf(galaxies: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: galaxies, at: VTOFFSET.galaxies.p) }
|
public static func addVectorOf(galaxies: Offset, _ fbb: inout FlatBufferBuilder) { fbb.add(offset: galaxies, at: VTOFFSET.galaxies.p) }
|
||||||
@@ -68,16 +68,16 @@ public struct Universe: FlatBufferObject, Verifiable {
|
|||||||
age: Double = 0.0,
|
age: Double = 0.0,
|
||||||
galaxiesVectorOffset galaxies: Offset = Offset()
|
galaxiesVectorOffset galaxies: Offset = Offset()
|
||||||
) -> Offset {
|
) -> Offset {
|
||||||
let __start = Universe.startUniverse(&fbb)
|
let __start = flatbuffers_goldens_Universe.startUniverse(&fbb)
|
||||||
Universe.add(age: age, &fbb)
|
flatbuffers_goldens_Universe.add(age: age, &fbb)
|
||||||
Universe.addVectorOf(galaxies: galaxies, &fbb)
|
flatbuffers_goldens_Universe.addVectorOf(galaxies: galaxies, &fbb)
|
||||||
return Universe.endUniverse(&fbb, start: __start)
|
return flatbuffers_goldens_Universe.endUniverse(&fbb, start: __start)
|
||||||
}
|
}
|
||||||
|
|
||||||
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
|
||||||
var _v = try verifier.visitTable(at: position)
|
var _v = try verifier.visitTable(at: position)
|
||||||
try _v.visit(field: VTOFFSET.age.p, fieldName: "age", required: false, type: Double.self)
|
try _v.visit(field: VTOFFSET.age.p, fieldName: "age", required: false, type: Double.self)
|
||||||
try _v.visit(field: VTOFFSET.galaxies.p, fieldName: "galaxies", required: false, type: ForwardOffset<Vector<ForwardOffset<Galaxy>, Galaxy>>.self)
|
try _v.visit(field: VTOFFSET.galaxies.p, fieldName: "galaxies", required: false, type: ForwardOffset<Vector<ForwardOffset<flatbuffers_goldens_Galaxy>, flatbuffers_goldens_Galaxy>>.self)
|
||||||
_v.finish()
|
_v.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
export { Galaxy } from './galaxy.js';
|
export { Galaxy } from './galaxy.js';
|
||||||
export { Universe } from './universe.js';
|
export { Universe } from './universe.js';
|
||||||
|
|||||||
6
goldens/ts/flatbuffers/goldens.ts
Normal file
6
goldens/ts/flatbuffers/goldens.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
|
export { Galaxy } from './goldens/galaxy.js';
|
||||||
|
export { Universe } from './goldens/universe.js';
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
import * as flatbuffers from 'flatbuffers';
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
export class Galaxy {
|
export class Galaxy {
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
// automatically generated by the FlatBuffers compiler, do not modify
|
// automatically generated by the FlatBuffers compiler, do not modify
|
||||||
|
|
||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
||||||
|
|
||||||
import * as flatbuffers from 'flatbuffers';
|
import * as flatbuffers from 'flatbuffers';
|
||||||
|
|
||||||
import { Galaxy } from './galaxy.js';
|
import { Galaxy } from '../../flatbuffers/goldens/galaxy.js';
|
||||||
|
|
||||||
|
|
||||||
export class Universe {
|
export class Universe {
|
||||||
Reference in New Issue
Block a user