mirror of https://github.com/axmolengine/axmol.git
Update flatbuffers: 2.0.8 ==> 24.3.25
This commit is contained in:
parent
f7c19cdbef
commit
2ea963cb07
|
@ -62,7 +62,7 @@
|
|||
|
||||
## flatbuffers
|
||||
- [![Upstream](https://img.shields.io/github/v/release/google/flatbuffers?label=Upstream)](https://github.com/google/flatbuffers)
|
||||
- Version: 2.0.8
|
||||
- Version: 24.3.25
|
||||
- License: Apache-2.0
|
||||
|
||||
## {fmt}
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#ifndef FLATBUFFERS_ARRAY_H_
|
||||
#define FLATBUFFERS_ARRAY_H_
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/stl_emulation.h"
|
||||
#include "flatbuffers/vector.h"
|
||||
|
@ -35,7 +38,7 @@ template<typename T, uint16_t length> class Array {
|
|||
public:
|
||||
typedef uint16_t size_type;
|
||||
typedef typename IndirectHelper<IndirectHelperType>::return_type return_type;
|
||||
typedef VectorIterator<T, return_type> const_iterator;
|
||||
typedef VectorConstIterator<T, return_type, uoffset_t> const_iterator;
|
||||
typedef VectorReverseIterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
// If T is a LE-scalar or a struct (!scalar_tag::value).
|
||||
|
@ -156,11 +159,13 @@ template<typename T, uint16_t length> class Array {
|
|||
|
||||
// Specialization for Array[struct] with access using Offset<void> pointer.
|
||||
// This specialization used by idl_gen_text.cpp.
|
||||
template<typename T, uint16_t length> class Array<Offset<T>, length> {
|
||||
template<typename T, uint16_t length, template<typename> class OffsetT>
|
||||
class Array<OffsetT<T>, length> {
|
||||
static_assert(flatbuffers::is_same<T, void>::value, "unexpected type T");
|
||||
|
||||
public:
|
||||
typedef const void *return_type;
|
||||
typedef uint16_t size_type;
|
||||
|
||||
const uint8_t *Data() const { return data_; }
|
||||
|
||||
|
@ -238,6 +243,14 @@ const Array<E, length> &CastToArrayOfEnum(const T (&arr)[length]) {
|
|||
return *reinterpret_cast<const Array<E, length> *>(arr);
|
||||
}
|
||||
|
||||
template<typename T, uint16_t length>
|
||||
bool operator==(const Array<T, length> &lhs,
|
||||
const Array<T, length> &rhs) noexcept {
|
||||
return std::addressof(lhs) == std::addressof(rhs) ||
|
||||
(lhs.size() == rhs.size() &&
|
||||
std::memcmp(lhs.Data(), rhs.Data(), rhs.size() * sizeof(T)) == 0);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_ARRAY_H_
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
#if defined(ARDUINO) && !defined(ARDUINOSTL_M_H)
|
||||
#if defined(ARDUINO) && !defined(ARDUINOSTL_M_H) && defined(__AVR__)
|
||||
#include <utility.h>
|
||||
#else
|
||||
#include <utility>
|
||||
|
@ -43,6 +43,7 @@
|
|||
#include <vector>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
|
||||
|
@ -138,9 +139,9 @@
|
|||
#endif
|
||||
#endif // !defined(FLATBUFFERS_LITTLEENDIAN)
|
||||
|
||||
#define FLATBUFFERS_VERSION_MAJOR 2
|
||||
#define FLATBUFFERS_VERSION_MINOR 0
|
||||
#define FLATBUFFERS_VERSION_REVISION 8
|
||||
#define FLATBUFFERS_VERSION_MAJOR 24
|
||||
#define FLATBUFFERS_VERSION_MINOR 3
|
||||
#define FLATBUFFERS_VERSION_REVISION 25
|
||||
#define FLATBUFFERS_STRING_EXPAND(X) #X
|
||||
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
|
||||
namespace flatbuffers {
|
||||
|
@ -154,7 +155,7 @@ namespace flatbuffers {
|
|||
#define FLATBUFFERS_FINAL_CLASS final
|
||||
#define FLATBUFFERS_OVERRIDE override
|
||||
#define FLATBUFFERS_EXPLICIT_CPP11 explicit
|
||||
#define FLATBUFFERS_VTABLE_UNDERLYING_TYPE : flatbuffers::voffset_t
|
||||
#define FLATBUFFERS_VTABLE_UNDERLYING_TYPE : ::flatbuffers::voffset_t
|
||||
#else
|
||||
#define FLATBUFFERS_FINAL_CLASS
|
||||
#define FLATBUFFERS_OVERRIDE
|
||||
|
@ -233,12 +234,17 @@ namespace flatbuffers {
|
|||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
// Check for absl::string_view
|
||||
#elif __has_include("absl/strings/string_view.h")
|
||||
#include "absl/strings/string_view.h"
|
||||
namespace flatbuffers {
|
||||
typedef absl::string_view string_view;
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
#elif __has_include("absl/strings/string_view.h") && \
|
||||
__has_include("absl/base/config.h") && \
|
||||
(__cplusplus >= 201411)
|
||||
#include "absl/base/config.h"
|
||||
#if !defined(ABSL_USES_STD_STRING_VIEW)
|
||||
#include "absl/strings/string_view.h"
|
||||
namespace flatbuffers {
|
||||
typedef absl::string_view string_view;
|
||||
}
|
||||
#define FLATBUFFERS_HAS_STRING_VIEW 1
|
||||
#endif
|
||||
#endif
|
||||
#endif // __has_include
|
||||
#endif // !FLATBUFFERS_HAS_STRING_VIEW
|
||||
|
@ -273,20 +279,22 @@ namespace flatbuffers {
|
|||
#endif // !FLATBUFFERS_LOCALE_INDEPENDENT
|
||||
|
||||
// Suppress Undefined Behavior Sanitizer (recoverable only). Usage:
|
||||
// - __suppress_ubsan__("undefined")
|
||||
// - __suppress_ubsan__("signed-integer-overflow")
|
||||
// - FLATBUFFERS_SUPPRESS_UBSAN("undefined")
|
||||
// - FLATBUFFERS_SUPPRESS_UBSAN("signed-integer-overflow")
|
||||
#if defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))
|
||||
#define __suppress_ubsan__(type) __attribute__((no_sanitize(type)))
|
||||
#define FLATBUFFERS_SUPPRESS_UBSAN(type) __attribute__((no_sanitize(type)))
|
||||
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ >= 409)
|
||||
#define __suppress_ubsan__(type) __attribute__((no_sanitize_undefined))
|
||||
#define FLATBUFFERS_SUPPRESS_UBSAN(type) __attribute__((no_sanitize_undefined))
|
||||
#else
|
||||
#define __suppress_ubsan__(type)
|
||||
#define FLATBUFFERS_SUPPRESS_UBSAN(type)
|
||||
#endif
|
||||
|
||||
// This is constexpr function used for checking compile-time constants.
|
||||
// Avoid `#pragma warning(disable: 4127) // C4127: expression is constant`.
|
||||
template<typename T> FLATBUFFERS_CONSTEXPR inline bool IsConstTrue(T t) {
|
||||
return !!t;
|
||||
namespace flatbuffers {
|
||||
// This is constexpr function used for checking compile-time constants.
|
||||
// Avoid `#pragma warning(disable: 4127) // C4127: expression is constant`.
|
||||
template<typename T> FLATBUFFERS_CONSTEXPR inline bool IsConstTrue(T t) {
|
||||
return !!t;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable C++ attribute [[]] if std:c++17 or higher.
|
||||
|
@ -318,9 +326,11 @@ namespace flatbuffers {
|
|||
// Also, using a consistent offset type maintains compatibility of serialized
|
||||
// offset values between 32bit and 64bit systems.
|
||||
typedef uint32_t uoffset_t;
|
||||
typedef uint64_t uoffset64_t;
|
||||
|
||||
// Signed offsets for references that can go in both directions.
|
||||
typedef int32_t soffset_t;
|
||||
typedef int64_t soffset64_t;
|
||||
|
||||
// Offset/index used in v-tables, can be changed to uint8_t in
|
||||
// format forks to save a bit of space if desired.
|
||||
|
@ -329,7 +339,8 @@ typedef uint16_t voffset_t;
|
|||
typedef uintmax_t largest_scalar_t;
|
||||
|
||||
// In 32bits, this evaluates to 2GB - 1
|
||||
#define FLATBUFFERS_MAX_BUFFER_SIZE ((1ULL << (sizeof(::flatbuffers::soffset_t) * 8 - 1)) - 1)
|
||||
#define FLATBUFFERS_MAX_BUFFER_SIZE std::numeric_limits<::flatbuffers::soffset_t>::max()
|
||||
#define FLATBUFFERS_MAX_64_BUFFER_SIZE std::numeric_limits<::flatbuffers::soffset64_t>::max()
|
||||
|
||||
// The minimum size buffer that can be a valid flatbuffer.
|
||||
// Includes the offset to the root table (uoffset_t), the offset to the vtable
|
||||
|
@ -352,7 +363,6 @@ inline bool VerifyAlignmentRequirements(size_t align, size_t min_align = 1) {
|
|||
}
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable: 4351) // C4351: new behavior: elements of array ... will be default initialized
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4127) // C4127: conditional expression is constant
|
||||
#endif
|
||||
|
@ -413,7 +423,7 @@ template<typename T> T EndianScalar(T t) {
|
|||
|
||||
template<typename T>
|
||||
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
|
||||
__suppress_ubsan__("alignment")
|
||||
FLATBUFFERS_SUPPRESS_UBSAN("alignment")
|
||||
T ReadScalar(const void *p) {
|
||||
return EndianScalar(*reinterpret_cast<const T *>(p));
|
||||
}
|
||||
|
@ -427,13 +437,13 @@ T ReadScalar(const void *p) {
|
|||
|
||||
template<typename T>
|
||||
// UBSAN: C++ aliasing type rules, see std::bit_cast<> for details.
|
||||
__suppress_ubsan__("alignment")
|
||||
FLATBUFFERS_SUPPRESS_UBSAN("alignment")
|
||||
void WriteScalar(void *p, T t) {
|
||||
*reinterpret_cast<T *>(p) = EndianScalar(t);
|
||||
}
|
||||
|
||||
template<typename T> struct Offset;
|
||||
template<typename T> __suppress_ubsan__("alignment") void WriteScalar(void *p, Offset<T> t) {
|
||||
template<typename T> FLATBUFFERS_SUPPRESS_UBSAN("alignment") void WriteScalar(void *p, Offset<T> t) {
|
||||
*reinterpret_cast<uoffset_t *>(p) = EndianScalar(t.o);
|
||||
}
|
||||
|
||||
|
@ -444,7 +454,7 @@ template<typename T> __suppress_ubsan__("alignment") void WriteScalar(void *p, O
|
|||
// Computes how many bytes you'd have to pad to be able to write an
|
||||
// "scalar_size" scalar if the buffer had grown to "buf_size" (downwards in
|
||||
// memory).
|
||||
__suppress_ubsan__("unsigned-integer-overflow")
|
||||
FLATBUFFERS_SUPPRESS_UBSAN("unsigned-integer-overflow")
|
||||
inline size_t PaddingBytes(size_t buf_size, size_t scalar_size) {
|
||||
return ((~buf_size) + 1) & (scalar_size - 1);
|
||||
}
|
||||
|
|
|
@ -17,20 +17,41 @@
|
|||
#ifndef FLATBUFFERS_BUFFER_H_
|
||||
#define FLATBUFFERS_BUFFER_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
|
||||
namespace flatbuffers {
|
||||
|
||||
// Wrapper for uoffset_t to allow safe template specialization.
|
||||
// Value is allowed to be 0 to indicate a null object (see e.g. AddOffset).
|
||||
template<typename T> struct Offset {
|
||||
uoffset_t o;
|
||||
template<typename T = void> struct Offset {
|
||||
// The type of offset to use.
|
||||
typedef uoffset_t offset_type;
|
||||
|
||||
offset_type o;
|
||||
Offset() : o(0) {}
|
||||
Offset(uoffset_t _o) : o(_o) {}
|
||||
Offset<void> Union() const { return Offset<void>(o); }
|
||||
Offset(const offset_type _o) : o(_o) {}
|
||||
Offset<> Union() const { return o; }
|
||||
bool IsNull() const { return !o; }
|
||||
};
|
||||
|
||||
// Wrapper for uoffset64_t Offsets.
|
||||
template<typename T = void> struct Offset64 {
|
||||
// The type of offset to use.
|
||||
typedef uoffset64_t offset_type;
|
||||
|
||||
offset_type o;
|
||||
Offset64() : o(0) {}
|
||||
Offset64(const offset_type offset) : o(offset) {}
|
||||
Offset64<> Union() const { return o; }
|
||||
bool IsNull() const { return !o; }
|
||||
};
|
||||
|
||||
// Litmus check for ensuring the Offsets are the expected size.
|
||||
static_assert(sizeof(Offset<>) == 4, "Offset has wrong size");
|
||||
static_assert(sizeof(Offset64<>) == 8, "Offset64 has wrong size");
|
||||
|
||||
inline void EndianCheck() {
|
||||
int endiantest = 1;
|
||||
// If this fails, see FLATBUFFERS_LITTLEENDIAN above.
|
||||
|
@ -73,25 +94,59 @@ template<typename T> struct IndirectHelper {
|
|||
typedef T return_type;
|
||||
typedef T mutable_return_type;
|
||||
static const size_t element_stride = sizeof(T);
|
||||
static return_type Read(const uint8_t *p, uoffset_t i) {
|
||||
|
||||
static return_type Read(const uint8_t *p, const size_t i) {
|
||||
return EndianScalar((reinterpret_cast<const T *>(p))[i]);
|
||||
}
|
||||
};
|
||||
template<typename T> struct IndirectHelper<Offset<T>> {
|
||||
typedef const T *return_type;
|
||||
typedef T *mutable_return_type;
|
||||
static const size_t element_stride = sizeof(uoffset_t);
|
||||
static return_type Read(const uint8_t *p, uoffset_t i) {
|
||||
p += i * sizeof(uoffset_t);
|
||||
return reinterpret_cast<return_type>(p + ReadScalar<uoffset_t>(p));
|
||||
static mutable_return_type Read(uint8_t *p, const size_t i) {
|
||||
return reinterpret_cast<mutable_return_type>(
|
||||
Read(const_cast<const uint8_t *>(p), i));
|
||||
}
|
||||
};
|
||||
|
||||
// For vector of Offsets.
|
||||
template<typename T, template<typename> class OffsetT>
|
||||
struct IndirectHelper<OffsetT<T>> {
|
||||
typedef const T *return_type;
|
||||
typedef T *mutable_return_type;
|
||||
typedef typename OffsetT<T>::offset_type offset_type;
|
||||
static const offset_type element_stride = sizeof(offset_type);
|
||||
|
||||
static return_type Read(const uint8_t *const p, const offset_type i) {
|
||||
// Offsets are relative to themselves, so first update the pointer to
|
||||
// point to the offset location.
|
||||
const uint8_t *const offset_location = p + i * element_stride;
|
||||
|
||||
// Then read the scalar value of the offset (which may be 32 or 64-bits) and
|
||||
// then determine the relative location from the offset location.
|
||||
return reinterpret_cast<return_type>(
|
||||
offset_location + ReadScalar<offset_type>(offset_location));
|
||||
}
|
||||
static mutable_return_type Read(uint8_t *const p, const offset_type i) {
|
||||
// Offsets are relative to themselves, so first update the pointer to
|
||||
// point to the offset location.
|
||||
uint8_t *const offset_location = p + i * element_stride;
|
||||
|
||||
// Then read the scalar value of the offset (which may be 32 or 64-bits) and
|
||||
// then determine the relative location from the offset location.
|
||||
return reinterpret_cast<mutable_return_type>(
|
||||
offset_location + ReadScalar<offset_type>(offset_location));
|
||||
}
|
||||
};
|
||||
|
||||
// For vector of structs.
|
||||
template<typename T> struct IndirectHelper<const T *> {
|
||||
typedef const T *return_type;
|
||||
typedef T *mutable_return_type;
|
||||
static const size_t element_stride = sizeof(T);
|
||||
static return_type Read(const uint8_t *p, uoffset_t i) {
|
||||
return reinterpret_cast<const T *>(p + i * sizeof(T));
|
||||
|
||||
static return_type Read(const uint8_t *const p, const size_t i) {
|
||||
// Structs are stored inline, relative to the first struct pointer.
|
||||
return reinterpret_cast<return_type>(p + i * element_stride);
|
||||
}
|
||||
static mutable_return_type Read(uint8_t *const p, const size_t i) {
|
||||
// Structs are stored inline, relative to the first struct pointer.
|
||||
return reinterpret_cast<mutable_return_type>(p + i * element_stride);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -118,25 +173,27 @@ inline bool BufferHasIdentifier(const void *buf, const char *identifier,
|
|||
/// @cond FLATBUFFERS_INTERNAL
|
||||
// Helpers to get a typed pointer to the root object contained in the buffer.
|
||||
template<typename T> T *GetMutableRoot(void *buf) {
|
||||
if (!buf) return nullptr;
|
||||
EndianCheck();
|
||||
return reinterpret_cast<T *>(
|
||||
reinterpret_cast<uint8_t *>(buf) +
|
||||
EndianScalar(*reinterpret_cast<uoffset_t *>(buf)));
|
||||
}
|
||||
|
||||
template<typename T> T *GetMutableSizePrefixedRoot(void *buf) {
|
||||
return GetMutableRoot<T>(reinterpret_cast<uint8_t *>(buf) +
|
||||
sizeof(uoffset_t));
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
T *GetMutableSizePrefixedRoot(void *buf) {
|
||||
return GetMutableRoot<T>(reinterpret_cast<uint8_t *>(buf) + sizeof(SizeT));
|
||||
}
|
||||
|
||||
template<typename T> const T *GetRoot(const void *buf) {
|
||||
return GetMutableRoot<T>(const_cast<void *>(buf));
|
||||
}
|
||||
|
||||
template<typename T> const T *GetSizePrefixedRoot(const void *buf) {
|
||||
return GetRoot<T>(reinterpret_cast<const uint8_t *>(buf) + sizeof(uoffset_t));
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
const T *GetSizePrefixedRoot(const void *buf) {
|
||||
return GetRoot<T>(reinterpret_cast<const uint8_t *>(buf) + sizeof(SizeT));
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_BUFFER_H_
|
||||
#endif // FLATBUFFERS_BUFFER_H_
|
||||
|
|
|
@ -45,7 +45,7 @@ class DetachedBuffer {
|
|||
cur_(cur),
|
||||
size_(sz) {}
|
||||
|
||||
DetachedBuffer(DetachedBuffer &&other)
|
||||
DetachedBuffer(DetachedBuffer &&other) noexcept
|
||||
: allocator_(other.allocator_),
|
||||
own_allocator_(other.own_allocator_),
|
||||
buf_(other.buf_),
|
||||
|
@ -55,7 +55,7 @@ class DetachedBuffer {
|
|||
other.reset();
|
||||
}
|
||||
|
||||
DetachedBuffer &operator=(DetachedBuffer &&other) {
|
||||
DetachedBuffer &operator=(DetachedBuffer &&other) noexcept {
|
||||
if (this == &other) return *this;
|
||||
|
||||
destroy();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -17,6 +17,8 @@
|
|||
#ifndef FLATBUFFERS_H_
|
||||
#define FLATBUFFERS_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
// TODO: These includes are for mitigating the pains of users editing their
|
||||
// source because they relied on flatbuffers.h to include everything for them.
|
||||
#include "flatbuffers/array.h"
|
||||
|
@ -74,8 +76,20 @@ inline const uint8_t *GetBufferStartFromRootPointer(const void *root) {
|
|||
}
|
||||
|
||||
/// @brief This return the prefixed size of a FlatBuffer.
|
||||
inline uoffset_t GetPrefixedSize(const uint8_t *buf) {
|
||||
return ReadScalar<uoffset_t>(buf);
|
||||
template<typename SizeT = uoffset_t>
|
||||
inline SizeT GetPrefixedSize(const uint8_t *buf) {
|
||||
return ReadScalar<SizeT>(buf);
|
||||
}
|
||||
|
||||
// Gets the total length of the buffer given a sized prefixed FlatBuffer.
|
||||
//
|
||||
// This includes the size of the prefix as well as the buffer:
|
||||
//
|
||||
// [size prefix][flatbuffer]
|
||||
// |---------length--------|
|
||||
template<typename SizeT = uoffset_t>
|
||||
inline SizeT GetSizePrefixedBufferLength(const uint8_t *const buf) {
|
||||
return ReadScalar<SizeT>(buf) + sizeof(SizeT);
|
||||
}
|
||||
|
||||
// Base class for native objects (FlatBuffer data de-serialized into native
|
||||
|
@ -234,31 +248,31 @@ inline const char *flatbuffers_version_string() {
|
|||
|
||||
// clang-format off
|
||||
#define FLATBUFFERS_DEFINE_BITMASK_OPERATORS(E, T)\
|
||||
inline E operator | (E lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator | (E lhs, E rhs){\
|
||||
return E(T(lhs) | T(rhs));\
|
||||
}\
|
||||
inline E operator & (E lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator & (E lhs, E rhs){\
|
||||
return E(T(lhs) & T(rhs));\
|
||||
}\
|
||||
inline E operator ^ (E lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator ^ (E lhs, E rhs){\
|
||||
return E(T(lhs) ^ T(rhs));\
|
||||
}\
|
||||
inline E operator ~ (E lhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator ~ (E lhs){\
|
||||
return E(~T(lhs));\
|
||||
}\
|
||||
inline E operator |= (E &lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator |= (E &lhs, E rhs){\
|
||||
lhs = lhs | rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline E operator &= (E &lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator &= (E &lhs, E rhs){\
|
||||
lhs = lhs & rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline E operator ^= (E &lhs, E rhs){\
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 E operator ^= (E &lhs, E rhs){\
|
||||
lhs = lhs ^ rhs;\
|
||||
return lhs;\
|
||||
}\
|
||||
inline bool operator !(E rhs) \
|
||||
inline FLATBUFFERS_CONSTEXPR_CPP11 bool operator !(E rhs) \
|
||||
{\
|
||||
return !bool(T(rhs)); \
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* Copyright 2022 Google Inc. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef FLATBUFFERS_FLEX_FLAT_UTIL_H_
|
||||
#define FLATBUFFERS_FLEX_FLAT_UTIL_H_
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
#include "flatbuffers/flexbuffers.h"
|
||||
|
||||
namespace flexbuffers {
|
||||
|
||||
// Verifies the `nested` flexbuffer within a flatbuffer vector is valid.
|
||||
inline bool VerifyNestedFlexBuffer(
|
||||
const flatbuffers::Vector<uint8_t> *const nested,
|
||||
flatbuffers::Verifier &verifier) {
|
||||
if (!nested) return true;
|
||||
return verifier.Check(flexbuffers::VerifyBuffer(
|
||||
nested->data(), nested->size(), verifier.GetFlexReuseTracker()));
|
||||
}
|
||||
|
||||
} // namespace flexbuffers
|
||||
|
||||
#endif // FLATBUFFERS_FLEX_FLAT_UTIL_H_
|
File diff suppressed because it is too large
Load Diff
|
@ -41,15 +41,19 @@
|
|||
#include <optional>
|
||||
#endif
|
||||
|
||||
// The __cpp_lib_span is the predefined feature macro.
|
||||
#if defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
#include <span>
|
||||
#elif defined(__cpp_lib_span) && defined(__has_include)
|
||||
#if __has_include(<span>)
|
||||
#include <array>
|
||||
#include <span>
|
||||
#define FLATBUFFERS_USE_STD_SPAN
|
||||
#ifndef FLATBUFFERS_USE_STD_SPAN
|
||||
// Testing __cpp_lib_span requires including either <version> or <span>,
|
||||
// both of which were added in C++20.
|
||||
// See: https://en.cppreference.com/w/cpp/utility/feature_test
|
||||
#if defined(__cplusplus) && __cplusplus >= 202002L \
|
||||
|| (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
|
||||
#define FLATBUFFERS_USE_STD_SPAN 1
|
||||
#endif
|
||||
#endif // FLATBUFFERS_USE_STD_SPAN
|
||||
|
||||
#if defined(FLATBUFFERS_USE_STD_SPAN)
|
||||
#include <array>
|
||||
#include <span>
|
||||
#else
|
||||
// Disable non-trivial ctors if FLATBUFFERS_SPAN_MINIMAL defined.
|
||||
#if !defined(FLATBUFFERS_TEMPLATES_ALIASES)
|
||||
|
|
|
@ -31,6 +31,11 @@ struct String : public Vector<char> {
|
|||
flatbuffers::string_view string_view() const {
|
||||
return flatbuffers::string_view(c_str(), size());
|
||||
}
|
||||
|
||||
/* implicit */
|
||||
operator flatbuffers::string_view() const {
|
||||
return flatbuffers::string_view(c_str(), size());
|
||||
}
|
||||
#endif // FLATBUFFERS_HAS_STRING_VIEW
|
||||
// clang-format on
|
||||
|
||||
|
@ -61,4 +66,4 @@ static inline flatbuffers::string_view GetStringView(const String *str) {
|
|||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_STRING_H_
|
||||
#endif // FLATBUFFERS_STRING_H_
|
||||
|
|
|
@ -47,14 +47,24 @@ class Table {
|
|||
return field_offset ? ReadScalar<T>(data_ + field_offset) : defaultval;
|
||||
}
|
||||
|
||||
template<typename P> P GetPointer(voffset_t field) {
|
||||
template<typename P, typename OffsetSize = uoffset_t>
|
||||
P GetPointer(voffset_t field) {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
auto p = data_ + field_offset;
|
||||
return field_offset ? reinterpret_cast<P>(p + ReadScalar<uoffset_t>(p))
|
||||
return field_offset ? reinterpret_cast<P>(p + ReadScalar<OffsetSize>(p))
|
||||
: nullptr;
|
||||
}
|
||||
template<typename P> P GetPointer(voffset_t field) const {
|
||||
return const_cast<Table *>(this)->GetPointer<P>(field);
|
||||
template<typename P, typename OffsetSize = uoffset_t>
|
||||
P GetPointer(voffset_t field) const {
|
||||
return const_cast<Table *>(this)->GetPointer<P, OffsetSize>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetPointer64(voffset_t field) {
|
||||
return GetPointer<P, uoffset64_t>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetPointer64(voffset_t field) const {
|
||||
return GetPointer<P, uoffset64_t>(field);
|
||||
}
|
||||
|
||||
template<typename P> P GetStruct(voffset_t field) const {
|
||||
|
@ -131,15 +141,25 @@ class Table {
|
|||
}
|
||||
|
||||
// Versions for offsets.
|
||||
template<typename OffsetT = uoffset_t>
|
||||
bool VerifyOffset(const Verifier &verifier, voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return !field_offset || verifier.VerifyOffset(data_, field_offset);
|
||||
return !field_offset || verifier.VerifyOffset<OffsetT>(data_, field_offset);
|
||||
}
|
||||
|
||||
template<typename OffsetT = uoffset_t>
|
||||
bool VerifyOffsetRequired(const Verifier &verifier, voffset_t field) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return verifier.Check(field_offset != 0) &&
|
||||
verifier.VerifyOffset(data_, field_offset);
|
||||
verifier.VerifyOffset<OffsetT>(data_, field_offset);
|
||||
}
|
||||
|
||||
bool VerifyOffset64(const Verifier &verifier, voffset_t field) const {
|
||||
return VerifyOffset<uoffset64_t>(verifier, field);
|
||||
}
|
||||
|
||||
bool VerifyOffset64Required(const Verifier &verifier, voffset_t field) const {
|
||||
return VerifyOffsetRequired<uoffset64_t>(verifier, field);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -27,15 +27,18 @@ struct String;
|
|||
|
||||
// An STL compatible iterator implementation for Vector below, effectively
|
||||
// calling Get() for every element.
|
||||
template<typename T, typename IT> struct VectorIterator {
|
||||
template<typename T, typename IT, typename Data = uint8_t *,
|
||||
typename SizeT = uoffset_t>
|
||||
struct VectorIterator {
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef IT value_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
typedef IT *pointer;
|
||||
typedef IT &reference;
|
||||
|
||||
VectorIterator(const uint8_t *data, uoffset_t i)
|
||||
: data_(data + IndirectHelper<T>::element_stride * i) {}
|
||||
static const SizeT element_stride = IndirectHelper<T>::element_stride;
|
||||
|
||||
VectorIterator(Data data, SizeT i) : data_(data + element_stride * i) {}
|
||||
VectorIterator(const VectorIterator &other) : data_(other.data_) {}
|
||||
VectorIterator() : data_(nullptr) {}
|
||||
|
||||
|
@ -62,7 +65,7 @@ template<typename T, typename IT> struct VectorIterator {
|
|||
}
|
||||
|
||||
difference_type operator-(const VectorIterator &other) const {
|
||||
return (data_ - other.data_) / IndirectHelper<T>::element_stride;
|
||||
return (data_ - other.data_) / element_stride;
|
||||
}
|
||||
|
||||
// Note: return type is incompatible with the standard
|
||||
|
@ -74,51 +77,52 @@ template<typename T, typename IT> struct VectorIterator {
|
|||
IT operator->() const { return IndirectHelper<T>::Read(data_, 0); }
|
||||
|
||||
VectorIterator &operator++() {
|
||||
data_ += IndirectHelper<T>::element_stride;
|
||||
data_ += element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator operator++(int) {
|
||||
VectorIterator temp(data_, 0);
|
||||
data_ += IndirectHelper<T>::element_stride;
|
||||
data_ += element_stride;
|
||||
return temp;
|
||||
}
|
||||
|
||||
VectorIterator operator+(const uoffset_t &offset) const {
|
||||
return VectorIterator(data_ + offset * IndirectHelper<T>::element_stride,
|
||||
0);
|
||||
VectorIterator operator+(const SizeT &offset) const {
|
||||
return VectorIterator(data_ + offset * element_stride, 0);
|
||||
}
|
||||
|
||||
VectorIterator &operator+=(const uoffset_t &offset) {
|
||||
data_ += offset * IndirectHelper<T>::element_stride;
|
||||
VectorIterator &operator+=(const SizeT &offset) {
|
||||
data_ += offset * element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator &operator--() {
|
||||
data_ -= IndirectHelper<T>::element_stride;
|
||||
data_ -= element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
VectorIterator operator--(int) {
|
||||
VectorIterator temp(data_, 0);
|
||||
data_ -= IndirectHelper<T>::element_stride;
|
||||
data_ -= element_stride;
|
||||
return temp;
|
||||
}
|
||||
|
||||
VectorIterator operator-(const uoffset_t &offset) const {
|
||||
return VectorIterator(data_ - offset * IndirectHelper<T>::element_stride,
|
||||
0);
|
||||
VectorIterator operator-(const SizeT &offset) const {
|
||||
return VectorIterator(data_ - offset * element_stride, 0);
|
||||
}
|
||||
|
||||
VectorIterator &operator-=(const uoffset_t &offset) {
|
||||
data_ -= offset * IndirectHelper<T>::element_stride;
|
||||
VectorIterator &operator-=(const SizeT &offset) {
|
||||
data_ -= offset * element_stride;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
const uint8_t *data_;
|
||||
Data data_;
|
||||
};
|
||||
|
||||
template<typename T, typename IT, typename SizeT = uoffset_t>
|
||||
using VectorConstIterator = VectorIterator<T, IT, const uint8_t *, SizeT>;
|
||||
|
||||
template<typename Iterator>
|
||||
struct VectorReverseIterator : public std::reverse_iterator<Iterator> {
|
||||
explicit VectorReverseIterator(Iterator iter)
|
||||
|
@ -141,11 +145,12 @@ struct VectorReverseIterator : public std::reverse_iterator<Iterator> {
|
|||
|
||||
// This is used as a helper type for accessing vectors.
|
||||
// Vector::data() assumes the vector elements start after the length field.
|
||||
template<typename T> class Vector {
|
||||
template<typename T, typename SizeT = uoffset_t> class Vector {
|
||||
public:
|
||||
typedef VectorIterator<T, typename IndirectHelper<T>::mutable_return_type>
|
||||
typedef VectorIterator<T, typename IndirectHelper<T>::mutable_return_type,
|
||||
uint8_t *, SizeT>
|
||||
iterator;
|
||||
typedef VectorIterator<T, typename IndirectHelper<T>::return_type>
|
||||
typedef VectorConstIterator<T, typename IndirectHelper<T>::return_type, SizeT>
|
||||
const_iterator;
|
||||
typedef VectorReverseIterator<iterator> reverse_iterator;
|
||||
typedef VectorReverseIterator<const_iterator> const_reverse_iterator;
|
||||
|
@ -156,39 +161,40 @@ template<typename T> class Vector {
|
|||
static FLATBUFFERS_CONSTEXPR bool is_span_observable =
|
||||
scalar_tag::value && (FLATBUFFERS_LITTLEENDIAN || sizeof(T) == 1);
|
||||
|
||||
uoffset_t size() const { return EndianScalar(length_); }
|
||||
SizeT size() const { return EndianScalar(length_); }
|
||||
|
||||
// Deprecated: use size(). Here for backwards compatibility.
|
||||
FLATBUFFERS_ATTRIBUTE([[deprecated("use size() instead")]])
|
||||
uoffset_t Length() const { return size(); }
|
||||
SizeT Length() const { return size(); }
|
||||
|
||||
typedef SizeT size_type;
|
||||
typedef typename IndirectHelper<T>::return_type return_type;
|
||||
typedef typename IndirectHelper<T>::mutable_return_type mutable_return_type;
|
||||
typedef return_type value_type;
|
||||
|
||||
return_type Get(uoffset_t i) const {
|
||||
return_type Get(SizeT i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return IndirectHelper<T>::Read(Data(), i);
|
||||
}
|
||||
|
||||
return_type operator[](uoffset_t i) const { return Get(i); }
|
||||
return_type operator[](SizeT i) const { return Get(i); }
|
||||
|
||||
// If this is a Vector of enums, T will be its storage type, not the enum
|
||||
// type. This function makes it convenient to retrieve value with enum
|
||||
// type E.
|
||||
template<typename E> E GetEnum(uoffset_t i) const {
|
||||
template<typename E> E GetEnum(SizeT i) const {
|
||||
return static_cast<E>(Get(i));
|
||||
}
|
||||
|
||||
// If this a vector of unions, this does the cast for you. There's no check
|
||||
// to make sure this is the right type!
|
||||
template<typename U> const U *GetAs(uoffset_t i) const {
|
||||
template<typename U> const U *GetAs(SizeT i) const {
|
||||
return reinterpret_cast<const U *>(Get(i));
|
||||
}
|
||||
|
||||
// If this a vector of unions, this does the cast for you. There's no check
|
||||
// to make sure this is actually a string!
|
||||
const String *GetAsString(uoffset_t i) const {
|
||||
const String *GetAsString(SizeT i) const {
|
||||
return reinterpret_cast<const String *>(Get(i));
|
||||
}
|
||||
|
||||
|
@ -222,7 +228,7 @@ template<typename T> class Vector {
|
|||
|
||||
// Change elements if you have a non-const pointer to this object.
|
||||
// Scalars only. See reflection.h, and the documentation.
|
||||
void Mutate(uoffset_t i, const T &val) {
|
||||
void Mutate(SizeT i, const T &val) {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
WriteScalar(data() + i, val);
|
||||
}
|
||||
|
@ -230,15 +236,15 @@ template<typename T> class Vector {
|
|||
// Change an element of a vector of tables (or strings).
|
||||
// "val" points to the new table/string, as you can obtain from
|
||||
// e.g. reflection::AddFlatBuffer().
|
||||
void MutateOffset(uoffset_t i, const uint8_t *val) {
|
||||
void MutateOffset(SizeT i, const uint8_t *val) {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
static_assert(sizeof(T) == sizeof(uoffset_t), "Unrelated types");
|
||||
static_assert(sizeof(T) == sizeof(SizeT), "Unrelated types");
|
||||
WriteScalar(data() + i,
|
||||
static_cast<uoffset_t>(val - (Data() + i * sizeof(uoffset_t))));
|
||||
static_cast<SizeT>(val - (Data() + i * sizeof(SizeT))));
|
||||
}
|
||||
|
||||
// Get a mutable pointer to tables/strings inside this vector.
|
||||
mutable_return_type GetMutableObject(uoffset_t i) const {
|
||||
mutable_return_type GetMutableObject(SizeT i) const {
|
||||
FLATBUFFERS_ASSERT(i < size());
|
||||
return const_cast<mutable_return_type>(IndirectHelper<T>::Read(Data(), i));
|
||||
}
|
||||
|
@ -276,7 +282,7 @@ template<typename T> class Vector {
|
|||
// try to construct these manually.
|
||||
Vector();
|
||||
|
||||
uoffset_t length_;
|
||||
SizeT length_;
|
||||
|
||||
private:
|
||||
// This class is a pointer. Copying will therefore create an invalid object.
|
||||
|
@ -295,6 +301,8 @@ template<typename T> class Vector {
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T> using Vector64 = Vector<T, uoffset64_t>;
|
||||
|
||||
template<class U>
|
||||
FLATBUFFERS_CONSTEXPR_CPP11 flatbuffers::span<U> make_span(Vector<U> &vec)
|
||||
FLATBUFFERS_NOEXCEPT {
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
#ifndef FLATBUFFERS_VECTOR_DOWNWARD_H_
|
||||
#define FLATBUFFERS_VECTOR_DOWNWARD_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
|
||||
#include "flatbuffers/base.h"
|
||||
#include "flatbuffers/default_allocator.h"
|
||||
#include "flatbuffers/detached_buffer.h"
|
||||
|
@ -29,13 +32,15 @@ namespace flatbuffers {
|
|||
// Since this vector leaves the lower part unused, we support a "scratch-pad"
|
||||
// that can be stored there for temporary data, to share the allocated space.
|
||||
// Essentially, this supports 2 std::vectors in a single buffer.
|
||||
class vector_downward {
|
||||
template<typename SizeT = uoffset_t> class vector_downward {
|
||||
public:
|
||||
explicit vector_downward(size_t initial_size, Allocator *allocator,
|
||||
bool own_allocator, size_t buffer_minalign)
|
||||
bool own_allocator, size_t buffer_minalign,
|
||||
const SizeT max_size = FLATBUFFERS_MAX_BUFFER_SIZE)
|
||||
: allocator_(allocator),
|
||||
own_allocator_(own_allocator),
|
||||
initial_size_(initial_size),
|
||||
max_size_(max_size),
|
||||
buffer_minalign_(buffer_minalign),
|
||||
reserved_(0),
|
||||
size_(0),
|
||||
|
@ -43,11 +48,12 @@ class vector_downward {
|
|||
cur_(nullptr),
|
||||
scratch_(nullptr) {}
|
||||
|
||||
vector_downward(vector_downward &&other)
|
||||
vector_downward(vector_downward &&other) noexcept
|
||||
// clang-format on
|
||||
: allocator_(other.allocator_),
|
||||
own_allocator_(other.own_allocator_),
|
||||
initial_size_(other.initial_size_),
|
||||
max_size_(other.max_size_),
|
||||
buffer_minalign_(other.buffer_minalign_),
|
||||
reserved_(other.reserved_),
|
||||
size_(other.size_),
|
||||
|
@ -64,7 +70,7 @@ class vector_downward {
|
|||
other.scratch_ = nullptr;
|
||||
}
|
||||
|
||||
vector_downward &operator=(vector_downward &&other) {
|
||||
vector_downward &operator=(vector_downward &&other) noexcept {
|
||||
// Move construct a temporary and swap idiom
|
||||
vector_downward temp(std::move(other));
|
||||
swap(temp);
|
||||
|
@ -109,7 +115,7 @@ class vector_downward {
|
|||
uint8_t *release_raw(size_t &allocated_bytes, size_t &offset) {
|
||||
auto *buf = buf_;
|
||||
allocated_bytes = reserved_;
|
||||
offset = static_cast<size_t>(cur_ - buf_);
|
||||
offset = vector_downward::offset();
|
||||
|
||||
// release_raw only relinquishes the buffer ownership.
|
||||
// Does not deallocate or reset the allocator. Destructor will do that.
|
||||
|
@ -134,10 +140,10 @@ class vector_downward {
|
|||
|
||||
size_t ensure_space(size_t len) {
|
||||
FLATBUFFERS_ASSERT(cur_ >= scratch_ && scratch_ >= buf_);
|
||||
if (len > static_cast<size_t>(cur_ - scratch_)) { reallocate(len); }
|
||||
// Beyond this, signed offsets may not have enough range:
|
||||
// (FlatBuffers > 2GB not supported).
|
||||
FLATBUFFERS_ASSERT(size() < FLATBUFFERS_MAX_BUFFER_SIZE);
|
||||
// If the length is larger than the unused part of the buffer, we need to
|
||||
// grow.
|
||||
if (len > unused_buffer_size()) { reallocate(len); }
|
||||
FLATBUFFERS_ASSERT(size() < max_size_);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
@ -145,7 +151,7 @@ class vector_downward {
|
|||
if (len) {
|
||||
ensure_space(len);
|
||||
cur_ -= len;
|
||||
size_ += static_cast<uoffset_t>(len);
|
||||
size_ += static_cast<SizeT>(len);
|
||||
}
|
||||
return cur_;
|
||||
}
|
||||
|
@ -153,12 +159,20 @@ class vector_downward {
|
|||
// Returns nullptr if using the DefaultAllocator.
|
||||
Allocator *get_custom_allocator() { return allocator_; }
|
||||
|
||||
inline uoffset_t size() const { return size_; }
|
||||
// The current offset into the buffer.
|
||||
size_t offset() const { return cur_ - buf_; }
|
||||
|
||||
uoffset_t scratch_size() const {
|
||||
return static_cast<uoffset_t>(scratch_ - buf_);
|
||||
// The total size of the vector (both the buffer and scratch parts).
|
||||
inline SizeT size() const { return size_; }
|
||||
|
||||
// The size of the buffer part of the vector that is currently unused.
|
||||
SizeT unused_buffer_size() const {
|
||||
return static_cast<SizeT>(cur_ - scratch_);
|
||||
}
|
||||
|
||||
// The size of the scratch part of the vector.
|
||||
SizeT scratch_size() const { return static_cast<SizeT>(scratch_ - buf_); }
|
||||
|
||||
size_t capacity() const { return reserved_; }
|
||||
|
||||
uint8_t *data() const {
|
||||
|
@ -209,7 +223,7 @@ class vector_downward {
|
|||
|
||||
void pop(size_t bytes_to_remove) {
|
||||
cur_ += bytes_to_remove;
|
||||
size_ -= static_cast<uoffset_t>(bytes_to_remove);
|
||||
size_ -= static_cast<SizeT>(bytes_to_remove);
|
||||
}
|
||||
|
||||
void scratch_pop(size_t bytes_to_remove) { scratch_ -= bytes_to_remove; }
|
||||
|
@ -222,6 +236,7 @@ class vector_downward {
|
|||
swap(buffer_minalign_, other.buffer_minalign_);
|
||||
swap(reserved_, other.reserved_);
|
||||
swap(size_, other.size_);
|
||||
swap(max_size_, other.max_size_);
|
||||
swap(buf_, other.buf_);
|
||||
swap(cur_, other.cur_);
|
||||
swap(scratch_, other.scratch_);
|
||||
|
@ -241,9 +256,12 @@ class vector_downward {
|
|||
Allocator *allocator_;
|
||||
bool own_allocator_;
|
||||
size_t initial_size_;
|
||||
|
||||
// The maximum size the vector can be.
|
||||
SizeT max_size_;
|
||||
size_t buffer_minalign_;
|
||||
size_t reserved_;
|
||||
uoffset_t size_;
|
||||
SizeT size_;
|
||||
uint8_t *buf_;
|
||||
uint8_t *cur_; // Points at location between empty (below) and used (above).
|
||||
uint8_t *scratch_; // Points to the end of the scratchpad in use.
|
||||
|
|
|
@ -34,12 +34,16 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
bool check_alignment = true;
|
||||
// If true, run verifier on nested flatbuffers
|
||||
bool check_nested_flatbuffers = true;
|
||||
// The maximum size of a buffer.
|
||||
size_t max_size = FLATBUFFERS_MAX_BUFFER_SIZE;
|
||||
// Use assertions to check for errors.
|
||||
bool assert = false;
|
||||
};
|
||||
|
||||
explicit Verifier(const uint8_t *const buf, const size_t buf_len,
|
||||
const Options &opts)
|
||||
: buf_(buf), size_(buf_len), opts_(opts) {
|
||||
FLATBUFFERS_ASSERT(size_ < FLATBUFFERS_MAX_BUFFER_SIZE);
|
||||
FLATBUFFERS_ASSERT(size_ < opts.max_size);
|
||||
}
|
||||
|
||||
// Deprecated API, please construct with Verifier::Options.
|
||||
|
@ -58,7 +62,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
bool Check(const bool ok) const {
|
||||
// clang-format off
|
||||
#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
|
||||
FLATBUFFERS_ASSERT(ok);
|
||||
if (opts_.assert) { FLATBUFFERS_ASSERT(ok); }
|
||||
#endif
|
||||
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
||||
if (!ok)
|
||||
|
@ -113,41 +117,43 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of any vector type.
|
||||
template<typename T> bool VerifyVector(const Vector<T> *const vec) const {
|
||||
return !vec || VerifyVectorOrString(reinterpret_cast<const uint8_t *>(vec),
|
||||
sizeof(T));
|
||||
template<int &..., typename T, typename LenT>
|
||||
bool VerifyVector(const Vector<T, LenT> *const vec) const {
|
||||
return !vec || VerifyVectorOrString<LenT>(
|
||||
reinterpret_cast<const uint8_t *>(vec), sizeof(T));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) of a vector to struct.
|
||||
template<typename T>
|
||||
bool VerifyVector(const Vector<const T *> *const vec) const {
|
||||
return VerifyVector(reinterpret_cast<const Vector<T> *>(vec));
|
||||
template<int &..., typename T, typename LenT>
|
||||
bool VerifyVector(const Vector<const T *, LenT> *const vec) const {
|
||||
return VerifyVector(reinterpret_cast<const Vector<T, LenT> *>(vec));
|
||||
}
|
||||
|
||||
// Verify a pointer (may be NULL) to string.
|
||||
bool VerifyString(const String *const str) const {
|
||||
size_t end;
|
||||
return !str || (VerifyVectorOrString(reinterpret_cast<const uint8_t *>(str),
|
||||
1, &end) &&
|
||||
return !str || (VerifyVectorOrString<uoffset_t>(
|
||||
reinterpret_cast<const uint8_t *>(str), 1, &end) &&
|
||||
Verify(end, 1) && // Must have terminator
|
||||
Check(buf_[end] == '\0')); // Terminating byte must be 0.
|
||||
}
|
||||
|
||||
// Common code between vectors and strings.
|
||||
template<typename LenT = uoffset_t>
|
||||
bool VerifyVectorOrString(const uint8_t *const vec, const size_t elem_size,
|
||||
size_t *const end = nullptr) const {
|
||||
const auto veco = static_cast<size_t>(vec - buf_);
|
||||
const auto vec_offset = static_cast<size_t>(vec - buf_);
|
||||
// Check we can read the size field.
|
||||
if (!Verify<uoffset_t>(veco)) return false;
|
||||
if (!Verify<LenT>(vec_offset)) return false;
|
||||
// Check the whole array. If this is a string, the byte past the array must
|
||||
// be 0.
|
||||
const auto size = ReadScalar<uoffset_t>(vec);
|
||||
const auto max_elems = FLATBUFFERS_MAX_BUFFER_SIZE / elem_size;
|
||||
const LenT size = ReadScalar<LenT>(vec);
|
||||
const auto max_elems = opts_.max_size / elem_size;
|
||||
if (!Check(size < max_elems))
|
||||
return false; // Protect against byte_size overflowing.
|
||||
const auto byte_size = sizeof(size) + elem_size * size;
|
||||
if (end) *end = veco + byte_size;
|
||||
return Verify(veco, byte_size);
|
||||
const auto byte_size = sizeof(LenT) + elem_size * size;
|
||||
if (end) *end = vec_offset + byte_size;
|
||||
return Verify(vec_offset, byte_size);
|
||||
}
|
||||
|
||||
// Special case for string contents, after the above has been called.
|
||||
|
@ -171,8 +177,8 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
return true;
|
||||
}
|
||||
|
||||
__suppress_ubsan__("unsigned-integer-overflow") bool VerifyTableStart(
|
||||
const uint8_t *const table) {
|
||||
FLATBUFFERS_SUPPRESS_UBSAN("unsigned-integer-overflow")
|
||||
bool VerifyTableStart(const uint8_t *const table) {
|
||||
// Check the vtable offset.
|
||||
const auto tableo = static_cast<size_t>(table - buf_);
|
||||
if (!Verify<soffset_t>(tableo)) return false;
|
||||
|
@ -203,7 +209,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
}
|
||||
|
||||
// Call T::Verify, which must be in the generated code for this type.
|
||||
const auto o = VerifyOffset(start);
|
||||
const auto o = VerifyOffset<uoffset_t>(start);
|
||||
return Check(o != 0) &&
|
||||
reinterpret_cast<const T *>(buf_ + start + o)->Verify(*this)
|
||||
// clang-format off
|
||||
|
@ -214,8 +220,8 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
// clang-format on
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool VerifyNestedFlatBuffer(const Vector<uint8_t> *const buf,
|
||||
template<typename T, int &..., typename SizeT>
|
||||
bool VerifyNestedFlatBuffer(const Vector<uint8_t, SizeT> *const buf,
|
||||
const char *const identifier) {
|
||||
// Caller opted out of this.
|
||||
if (!opts_.check_nested_flatbuffers) return true;
|
||||
|
@ -226,7 +232,7 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
// If there is a nested buffer, it must be greater than the min size.
|
||||
if (!Check(buf->size() >= FLATBUFFERS_MIN_BUFFER_SIZE)) return false;
|
||||
|
||||
Verifier nested_verifier(buf->data(), buf->size());
|
||||
Verifier nested_verifier(buf->data(), buf->size(), opts_);
|
||||
return nested_verifier.VerifyBuffer<T>(identifier);
|
||||
}
|
||||
|
||||
|
@ -237,29 +243,32 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
return VerifyBufferFromStart<T>(identifier, 0);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename T, typename SizeT = uoffset_t>
|
||||
bool VerifySizePrefixedBuffer(const char *const identifier) {
|
||||
return Verify<uoffset_t>(0U) &&
|
||||
Check(ReadScalar<uoffset_t>(buf_) == size_ - sizeof(uoffset_t)) &&
|
||||
VerifyBufferFromStart<T>(identifier, sizeof(uoffset_t));
|
||||
return Verify<SizeT>(0U) &&
|
||||
// Ensure the prefixed size is within the bounds of the provided
|
||||
// length.
|
||||
Check(ReadScalar<SizeT>(buf_) + sizeof(SizeT) <= size_) &&
|
||||
VerifyBufferFromStart<T>(identifier, sizeof(SizeT));
|
||||
}
|
||||
|
||||
uoffset_t VerifyOffset(const size_t start) const {
|
||||
if (!Verify<uoffset_t>(start)) return 0;
|
||||
const auto o = ReadScalar<uoffset_t>(buf_ + start);
|
||||
template<typename OffsetT = uoffset_t, typename SOffsetT = soffset_t>
|
||||
size_t VerifyOffset(const size_t start) const {
|
||||
if (!Verify<OffsetT>(start)) return 0;
|
||||
const auto o = ReadScalar<OffsetT>(buf_ + start);
|
||||
// May not point to itself.
|
||||
if (!Check(o != 0)) return 0;
|
||||
// Can't wrap around / buffers are max 2GB.
|
||||
if (!Check(static_cast<soffset_t>(o) >= 0)) return 0;
|
||||
// Can't wrap around larger than the max size.
|
||||
if (!Check(static_cast<SOffsetT>(o) >= 0)) return 0;
|
||||
// Must be inside the buffer to create a pointer from it (pointer outside
|
||||
// buffer is UB).
|
||||
if (!Verify(start + o, 1)) return 0;
|
||||
return o;
|
||||
}
|
||||
|
||||
uoffset_t VerifyOffset(const uint8_t *const base,
|
||||
const voffset_t start) const {
|
||||
return VerifyOffset(static_cast<size_t>(base - buf_) + start);
|
||||
template<typename OffsetT = uoffset_t>
|
||||
size_t VerifyOffset(const uint8_t *const base, const voffset_t start) const {
|
||||
return VerifyOffset<OffsetT>(static_cast<size_t>(base - buf_) + start);
|
||||
}
|
||||
|
||||
// Called at the start of a table to increase counters measuring data
|
||||
|
@ -312,6 +321,12 @@ class Verifier FLATBUFFERS_FINAL_CLASS {
|
|||
std::vector<uint8_t> *flex_reuse_tracker_ = nullptr;
|
||||
};
|
||||
|
||||
// Specialization for 64-bit offsets.
|
||||
template<>
|
||||
inline size_t Verifier::VerifyOffset<uoffset64_t>(const size_t start) const {
|
||||
return VerifyOffset<uoffset64_t, soffset64_t>(start);
|
||||
}
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_VERIFIER_H_
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
### 3rdparty updates
|
||||
|
||||
- simdjson: 3.7.0 ==> 3.8.0
|
||||
- flatbuffers: 2.0.8 ==> 24.3.25
|
||||
|
||||
## axmol-2.1.2 Feb.25 2024
|
||||
|
||||
|
|
|
@ -660,7 +660,7 @@ Frame* ActionTimelineCache::loadScaleFrameWithFlatBuffers(const flatbuffers::Sca
|
|||
ScaleFrame* frame = ScaleFrame::create();
|
||||
|
||||
auto f_scale = flatbuffers->scale();
|
||||
Vec2 scale(f_scale->scaleX(), f_scale->scaleY());
|
||||
Vec2 scale(f_scale->x(), f_scale->y());
|
||||
frame->setScaleX(scale.x);
|
||||
frame->setScaleY(scale.y);
|
||||
|
||||
|
@ -684,7 +684,7 @@ Frame* ActionTimelineCache::loadRotationSkewFrameWithFlatBuffers(const flatbuffe
|
|||
RotationSkewFrame* frame = RotationSkewFrame::create();
|
||||
|
||||
auto f_scale = flatbuffers->scale();
|
||||
Vec2 rotationSkew(f_scale->scaleX(), f_scale->scaleY());
|
||||
Vec2 rotationSkew(f_scale->x(), f_scale->y());
|
||||
frame->setSkewX(rotationSkew.x);
|
||||
frame->setSkewY(rotationSkew.y);
|
||||
|
||||
|
@ -829,7 +829,7 @@ Frame* ActionTimelineCache::loadAnchorPointFrameWithFlatBuffers(const flatbuffer
|
|||
AnchorPointFrame* frame = AnchorPointFrame::create();
|
||||
|
||||
auto f_scale = flatbuffers->scale();
|
||||
Vec2 scale(f_scale->scaleX(), f_scale->scaleY());
|
||||
Vec2 scale(f_scale->x(), f_scale->y());
|
||||
frame->setAnchorPoint(scale);
|
||||
|
||||
int frameIndex = flatbuffers->frameIndex();
|
||||
|
|
|
@ -33,10 +33,10 @@ THE SOFTWARE.
|
|||
#include "TimelineMacro.h"
|
||||
#include "cocostudio/CocosStudioExport.h"
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
class FlatBufferBuilder;
|
||||
|
||||
struct NodeAction;
|
||||
struct TimeLine;
|
||||
struct PointFrame;
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
#include "base/Data.h"
|
||||
#include "ui/UIWidget.h"
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
class FlatBufferBuilder;
|
||||
|
||||
struct NodeTree;
|
||||
|
||||
struct WidgetOptions;
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
// 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 == 2 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 0 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 8,
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
namespace flatbuffers {
|
||||
|
@ -21,19 +21,19 @@ struct LanguageItemBuilder;
|
|||
struct LanguageSet;
|
||||
struct LanguageSetBuilder;
|
||||
|
||||
struct LanguageItem FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct LanguageItem FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef LanguageItemBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_KEY = 4,
|
||||
VT_VALUE = 6
|
||||
};
|
||||
const flatbuffers::String *key() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_KEY);
|
||||
const ::flatbuffers::String *key() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_KEY);
|
||||
}
|
||||
const flatbuffers::String *value() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_VALUE);
|
||||
const ::flatbuffers::String *value() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_VALUE);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_KEY) &&
|
||||
verifier.VerifyString(key()) &&
|
||||
|
@ -45,37 +45,37 @@ struct LanguageItem FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct LanguageItemBuilder {
|
||||
typedef LanguageItem Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_key(flatbuffers::Offset<flatbuffers::String> key) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_key(::flatbuffers::Offset<::flatbuffers::String> key) {
|
||||
fbb_.AddOffset(LanguageItem::VT_KEY, key);
|
||||
}
|
||||
void add_value(flatbuffers::Offset<flatbuffers::String> value) {
|
||||
void add_value(::flatbuffers::Offset<::flatbuffers::String> value) {
|
||||
fbb_.AddOffset(LanguageItem::VT_VALUE, value);
|
||||
}
|
||||
explicit LanguageItemBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit LanguageItemBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<LanguageItem> Finish() {
|
||||
::flatbuffers::Offset<LanguageItem> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<LanguageItem>(end);
|
||||
auto o = ::flatbuffers::Offset<LanguageItem>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<LanguageItem> CreateLanguageItem(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::String> key = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> value = 0) {
|
||||
inline ::flatbuffers::Offset<LanguageItem> CreateLanguageItem(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<::flatbuffers::String> key = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> value = 0) {
|
||||
LanguageItemBuilder builder_(_fbb);
|
||||
builder_.add_value(value);
|
||||
builder_.add_key(key);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<LanguageItem> CreateLanguageItemDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
inline ::flatbuffers::Offset<LanguageItem> CreateLanguageItemDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const char *key = nullptr,
|
||||
const char *value = nullptr) {
|
||||
auto key__ = key ? _fbb.CreateString(key) : 0;
|
||||
|
@ -86,15 +86,15 @@ inline flatbuffers::Offset<LanguageItem> CreateLanguageItemDirect(
|
|||
value__);
|
||||
}
|
||||
|
||||
struct LanguageSet FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct LanguageSet FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef LanguageSetBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_LANGUAGEITEMS = 4
|
||||
};
|
||||
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::LanguageItem>> *languageItems() const {
|
||||
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::LanguageItem>> *>(VT_LANGUAGEITEMS);
|
||||
const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::LanguageItem>> *languageItems() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::LanguageItem>> *>(VT_LANGUAGEITEMS);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_LANGUAGEITEMS) &&
|
||||
verifier.VerifyVector(languageItems()) &&
|
||||
|
@ -105,66 +105,66 @@ struct LanguageSet FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct LanguageSetBuilder {
|
||||
typedef LanguageSet Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_languageItems(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::LanguageItem>>> languageItems) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_languageItems(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::LanguageItem>>> languageItems) {
|
||||
fbb_.AddOffset(LanguageSet::VT_LANGUAGEITEMS, languageItems);
|
||||
}
|
||||
explicit LanguageSetBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit LanguageSetBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<LanguageSet> Finish() {
|
||||
::flatbuffers::Offset<LanguageSet> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<LanguageSet>(end);
|
||||
auto o = ::flatbuffers::Offset<LanguageSet>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<LanguageSet> CreateLanguageSet(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::LanguageItem>>> languageItems = 0) {
|
||||
inline ::flatbuffers::Offset<LanguageSet> CreateLanguageSet(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::LanguageItem>>> languageItems = 0) {
|
||||
LanguageSetBuilder builder_(_fbb);
|
||||
builder_.add_languageItems(languageItems);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<LanguageSet> CreateLanguageSetDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const std::vector<flatbuffers::Offset<flatbuffers::LanguageItem>> *languageItems = nullptr) {
|
||||
auto languageItems__ = languageItems ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::LanguageItem>>(*languageItems) : 0;
|
||||
inline ::flatbuffers::Offset<LanguageSet> CreateLanguageSetDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const std::vector<::flatbuffers::Offset<flatbuffers::LanguageItem>> *languageItems = nullptr) {
|
||||
auto languageItems__ = languageItems ? _fbb.CreateVector<::flatbuffers::Offset<flatbuffers::LanguageItem>>(*languageItems) : 0;
|
||||
return flatbuffers::CreateLanguageSet(
|
||||
_fbb,
|
||||
languageItems__);
|
||||
}
|
||||
|
||||
inline const flatbuffers::LanguageSet *GetLanguageSet(const void *buf) {
|
||||
return flatbuffers::GetRoot<flatbuffers::LanguageSet>(buf);
|
||||
return ::flatbuffers::GetRoot<flatbuffers::LanguageSet>(buf);
|
||||
}
|
||||
|
||||
inline const flatbuffers::LanguageSet *GetSizePrefixedLanguageSet(const void *buf) {
|
||||
return flatbuffers::GetSizePrefixedRoot<flatbuffers::LanguageSet>(buf);
|
||||
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::LanguageSet>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyLanguageSetBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<flatbuffers::LanguageSet>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedLanguageSetBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<flatbuffers::LanguageSet>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishLanguageSetBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::LanguageSet> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::LanguageSet> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedLanguageSetBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::LanguageSet> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::LanguageSet> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
// 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 == 2 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 0 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 8,
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "CSParseBinary_generated.h"
|
||||
|
@ -35,7 +35,7 @@ struct GameNode3DOptionBuilder;
|
|||
struct Light3DOption;
|
||||
struct Light3DOptionBuilder;
|
||||
|
||||
struct Node3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct Node3DOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef Node3DOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODEOPTIONS = 4,
|
||||
|
@ -59,7 +59,7 @@ struct Node3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
int32_t cameramask() const {
|
||||
return GetField<int32_t>(VT_CAMERAMASK, 0);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODEOPTIONS) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
|
@ -73,9 +73,9 @@ struct Node3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct Node3DOptionBuilder {
|
||||
typedef Node3DOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
fbb_.AddOffset(Node3DOption::VT_NODEOPTIONS, nodeOptions);
|
||||
}
|
||||
void add_position3D(const flatbuffers::FVec3 *position3D) {
|
||||
|
@ -90,20 +90,20 @@ struct Node3DOptionBuilder {
|
|||
void add_cameramask(int32_t cameramask) {
|
||||
fbb_.AddElement<int32_t>(Node3DOption::VT_CAMERAMASK, cameramask, 0);
|
||||
}
|
||||
explicit Node3DOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit Node3DOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<Node3DOption> Finish() {
|
||||
::flatbuffers::Offset<Node3DOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<Node3DOption>(end);
|
||||
auto o = ::flatbuffers::Offset<Node3DOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<Node3DOption> CreateNode3DOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
inline ::flatbuffers::Offset<Node3DOption> CreateNode3DOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
const flatbuffers::FVec3 *position3D = nullptr,
|
||||
const flatbuffers::FVec3 *rotation3D = nullptr,
|
||||
const flatbuffers::FVec3 *scale3D = nullptr,
|
||||
|
@ -117,7 +117,7 @@ inline flatbuffers::Offset<Node3DOption> CreateNode3DOption(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct Sprite3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct Sprite3DOptions FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef Sprite3DOptionsBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODE3DOPTION = 4,
|
||||
|
@ -141,7 +141,7 @@ struct Sprite3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
int32_t lightFlag() const {
|
||||
return GetField<int32_t>(VT_LIGHTFLAG, 0);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODE3DOPTION) &&
|
||||
verifier.VerifyTable(node3DOption()) &&
|
||||
|
@ -156,12 +156,12 @@ struct Sprite3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct Sprite3DOptionsBuilder {
|
||||
typedef Sprite3DOptions Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
fbb_.AddOffset(Sprite3DOptions::VT_NODE3DOPTION, node3DOption);
|
||||
}
|
||||
void add_fileData(flatbuffers::Offset<flatbuffers::ResourceData> fileData) {
|
||||
void add_fileData(::flatbuffers::Offset<flatbuffers::ResourceData> fileData) {
|
||||
fbb_.AddOffset(Sprite3DOptions::VT_FILEDATA, fileData);
|
||||
}
|
||||
void add_runAction(bool runAction) {
|
||||
|
@ -173,21 +173,21 @@ struct Sprite3DOptionsBuilder {
|
|||
void add_lightFlag(int32_t lightFlag) {
|
||||
fbb_.AddElement<int32_t>(Sprite3DOptions::VT_LIGHTFLAG, lightFlag, 0);
|
||||
}
|
||||
explicit Sprite3DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit Sprite3DOptionsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<Sprite3DOptions> Finish() {
|
||||
::flatbuffers::Offset<Sprite3DOptions> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<Sprite3DOptions>(end);
|
||||
auto o = ::flatbuffers::Offset<Sprite3DOptions>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<Sprite3DOptions> CreateSprite3DOptions(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> fileData = 0,
|
||||
inline ::flatbuffers::Offset<Sprite3DOptions> CreateSprite3DOptions(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> fileData = 0,
|
||||
bool runAction = false,
|
||||
bool isFlipped = false,
|
||||
int32_t lightFlag = 0) {
|
||||
|
@ -200,7 +200,7 @@ inline flatbuffers::Offset<Sprite3DOptions> CreateSprite3DOptions(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct Particle3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct Particle3DOptions FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef Particle3DOptionsBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODE3DOPTION = 4,
|
||||
|
@ -212,7 +212,7 @@ struct Particle3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::ResourceData *fileData() const {
|
||||
return GetPointer<const flatbuffers::ResourceData *>(VT_FILEDATA);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODE3DOPTION) &&
|
||||
verifier.VerifyTable(node3DOption()) &&
|
||||
|
@ -224,36 +224,36 @@ struct Particle3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct Particle3DOptionsBuilder {
|
||||
typedef Particle3DOptions Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
fbb_.AddOffset(Particle3DOptions::VT_NODE3DOPTION, node3DOption);
|
||||
}
|
||||
void add_fileData(flatbuffers::Offset<flatbuffers::ResourceData> fileData) {
|
||||
void add_fileData(::flatbuffers::Offset<flatbuffers::ResourceData> fileData) {
|
||||
fbb_.AddOffset(Particle3DOptions::VT_FILEDATA, fileData);
|
||||
}
|
||||
explicit Particle3DOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit Particle3DOptionsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<Particle3DOptions> Finish() {
|
||||
::flatbuffers::Offset<Particle3DOptions> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<Particle3DOptions>(end);
|
||||
auto o = ::flatbuffers::Offset<Particle3DOptions>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<Particle3DOptions> CreateParticle3DOptions(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> fileData = 0) {
|
||||
inline ::flatbuffers::Offset<Particle3DOptions> CreateParticle3DOptions(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> fileData = 0) {
|
||||
Particle3DOptionsBuilder builder_(_fbb);
|
||||
builder_.add_fileData(fileData);
|
||||
builder_.add_node3DOption(node3DOption);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct UserCameraOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct UserCameraOptions FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef UserCameraOptionsBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODE3DOPTION = 4,
|
||||
|
@ -305,7 +305,7 @@ struct UserCameraOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::ResourceData *backFileData() const {
|
||||
return GetPointer<const flatbuffers::ResourceData *>(VT_BACKFILEDATA);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODE3DOPTION) &&
|
||||
verifier.VerifyTable(node3DOption()) &&
|
||||
|
@ -332,9 +332,9 @@ struct UserCameraOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct UserCameraOptionsBuilder {
|
||||
typedef UserCameraOptions Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_NODE3DOPTION, node3DOption);
|
||||
}
|
||||
void add_fov(float fov) {
|
||||
|
@ -352,49 +352,49 @@ struct UserCameraOptionsBuilder {
|
|||
void add_skyBoxEnabled(bool skyBoxEnabled) {
|
||||
fbb_.AddElement<uint8_t>(UserCameraOptions::VT_SKYBOXENABLED, static_cast<uint8_t>(skyBoxEnabled), 0);
|
||||
}
|
||||
void add_leftFileData(flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) {
|
||||
void add_leftFileData(::flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_LEFTFILEDATA, leftFileData);
|
||||
}
|
||||
void add_rightFileData(flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) {
|
||||
void add_rightFileData(::flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_RIGHTFILEDATA, rightFileData);
|
||||
}
|
||||
void add_upFileData(flatbuffers::Offset<flatbuffers::ResourceData> upFileData) {
|
||||
void add_upFileData(::flatbuffers::Offset<flatbuffers::ResourceData> upFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_UPFILEDATA, upFileData);
|
||||
}
|
||||
void add_downFileData(flatbuffers::Offset<flatbuffers::ResourceData> downFileData) {
|
||||
void add_downFileData(::flatbuffers::Offset<flatbuffers::ResourceData> downFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_DOWNFILEDATA, downFileData);
|
||||
}
|
||||
void add_forwardFileData(flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) {
|
||||
void add_forwardFileData(::flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_FORWARDFILEDATA, forwardFileData);
|
||||
}
|
||||
void add_backFileData(flatbuffers::Offset<flatbuffers::ResourceData> backFileData) {
|
||||
void add_backFileData(::flatbuffers::Offset<flatbuffers::ResourceData> backFileData) {
|
||||
fbb_.AddOffset(UserCameraOptions::VT_BACKFILEDATA, backFileData);
|
||||
}
|
||||
explicit UserCameraOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit UserCameraOptionsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<UserCameraOptions> Finish() {
|
||||
::flatbuffers::Offset<UserCameraOptions> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<UserCameraOptions>(end);
|
||||
auto o = ::flatbuffers::Offset<UserCameraOptions>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<UserCameraOptions> CreateUserCameraOptions(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
inline ::flatbuffers::Offset<UserCameraOptions> CreateUserCameraOptions(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
float fov = 60.0f,
|
||||
float nearClip = 1.0f,
|
||||
float farClip = 1000.0f,
|
||||
int32_t cameraFlag = 0,
|
||||
bool skyBoxEnabled = false,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0) {
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0) {
|
||||
UserCameraOptionsBuilder builder_(_fbb);
|
||||
builder_.add_backFileData(backFileData);
|
||||
builder_.add_forwardFileData(forwardFileData);
|
||||
|
@ -411,7 +411,7 @@ inline flatbuffers::Offset<UserCameraOptions> CreateUserCameraOptions(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
struct GameNode3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct GameNode3DOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef GameNode3DOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NAME = 4,
|
||||
|
@ -427,8 +427,8 @@ struct GameNode3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
VT_CUSTOMPROPERTY = 24,
|
||||
VT_USEDEFAULTLIGHT = 26
|
||||
};
|
||||
const flatbuffers::String *name() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_NAME);
|
||||
const ::flatbuffers::String *name() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_NAME);
|
||||
}
|
||||
int32_t skyBoxMask() const {
|
||||
return GetField<int32_t>(VT_SKYBOXMASK, 0);
|
||||
|
@ -454,16 +454,16 @@ struct GameNode3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::ResourceData *backFileData() const {
|
||||
return GetPointer<const flatbuffers::ResourceData *>(VT_BACKFILEDATA);
|
||||
}
|
||||
const flatbuffers::String *frameEvent() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_FRAMEEVENT);
|
||||
const ::flatbuffers::String *frameEvent() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_FRAMEEVENT);
|
||||
}
|
||||
const flatbuffers::String *customProperty() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_CUSTOMPROPERTY);
|
||||
const ::flatbuffers::String *customProperty() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_CUSTOMPROPERTY);
|
||||
}
|
||||
bool useDefaultLight() const {
|
||||
return GetField<uint8_t>(VT_USEDEFAULTLIGHT, 0) != 0;
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NAME) &&
|
||||
verifier.VerifyString(name()) &&
|
||||
|
@ -492,9 +492,9 @@ struct GameNode3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct GameNode3DOptionBuilder {
|
||||
typedef GameNode3DOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_name(flatbuffers::Offset<flatbuffers::String> name) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_name(::flatbuffers::Offset<::flatbuffers::String> name) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_NAME, name);
|
||||
}
|
||||
void add_skyBoxMask(int32_t skyBoxMask) {
|
||||
|
@ -503,57 +503,57 @@ struct GameNode3DOptionBuilder {
|
|||
void add_skyBoxEnabled(bool skyBoxEnabled) {
|
||||
fbb_.AddElement<uint8_t>(GameNode3DOption::VT_SKYBOXENABLED, static_cast<uint8_t>(skyBoxEnabled), 0);
|
||||
}
|
||||
void add_leftFileData(flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) {
|
||||
void add_leftFileData(::flatbuffers::Offset<flatbuffers::ResourceData> leftFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_LEFTFILEDATA, leftFileData);
|
||||
}
|
||||
void add_rightFileData(flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) {
|
||||
void add_rightFileData(::flatbuffers::Offset<flatbuffers::ResourceData> rightFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_RIGHTFILEDATA, rightFileData);
|
||||
}
|
||||
void add_upFileData(flatbuffers::Offset<flatbuffers::ResourceData> upFileData) {
|
||||
void add_upFileData(::flatbuffers::Offset<flatbuffers::ResourceData> upFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_UPFILEDATA, upFileData);
|
||||
}
|
||||
void add_downFileData(flatbuffers::Offset<flatbuffers::ResourceData> downFileData) {
|
||||
void add_downFileData(::flatbuffers::Offset<flatbuffers::ResourceData> downFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_DOWNFILEDATA, downFileData);
|
||||
}
|
||||
void add_forwardFileData(flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) {
|
||||
void add_forwardFileData(::flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_FORWARDFILEDATA, forwardFileData);
|
||||
}
|
||||
void add_backFileData(flatbuffers::Offset<flatbuffers::ResourceData> backFileData) {
|
||||
void add_backFileData(::flatbuffers::Offset<flatbuffers::ResourceData> backFileData) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_BACKFILEDATA, backFileData);
|
||||
}
|
||||
void add_frameEvent(flatbuffers::Offset<flatbuffers::String> frameEvent) {
|
||||
void add_frameEvent(::flatbuffers::Offset<::flatbuffers::String> frameEvent) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_FRAMEEVENT, frameEvent);
|
||||
}
|
||||
void add_customProperty(flatbuffers::Offset<flatbuffers::String> customProperty) {
|
||||
void add_customProperty(::flatbuffers::Offset<::flatbuffers::String> customProperty) {
|
||||
fbb_.AddOffset(GameNode3DOption::VT_CUSTOMPROPERTY, customProperty);
|
||||
}
|
||||
void add_useDefaultLight(bool useDefaultLight) {
|
||||
fbb_.AddElement<uint8_t>(GameNode3DOption::VT_USEDEFAULTLIGHT, static_cast<uint8_t>(useDefaultLight), 0);
|
||||
}
|
||||
explicit GameNode3DOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit GameNode3DOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<GameNode3DOption> Finish() {
|
||||
::flatbuffers::Offset<GameNode3DOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<GameNode3DOption>(end);
|
||||
auto o = ::flatbuffers::Offset<GameNode3DOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::String> name = 0,
|
||||
inline ::flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<::flatbuffers::String> name = 0,
|
||||
int32_t skyBoxMask = 0,
|
||||
bool skyBoxEnabled = false,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> frameEvent = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> customProperty = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> frameEvent = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> customProperty = 0,
|
||||
bool useDefaultLight = false) {
|
||||
GameNode3DOptionBuilder builder_(_fbb);
|
||||
builder_.add_customProperty(customProperty);
|
||||
|
@ -571,17 +571,17 @@ inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOption(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOptionDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
inline ::flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOptionDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
const char *name = nullptr,
|
||||
int32_t skyBoxMask = 0,
|
||||
bool skyBoxEnabled = false,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> leftFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> rightFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> upFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> downFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> forwardFileData = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> backFileData = 0,
|
||||
const char *frameEvent = nullptr,
|
||||
const char *customProperty = nullptr,
|
||||
bool useDefaultLight = false) {
|
||||
|
@ -604,7 +604,7 @@ inline flatbuffers::Offset<GameNode3DOption> CreateGameNode3DOptionDirect(
|
|||
useDefaultLight);
|
||||
}
|
||||
|
||||
struct Light3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct Light3DOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef Light3DOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODE3DOPTION = 4,
|
||||
|
@ -636,7 +636,7 @@ struct Light3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
float outerAngle() const {
|
||||
return GetField<float>(VT_OUTERANGLE, 0.0f);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODE3DOPTION) &&
|
||||
verifier.VerifyTable(node3DOption()) &&
|
||||
|
@ -652,9 +652,9 @@ struct Light3DOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct Light3DOptionBuilder {
|
||||
typedef Light3DOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_node3DOption(::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption) {
|
||||
fbb_.AddOffset(Light3DOption::VT_NODE3DOPTION, node3DOption);
|
||||
}
|
||||
void add_enabled(bool enabled) {
|
||||
|
@ -675,20 +675,20 @@ struct Light3DOptionBuilder {
|
|||
void add_outerAngle(float outerAngle) {
|
||||
fbb_.AddElement<float>(Light3DOption::VT_OUTERANGLE, outerAngle, 0.0f);
|
||||
}
|
||||
explicit Light3DOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit Light3DOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<Light3DOption> Finish() {
|
||||
::flatbuffers::Offset<Light3DOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<Light3DOption>(end);
|
||||
auto o = ::flatbuffers::Offset<Light3DOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<Light3DOption> CreateLight3DOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
inline ::flatbuffers::Offset<Light3DOption> CreateLight3DOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> node3DOption = 0,
|
||||
bool enabled = false,
|
||||
int32_t type = 0,
|
||||
int32_t flag = 0,
|
||||
|
@ -707,32 +707,32 @@ inline flatbuffers::Offset<Light3DOption> CreateLight3DOption(
|
|||
}
|
||||
|
||||
inline const flatbuffers::Node3DOption *GetNode3DOption(const void *buf) {
|
||||
return flatbuffers::GetRoot<flatbuffers::Node3DOption>(buf);
|
||||
return ::flatbuffers::GetRoot<flatbuffers::Node3DOption>(buf);
|
||||
}
|
||||
|
||||
inline const flatbuffers::Node3DOption *GetSizePrefixedNode3DOption(const void *buf) {
|
||||
return flatbuffers::GetSizePrefixedRoot<flatbuffers::Node3DOption>(buf);
|
||||
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::Node3DOption>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyNode3DOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<flatbuffers::Node3DOption>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedNode3DOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<flatbuffers::Node3DOption>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishNode3DOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedNode3DOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::Node3DOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::Node3DOption> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -849,7 +849,7 @@ Offset<flatbuffers::ScaleFrame> FlatBuffersSerialize::createScaleFrame(pugi::xml
|
|||
attribute = attribute.next_attribute();
|
||||
}
|
||||
|
||||
Scale f_scale(scale.x, scale.y);
|
||||
FVec2 f_scale(scale.x, scale.y);
|
||||
|
||||
return CreateScaleFrame(*_builder, frameIndex, tween, &f_scale, createEasingData(objectData.first_child()));
|
||||
}
|
||||
|
|
|
@ -35,13 +35,10 @@
|
|||
|
||||
#include "pugixml/pugixml.hpp"
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
class FlatBufferBuilder;
|
||||
template <typename T>
|
||||
struct Offset;
|
||||
struct String;
|
||||
|
||||
struct CSParseBinary;
|
||||
struct NodeTree;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
// 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 == 2 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 0 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 8,
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "cocostudio/CSParseBinary_generated.h"
|
||||
|
@ -23,7 +23,7 @@ struct CSArmatureNodeOptionBuilder;
|
|||
struct ResourceItemData;
|
||||
struct ResourceItemDataBuilder;
|
||||
|
||||
struct CSArmatureNodeOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct CSArmatureNodeOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef CSArmatureNodeOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODEOPTIONS = 4,
|
||||
|
@ -47,11 +47,11 @@ struct CSArmatureNodeOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table
|
|||
bool isAutoPlay() const {
|
||||
return GetField<uint8_t>(VT_ISAUTOPLAY, 1) != 0;
|
||||
}
|
||||
const flatbuffers::String *currentAnimationName() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_CURRENTANIMATIONNAME);
|
||||
const ::flatbuffers::String *currentAnimationName() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_CURRENTANIMATIONNAME);
|
||||
}
|
||||
const flatbuffers::String *currentArmatureName() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_CURRENTARMATURENAME);
|
||||
const ::flatbuffers::String *currentArmatureName() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_CURRENTARMATURENAME);
|
||||
}
|
||||
float timeScale() const {
|
||||
return GetField<float>(VT_TIMESCALE, 0.0f);
|
||||
|
@ -59,7 +59,7 @@ struct CSArmatureNodeOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table
|
|||
float armatureScale() const {
|
||||
return GetField<float>(VT_ARMATURESCALE, 0.0f);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODEOPTIONS) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
|
@ -79,12 +79,12 @@ struct CSArmatureNodeOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table
|
|||
|
||||
struct CSArmatureNodeOptionBuilder {
|
||||
typedef CSArmatureNodeOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
fbb_.AddOffset(CSArmatureNodeOption::VT_NODEOPTIONS, nodeOptions);
|
||||
}
|
||||
void add_fileData(flatbuffers::Offset<flatbuffers::ResourceItemData> fileData) {
|
||||
void add_fileData(::flatbuffers::Offset<flatbuffers::ResourceItemData> fileData) {
|
||||
fbb_.AddOffset(CSArmatureNodeOption::VT_FILEDATA, fileData);
|
||||
}
|
||||
void add_isLoop(bool isLoop) {
|
||||
|
@ -93,10 +93,10 @@ struct CSArmatureNodeOptionBuilder {
|
|||
void add_isAutoPlay(bool isAutoPlay) {
|
||||
fbb_.AddElement<uint8_t>(CSArmatureNodeOption::VT_ISAUTOPLAY, static_cast<uint8_t>(isAutoPlay), 1);
|
||||
}
|
||||
void add_currentAnimationName(flatbuffers::Offset<flatbuffers::String> currentAnimationName) {
|
||||
void add_currentAnimationName(::flatbuffers::Offset<::flatbuffers::String> currentAnimationName) {
|
||||
fbb_.AddOffset(CSArmatureNodeOption::VT_CURRENTANIMATIONNAME, currentAnimationName);
|
||||
}
|
||||
void add_currentArmatureName(flatbuffers::Offset<flatbuffers::String> currentArmatureName) {
|
||||
void add_currentArmatureName(::flatbuffers::Offset<::flatbuffers::String> currentArmatureName) {
|
||||
fbb_.AddOffset(CSArmatureNodeOption::VT_CURRENTARMATURENAME, currentArmatureName);
|
||||
}
|
||||
void add_timeScale(float timeScale) {
|
||||
|
@ -105,25 +105,25 @@ struct CSArmatureNodeOptionBuilder {
|
|||
void add_armatureScale(float armatureScale) {
|
||||
fbb_.AddElement<float>(CSArmatureNodeOption::VT_ARMATURESCALE, armatureScale, 0.0f);
|
||||
}
|
||||
explicit CSArmatureNodeOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit CSArmatureNodeOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<CSArmatureNodeOption> Finish() {
|
||||
::flatbuffers::Offset<CSArmatureNodeOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<CSArmatureNodeOption>(end);
|
||||
auto o = ::flatbuffers::Offset<CSArmatureNodeOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceItemData> fileData = 0,
|
||||
inline ::flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceItemData> fileData = 0,
|
||||
bool isLoop = true,
|
||||
bool isAutoPlay = true,
|
||||
flatbuffers::Offset<flatbuffers::String> currentAnimationName = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> currentArmatureName = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> currentAnimationName = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> currentArmatureName = 0,
|
||||
float timeScale = 0.0f,
|
||||
float armatureScale = 0.0f) {
|
||||
CSArmatureNodeOptionBuilder builder_(_fbb);
|
||||
|
@ -138,10 +138,10 @@ inline flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOption(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOptionDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceItemData> fileData = 0,
|
||||
inline ::flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOptionDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceItemData> fileData = 0,
|
||||
bool isLoop = true,
|
||||
bool isAutoPlay = true,
|
||||
const char *currentAnimationName = nullptr,
|
||||
|
@ -162,7 +162,7 @@ inline flatbuffers::Offset<CSArmatureNodeOption> CreateCSArmatureNodeOptionDirec
|
|||
armatureScale);
|
||||
}
|
||||
|
||||
struct ResourceItemData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct ResourceItemData FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef ResourceItemDataBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_TYPE = 4,
|
||||
|
@ -171,10 +171,10 @@ struct ResourceItemData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
int32_t type() const {
|
||||
return GetField<int32_t>(VT_TYPE, 0);
|
||||
}
|
||||
const flatbuffers::String *path() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_PATH);
|
||||
const ::flatbuffers::String *path() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_PATH);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyField<int32_t>(verifier, VT_TYPE, 4) &&
|
||||
VerifyOffset(verifier, VT_PATH) &&
|
||||
|
@ -185,37 +185,37 @@ struct ResourceItemData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct ResourceItemDataBuilder {
|
||||
typedef ResourceItemData Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_type(int32_t type) {
|
||||
fbb_.AddElement<int32_t>(ResourceItemData::VT_TYPE, type, 0);
|
||||
}
|
||||
void add_path(flatbuffers::Offset<flatbuffers::String> path) {
|
||||
void add_path(::flatbuffers::Offset<::flatbuffers::String> path) {
|
||||
fbb_.AddOffset(ResourceItemData::VT_PATH, path);
|
||||
}
|
||||
explicit ResourceItemDataBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit ResourceItemDataBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<ResourceItemData> Finish() {
|
||||
::flatbuffers::Offset<ResourceItemData> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<ResourceItemData>(end);
|
||||
auto o = ::flatbuffers::Offset<ResourceItemData>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<ResourceItemData> CreateResourceItemData(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
inline ::flatbuffers::Offset<ResourceItemData> CreateResourceItemData(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
int32_t type = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> path = 0) {
|
||||
::flatbuffers::Offset<::flatbuffers::String> path = 0) {
|
||||
ResourceItemDataBuilder builder_(_fbb);
|
||||
builder_.add_path(path);
|
||||
builder_.add_type(type);
|
||||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<ResourceItemData> CreateResourceItemDataDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
inline ::flatbuffers::Offset<ResourceItemData> CreateResourceItemDataDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
int32_t type = 0,
|
||||
const char *path = nullptr) {
|
||||
auto path__ = path ? _fbb.CreateString(path) : 0;
|
||||
|
@ -226,32 +226,32 @@ inline flatbuffers::Offset<ResourceItemData> CreateResourceItemDataDirect(
|
|||
}
|
||||
|
||||
inline const flatbuffers::CSArmatureNodeOption *GetCSArmatureNodeOption(const void *buf) {
|
||||
return flatbuffers::GetRoot<flatbuffers::CSArmatureNodeOption>(buf);
|
||||
return ::flatbuffers::GetRoot<flatbuffers::CSArmatureNodeOption>(buf);
|
||||
}
|
||||
|
||||
inline const flatbuffers::CSArmatureNodeOption *GetSizePrefixedCSArmatureNodeOption(const void *buf) {
|
||||
return flatbuffers::GetSizePrefixedRoot<flatbuffers::CSArmatureNodeOption>(buf);
|
||||
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::CSArmatureNodeOption>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyCSArmatureNodeOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<flatbuffers::CSArmatureNodeOption>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedCSArmatureNodeOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<flatbuffers::CSArmatureNodeOption>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishCSArmatureNodeOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::CSArmatureNodeOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::CSArmatureNodeOption> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedCSArmatureNodeOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::CSArmatureNodeOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::CSArmatureNodeOption> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
|
|
|
@ -528,7 +528,7 @@ Offset<Table> LayoutReader::createOptionsWithFlatBuffers(pugi::xml_node objectDa
|
|||
Color f_bgColor(255, bgColor.r, bgColor.g, bgColor.b);
|
||||
Color f_bgStartColor(255, bgStartColor.r, bgStartColor.g, bgStartColor.b);
|
||||
Color f_bgEndColor(255, bgEndColor.r, bgEndColor.g, bgEndColor.b);
|
||||
ColorVector f_colorVector(colorVector.x, colorVector.y);
|
||||
FVec2 f_colorVector(colorVector.x, colorVector.y);
|
||||
CapInsets f_capInsets(capInsets.origin.x, capInsets.origin.y, capInsets.size.width, capInsets.size.height);
|
||||
FlatSize f_scale9Size(scale9Size.width, scale9Size.height);
|
||||
|
||||
|
@ -560,7 +560,7 @@ void LayoutReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::Ta
|
|||
Color3B bgEndColor(f_bgEndColor->r(), f_bgEndColor->g(), f_bgEndColor->b());
|
||||
|
||||
auto f_colorVecor = options->colorVector();
|
||||
Vec2 colorVector(f_colorVecor->vectorX(), f_colorVecor->vectorY());
|
||||
Vec2 colorVector(f_colorVecor->x(), f_colorVecor->y());
|
||||
panel->setBackGroundColorVector(colorVector);
|
||||
|
||||
int bgColorOpacity = options->bgColorOpacity();
|
||||
|
|
|
@ -365,7 +365,7 @@ Offset<Table> ListViewReader::createOptionsWithFlatBuffers(pugi::xml_node object
|
|||
Color f_bgColor(255, bgColor.r, bgColor.g, bgColor.b);
|
||||
Color f_bgStartColor(255, bgStartColor.r, bgStartColor.g, bgStartColor.b);
|
||||
Color f_bgEndColor(255, bgEndColor.r, bgEndColor.g, bgEndColor.b);
|
||||
ColorVector f_colorVector(colorVector.x, colorVector.y);
|
||||
FVec2 f_colorVector(colorVector.x, colorVector.y);
|
||||
CapInsets f_capInsets(capInsets.origin.x, capInsets.origin.y, capInsets.size.width, capInsets.size.height);
|
||||
FlatSize f_scale9Size(scale9Size.width, scale9Size.height);
|
||||
FlatSize f_innerSize(innerSize.width, innerSize.height);
|
||||
|
@ -400,7 +400,7 @@ void ListViewReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::
|
|||
Color3B bgEndColor(f_bgEndColor->r(), f_bgEndColor->g(), f_bgEndColor->b());
|
||||
|
||||
auto f_colorVecor = options->colorVector();
|
||||
Vec2 colorVector(f_colorVecor->vectorX(), f_colorVecor->vectorY());
|
||||
Vec2 colorVector(f_colorVecor->x(), f_colorVecor->y());
|
||||
listView->setBackGroundColorVector(colorVector);
|
||||
|
||||
int bgColorOpacity = options->bgColorOpacity();
|
||||
|
|
|
@ -254,10 +254,10 @@ Offset<Table> Node3DReader::createOptionsWithFlatBuffersForNode(pugi::xml_node o
|
|||
child = child.next_sibling();
|
||||
}
|
||||
|
||||
RotationSkew f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_position(position.x, position.y);
|
||||
Scale f_scale(scale.x, scale.y);
|
||||
AnchorPoint f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
FVec2 f_scale(scale.x, scale.y);
|
||||
FVec2 f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
Color f_color(color.a, color.r, color.g, color.b);
|
||||
FlatSize f_size(size.x, size.y);
|
||||
auto f_layoutComponent = CreateLayoutComponentTable(
|
||||
|
|
|
@ -410,10 +410,10 @@ Offset<Table> NodeReader::createOptionsWithFlatBuffers(pugi::xml_node objectData
|
|||
child = child.next_sibling();
|
||||
}
|
||||
|
||||
RotationSkew f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_position(position.x, position.y);
|
||||
Scale f_scale(scale.x, scale.y);
|
||||
AnchorPoint f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
FVec2 f_scale(scale.x, scale.y);
|
||||
FVec2 f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
Color f_color(color.a, color.r, color.g, color.b);
|
||||
FlatSize f_size(size.x, size.y);
|
||||
auto f_layoutComponent = CreateLayoutComponentTable(
|
||||
|
@ -438,13 +438,13 @@ void NodeReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::Tabl
|
|||
std::string name = options->name()->c_str();
|
||||
float x = options->position()->x();
|
||||
float y = options->position()->y();
|
||||
float scalex = options->scale()->scaleX();
|
||||
float scaley = options->scale()->scaleY();
|
||||
float scalex = options->scale()->x();
|
||||
float scaley = options->scale()->y();
|
||||
// float rotation = options.rotation();
|
||||
float rotationSkewX = options->rotationSkew()->rotationSkewX();
|
||||
float rotationSkewY = options->rotationSkew()->rotationSkewY();
|
||||
float anchorx = options->anchorPoint()->scaleX();
|
||||
float anchory = options->anchorPoint()->scaleY();
|
||||
float rotationSkewX = options->rotationSkew()->x();
|
||||
float rotationSkewY = options->rotationSkew()->y();
|
||||
float anchorx = options->anchorPoint()->x();
|
||||
float anchory = options->anchorPoint()->y();
|
||||
int zorder = options->zOrder();
|
||||
int tag = options->tag();
|
||||
int actionTag = options->actionTag();
|
||||
|
|
|
@ -32,16 +32,12 @@
|
|||
#include "pugixml/pugixml.hpp"
|
||||
#include "pugixml/pugiext.hpp"
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
#define CCS_DEF_FONT "Microsoft YaHei"
|
||||
|
||||
namespace flatbuffers
|
||||
{
|
||||
class FlatBufferBuilder;
|
||||
template <typename T>
|
||||
struct Offset;
|
||||
|
||||
class Table;
|
||||
|
||||
struct ResourceData; // x-studio spec, csb batch load support, assets hook functions.
|
||||
} // namespace flatbuffers
|
||||
|
||||
|
|
|
@ -281,7 +281,7 @@ Offset<Table> PageViewReader::createOptionsWithFlatBuffers(pugi::xml_node object
|
|||
Color f_bgColor(255, bgColor.r, bgColor.g, bgColor.b);
|
||||
Color f_bgStartColor(255, bgStartColor.r, bgStartColor.g, bgStartColor.b);
|
||||
Color f_bgEndColor(255, bgEndColor.r, bgEndColor.g, bgEndColor.b);
|
||||
ColorVector f_colorVector(colorVector.x, colorVector.y);
|
||||
FVec2 f_colorVector(colorVector.x, colorVector.y);
|
||||
CapInsets f_capInsets(capInsets.origin.x, capInsets.origin.y, capInsets.size.width, capInsets.size.height);
|
||||
FlatSize f_scale9Size(scale9Size.width, scale9Size.height);
|
||||
|
||||
|
@ -313,7 +313,7 @@ void PageViewReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::
|
|||
Color3B bgEndColor(f_bgEndColor->r(), f_bgEndColor->g(), f_bgEndColor->b());
|
||||
|
||||
auto f_colorVecor = options->colorVector();
|
||||
Vec2 colorVector(f_colorVecor->vectorX(), f_colorVecor->vectorY());
|
||||
Vec2 colorVector(f_colorVecor->x(), f_colorVecor->y());
|
||||
pageView->setBackGroundColorVector(colorVector);
|
||||
|
||||
int bgColorOpacity = options->bgColorOpacity();
|
||||
|
|
|
@ -378,7 +378,7 @@ Offset<Table> ScrollViewReader::createOptionsWithFlatBuffers(pugi::xml_node obje
|
|||
Color f_bgColor(255, bgColor.r, bgColor.g, bgColor.b);
|
||||
Color f_bgStartColor(255, bgStartColor.r, bgStartColor.g, bgStartColor.b);
|
||||
Color f_bgEndColor(255, bgEndColor.r, bgEndColor.g, bgEndColor.b);
|
||||
ColorVector f_colorVector(colorVector.x, colorVector.y);
|
||||
FVec2 f_colorVector(colorVector.x, colorVector.y);
|
||||
CapInsets f_capInsets(capInsets.origin.x, capInsets.origin.y, capInsets.size.width, capInsets.size.height);
|
||||
FlatSize f_scale9Size(scale9Size.width, scale9Size.height);
|
||||
FlatSize f_innerSize(innerSize.width, innerSize.height);
|
||||
|
@ -412,7 +412,7 @@ void ScrollViewReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers
|
|||
Color3B bgEndColor(f_bgEndColor->r(), f_bgEndColor->g(), f_bgEndColor->b());
|
||||
|
||||
auto f_colorVecor = options->colorVector();
|
||||
Vec2 colorVector(f_colorVecor->vectorX(), f_colorVecor->vectorY());
|
||||
Vec2 colorVector(f_colorVecor->x(), f_colorVecor->y());
|
||||
scrollView->setBackGroundColorVector(colorVector);
|
||||
|
||||
int bgColorOpacity = options->bgColorOpacity();
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
// 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 == 2 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 0 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 8,
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "cocostudio/CSParseBinary_generated.h"
|
||||
|
@ -20,7 +20,7 @@ namespace flatbuffers {
|
|||
struct BoneOptions;
|
||||
struct BoneOptionsBuilder;
|
||||
|
||||
struct BoneOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct BoneOptions FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef BoneOptionsBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODEOPTIONS = 4,
|
||||
|
@ -36,7 +36,7 @@ struct BoneOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::BlendFunc *blendFunc() const {
|
||||
return GetStruct<const flatbuffers::BlendFunc *>(VT_BLENDFUNC);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODEOPTIONS) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
|
@ -48,9 +48,9 @@ struct BoneOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct BoneOptionsBuilder {
|
||||
typedef BoneOptions Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
fbb_.AddOffset(BoneOptions::VT_NODEOPTIONS, nodeOptions);
|
||||
}
|
||||
void add_length(float length) {
|
||||
|
@ -59,20 +59,20 @@ struct BoneOptionsBuilder {
|
|||
void add_blendFunc(const flatbuffers::BlendFunc *blendFunc) {
|
||||
fbb_.AddStruct(BoneOptions::VT_BLENDFUNC, blendFunc);
|
||||
}
|
||||
explicit BoneOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit BoneOptionsBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<BoneOptions> Finish() {
|
||||
::flatbuffers::Offset<BoneOptions> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<BoneOptions>(end);
|
||||
auto o = ::flatbuffers::Offset<BoneOptions>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<BoneOptions> CreateBoneOptions(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
inline ::flatbuffers::Offset<BoneOptions> CreateBoneOptions(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
float length = 0.0f,
|
||||
const flatbuffers::BlendFunc *blendFunc = nullptr) {
|
||||
BoneOptionsBuilder builder_(_fbb);
|
||||
|
@ -83,32 +83,32 @@ inline flatbuffers::Offset<BoneOptions> CreateBoneOptions(
|
|||
}
|
||||
|
||||
inline const flatbuffers::BoneOptions *GetBoneOptions(const void *buf) {
|
||||
return flatbuffers::GetRoot<flatbuffers::BoneOptions>(buf);
|
||||
return ::flatbuffers::GetRoot<flatbuffers::BoneOptions>(buf);
|
||||
}
|
||||
|
||||
inline const flatbuffers::BoneOptions *GetSizePrefixedBoneOptions(const void *buf) {
|
||||
return flatbuffers::GetSizePrefixedRoot<flatbuffers::BoneOptions>(buf);
|
||||
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::BoneOptions>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyBoneOptionsBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<flatbuffers::BoneOptions>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedBoneOptionsBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<flatbuffers::BoneOptions>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishBoneOptionsBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::BoneOptions> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::BoneOptions> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedBoneOptionsBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::BoneOptions> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::BoneOptions> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
|
|
|
@ -221,8 +221,8 @@ void SpineSkeletonReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuff
|
|||
uint8_t green = (uint8_t)nodeOptions->color()->g();
|
||||
uint8_t blue = (uint8_t)nodeOptions->color()->b();
|
||||
|
||||
implNode->setScaleX(nodeOptions->scale()->scaleX());
|
||||
implNode->setScaleY(nodeOptions->scale()->scaleY());
|
||||
implNode->setScaleX(nodeOptions->scale()->x());
|
||||
implNode->setScaleY(nodeOptions->scale()->y());
|
||||
|
||||
implNode->setColor(Color3B(red, green, blue));
|
||||
implNode->setOpacity(alpha);
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
// 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 == 2 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 0 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 8,
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 24 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 25,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "cocostudio/CSParseBinary_generated.h"
|
||||
|
@ -26,7 +26,7 @@ struct TabHeaderOptionBuilder;
|
|||
struct TabItemOption;
|
||||
struct TabItemOptionBuilder;
|
||||
|
||||
struct TabControlOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct TabControlOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef TabControlOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODEOPTIONS = 4,
|
||||
|
@ -59,10 +59,10 @@ struct TabControlOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
uint8_t ignoreHeaderTextureSize() const {
|
||||
return GetField<uint8_t>(VT_IGNOREHEADERTEXTURESIZE, 0);
|
||||
}
|
||||
const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::TabItemOption>> *tabItems() const {
|
||||
return GetPointer<const flatbuffers::Vector<flatbuffers::Offset<flatbuffers::TabItemOption>> *>(VT_TABITEMS);
|
||||
const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::TabItemOption>> *tabItems() const {
|
||||
return GetPointer<const ::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::TabItemOption>> *>(VT_TABITEMS);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODEOPTIONS) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
|
@ -81,9 +81,9 @@ struct TabControlOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct TabControlOptionBuilder {
|
||||
typedef TabControlOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
fbb_.AddOffset(TabControlOption::VT_NODEOPTIONS, nodeOptions);
|
||||
}
|
||||
void add_headerPlace(int32_t headerPlace) {
|
||||
|
@ -104,30 +104,30 @@ struct TabControlOptionBuilder {
|
|||
void add_ignoreHeaderTextureSize(uint8_t ignoreHeaderTextureSize) {
|
||||
fbb_.AddElement<uint8_t>(TabControlOption::VT_IGNOREHEADERTEXTURESIZE, ignoreHeaderTextureSize, 0);
|
||||
}
|
||||
void add_tabItems(flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::TabItemOption>>> tabItems) {
|
||||
void add_tabItems(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::TabItemOption>>> tabItems) {
|
||||
fbb_.AddOffset(TabControlOption::VT_TABITEMS, tabItems);
|
||||
}
|
||||
explicit TabControlOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit TabControlOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<TabControlOption> Finish() {
|
||||
::flatbuffers::Offset<TabControlOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TabControlOption>(end);
|
||||
auto o = ::flatbuffers::Offset<TabControlOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<TabControlOption> CreateTabControlOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
inline ::flatbuffers::Offset<TabControlOption> CreateTabControlOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
int32_t headerPlace = 0,
|
||||
int32_t headerWidth = 0,
|
||||
int32_t headerHeight = 0,
|
||||
float selectedTabZoom = 0.0f,
|
||||
int32_t selectedTabIndex = 0,
|
||||
uint8_t ignoreHeaderTextureSize = 0,
|
||||
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<flatbuffers::TabItemOption>>> tabItems = 0) {
|
||||
::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset<flatbuffers::TabItemOption>>> tabItems = 0) {
|
||||
TabControlOptionBuilder builder_(_fbb);
|
||||
builder_.add_tabItems(tabItems);
|
||||
builder_.add_selectedTabIndex(selectedTabIndex);
|
||||
|
@ -140,17 +140,17 @@ inline flatbuffers::Offset<TabControlOption> CreateTabControlOption(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<TabControlOption> CreateTabControlOptionDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
inline ::flatbuffers::Offset<TabControlOption> CreateTabControlOptionDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
int32_t headerPlace = 0,
|
||||
int32_t headerWidth = 0,
|
||||
int32_t headerHeight = 0,
|
||||
float selectedTabZoom = 0.0f,
|
||||
int32_t selectedTabIndex = 0,
|
||||
uint8_t ignoreHeaderTextureSize = 0,
|
||||
const std::vector<flatbuffers::Offset<flatbuffers::TabItemOption>> *tabItems = nullptr) {
|
||||
auto tabItems__ = tabItems ? _fbb.CreateVector<flatbuffers::Offset<flatbuffers::TabItemOption>>(*tabItems) : 0;
|
||||
const std::vector<::flatbuffers::Offset<flatbuffers::TabItemOption>> *tabItems = nullptr) {
|
||||
auto tabItems__ = tabItems ? _fbb.CreateVector<::flatbuffers::Offset<flatbuffers::TabItemOption>>(*tabItems) : 0;
|
||||
return flatbuffers::CreateTabControlOption(
|
||||
_fbb,
|
||||
nodeOptions,
|
||||
|
@ -163,7 +163,7 @@ inline flatbuffers::Offset<TabControlOption> CreateTabControlOptionDirect(
|
|||
tabItems__);
|
||||
}
|
||||
|
||||
struct TabHeaderOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct TabHeaderOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef TabHeaderOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_NODEOPTIONS = 4,
|
||||
|
@ -186,8 +186,8 @@ struct TabHeaderOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
int32_t fontSize() const {
|
||||
return GetField<int32_t>(VT_FONTSIZE, 0);
|
||||
}
|
||||
const flatbuffers::String *titleText() const {
|
||||
return GetPointer<const flatbuffers::String *>(VT_TITLETEXT);
|
||||
const ::flatbuffers::String *titleText() const {
|
||||
return GetPointer<const ::flatbuffers::String *>(VT_TITLETEXT);
|
||||
}
|
||||
const flatbuffers::Color *textColor() const {
|
||||
return GetStruct<const flatbuffers::Color *>(VT_TEXTCOLOR);
|
||||
|
@ -207,7 +207,7 @@ struct TabHeaderOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::ResourceData *crossDisableFile() const {
|
||||
return GetPointer<const flatbuffers::ResourceData *>(VT_CROSSDISABLEFILE);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_NODEOPTIONS) &&
|
||||
verifier.VerifyTable(nodeOptions()) &&
|
||||
|
@ -233,61 +233,61 @@ struct TabHeaderOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct TabHeaderOptionBuilder {
|
||||
typedef TabHeaderOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_nodeOptions(::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_NODEOPTIONS, nodeOptions);
|
||||
}
|
||||
void add_fontRes(flatbuffers::Offset<flatbuffers::ResourceData> fontRes) {
|
||||
void add_fontRes(::flatbuffers::Offset<flatbuffers::ResourceData> fontRes) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_FONTRES, fontRes);
|
||||
}
|
||||
void add_fontSize(int32_t fontSize) {
|
||||
fbb_.AddElement<int32_t>(TabHeaderOption::VT_FONTSIZE, fontSize, 0);
|
||||
}
|
||||
void add_titleText(flatbuffers::Offset<flatbuffers::String> titleText) {
|
||||
void add_titleText(::flatbuffers::Offset<::flatbuffers::String> titleText) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_TITLETEXT, titleText);
|
||||
}
|
||||
void add_textColor(const flatbuffers::Color *textColor) {
|
||||
fbb_.AddStruct(TabHeaderOption::VT_TEXTCOLOR, textColor);
|
||||
}
|
||||
void add_normalBackFile(flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile) {
|
||||
void add_normalBackFile(::flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_NORMALBACKFILE, normalBackFile);
|
||||
}
|
||||
void add_pressBackFile(flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile) {
|
||||
void add_pressBackFile(::flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_PRESSBACKFILE, pressBackFile);
|
||||
}
|
||||
void add_disableBackFile(flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile) {
|
||||
void add_disableBackFile(::flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_DISABLEBACKFILE, disableBackFile);
|
||||
}
|
||||
void add_crossNormalFile(flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile) {
|
||||
void add_crossNormalFile(::flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_CROSSNORMALFILE, crossNormalFile);
|
||||
}
|
||||
void add_crossDisableFile(flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile) {
|
||||
void add_crossDisableFile(::flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile) {
|
||||
fbb_.AddOffset(TabHeaderOption::VT_CROSSDISABLEFILE, crossDisableFile);
|
||||
}
|
||||
explicit TabHeaderOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit TabHeaderOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<TabHeaderOption> Finish() {
|
||||
::flatbuffers::Offset<TabHeaderOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TabHeaderOption>(end);
|
||||
auto o = ::flatbuffers::Offset<TabHeaderOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> fontRes = 0,
|
||||
inline ::flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> fontRes = 0,
|
||||
int32_t fontSize = 0,
|
||||
flatbuffers::Offset<flatbuffers::String> titleText = 0,
|
||||
::flatbuffers::Offset<::flatbuffers::String> titleText = 0,
|
||||
const flatbuffers::Color *textColor = nullptr,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile = 0) {
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile = 0) {
|
||||
TabHeaderOptionBuilder builder_(_fbb);
|
||||
builder_.add_crossDisableFile(crossDisableFile);
|
||||
builder_.add_crossNormalFile(crossNormalFile);
|
||||
|
@ -302,18 +302,18 @@ inline flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOption(
|
|||
return builder_.Finish();
|
||||
}
|
||||
|
||||
inline flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOptionDirect(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> fontRes = 0,
|
||||
inline ::flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOptionDirect(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::WidgetOptions> nodeOptions = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> fontRes = 0,
|
||||
int32_t fontSize = 0,
|
||||
const char *titleText = nullptr,
|
||||
const flatbuffers::Color *textColor = nullptr,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile = 0,
|
||||
flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile = 0) {
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> normalBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> pressBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> disableBackFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> crossNormalFile = 0,
|
||||
::flatbuffers::Offset<flatbuffers::ResourceData> crossDisableFile = 0) {
|
||||
auto titleText__ = titleText ? _fbb.CreateString(titleText) : 0;
|
||||
return flatbuffers::CreateTabHeaderOption(
|
||||
_fbb,
|
||||
|
@ -329,7 +329,7 @@ inline flatbuffers::Offset<TabHeaderOption> CreateTabHeaderOptionDirect(
|
|||
crossDisableFile);
|
||||
}
|
||||
|
||||
struct TabItemOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
struct TabItemOption FLATBUFFERS_FINAL_CLASS : private ::flatbuffers::Table {
|
||||
typedef TabItemOptionBuilder Builder;
|
||||
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
|
||||
VT_HEADER = 4,
|
||||
|
@ -341,7 +341,7 @@ struct TabItemOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
const flatbuffers::NodeTree *container() const {
|
||||
return GetPointer<const flatbuffers::NodeTree *>(VT_CONTAINER);
|
||||
}
|
||||
bool Verify(flatbuffers::Verifier &verifier) const {
|
||||
bool Verify(::flatbuffers::Verifier &verifier) const {
|
||||
return VerifyTableStart(verifier) &&
|
||||
VerifyOffset(verifier, VT_HEADER) &&
|
||||
verifier.VerifyTable(header()) &&
|
||||
|
@ -353,29 +353,29 @@ struct TabItemOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
|||
|
||||
struct TabItemOptionBuilder {
|
||||
typedef TabItemOption Table;
|
||||
flatbuffers::FlatBufferBuilder &fbb_;
|
||||
flatbuffers::uoffset_t start_;
|
||||
void add_header(flatbuffers::Offset<flatbuffers::TabHeaderOption> header) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb_;
|
||||
::flatbuffers::uoffset_t start_;
|
||||
void add_header(::flatbuffers::Offset<flatbuffers::TabHeaderOption> header) {
|
||||
fbb_.AddOffset(TabItemOption::VT_HEADER, header);
|
||||
}
|
||||
void add_container(flatbuffers::Offset<flatbuffers::NodeTree> container) {
|
||||
void add_container(::flatbuffers::Offset<flatbuffers::NodeTree> container) {
|
||||
fbb_.AddOffset(TabItemOption::VT_CONTAINER, container);
|
||||
}
|
||||
explicit TabItemOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
|
||||
explicit TabItemOptionBuilder(::flatbuffers::FlatBufferBuilder &_fbb)
|
||||
: fbb_(_fbb) {
|
||||
start_ = fbb_.StartTable();
|
||||
}
|
||||
flatbuffers::Offset<TabItemOption> Finish() {
|
||||
::flatbuffers::Offset<TabItemOption> Finish() {
|
||||
const auto end = fbb_.EndTable(start_);
|
||||
auto o = flatbuffers::Offset<TabItemOption>(end);
|
||||
auto o = ::flatbuffers::Offset<TabItemOption>(end);
|
||||
return o;
|
||||
}
|
||||
};
|
||||
|
||||
inline flatbuffers::Offset<TabItemOption> CreateTabItemOption(
|
||||
flatbuffers::FlatBufferBuilder &_fbb,
|
||||
flatbuffers::Offset<flatbuffers::TabHeaderOption> header = 0,
|
||||
flatbuffers::Offset<flatbuffers::NodeTree> container = 0) {
|
||||
inline ::flatbuffers::Offset<TabItemOption> CreateTabItemOption(
|
||||
::flatbuffers::FlatBufferBuilder &_fbb,
|
||||
::flatbuffers::Offset<flatbuffers::TabHeaderOption> header = 0,
|
||||
::flatbuffers::Offset<flatbuffers::NodeTree> container = 0) {
|
||||
TabItemOptionBuilder builder_(_fbb);
|
||||
builder_.add_container(container);
|
||||
builder_.add_header(header);
|
||||
|
@ -383,32 +383,32 @@ inline flatbuffers::Offset<TabItemOption> CreateTabItemOption(
|
|||
}
|
||||
|
||||
inline const flatbuffers::TabControlOption *GetTabControlOption(const void *buf) {
|
||||
return flatbuffers::GetRoot<flatbuffers::TabControlOption>(buf);
|
||||
return ::flatbuffers::GetRoot<flatbuffers::TabControlOption>(buf);
|
||||
}
|
||||
|
||||
inline const flatbuffers::TabControlOption *GetSizePrefixedTabControlOption(const void *buf) {
|
||||
return flatbuffers::GetSizePrefixedRoot<flatbuffers::TabControlOption>(buf);
|
||||
return ::flatbuffers::GetSizePrefixedRoot<flatbuffers::TabControlOption>(buf);
|
||||
}
|
||||
|
||||
inline bool VerifyTabControlOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifyBuffer<flatbuffers::TabControlOption>(nullptr);
|
||||
}
|
||||
|
||||
inline bool VerifySizePrefixedTabControlOptionBuffer(
|
||||
flatbuffers::Verifier &verifier) {
|
||||
::flatbuffers::Verifier &verifier) {
|
||||
return verifier.VerifySizePrefixedBuffer<flatbuffers::TabControlOption>(nullptr);
|
||||
}
|
||||
|
||||
inline void FinishTabControlOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::TabControlOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::TabControlOption> root) {
|
||||
fbb.Finish(root);
|
||||
}
|
||||
|
||||
inline void FinishSizePrefixedTabControlOptionBuffer(
|
||||
flatbuffers::FlatBufferBuilder &fbb,
|
||||
flatbuffers::Offset<flatbuffers::TabControlOption> root) {
|
||||
::flatbuffers::FlatBufferBuilder &fbb,
|
||||
::flatbuffers::Offset<flatbuffers::TabControlOption> root) {
|
||||
fbb.FinishSizePrefixed(root);
|
||||
}
|
||||
|
||||
|
|
|
@ -752,10 +752,10 @@ Offset<Table> WidgetReader::createOptionsWithFlatBuffers(pugi::xml_node objectDa
|
|||
child = child.next_sibling();
|
||||
}
|
||||
|
||||
RotationSkew f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_rotationskew(rotationSkew.x, rotationSkew.y);
|
||||
FVec2 f_position(position.x, position.y);
|
||||
Scale f_scale(scale.x, scale.y);
|
||||
AnchorPoint f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
FVec2 f_scale(scale.x, scale.y);
|
||||
FVec2 f_anchortpoint(anchorPoint.x, anchorPoint.y);
|
||||
Color f_color(color.a, color.r, color.g, color.b);
|
||||
FlatSize f_size(size.x, size.y);
|
||||
auto f_layoutComponent = CreateLayoutComponentTable(
|
||||
|
@ -821,14 +821,14 @@ void WidgetReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::Ta
|
|||
Vec2 position(options->position()->x(), options->position()->y());
|
||||
widget->setPosition(position);
|
||||
|
||||
float scaleX = options->scale()->scaleX();
|
||||
float scaleX = options->scale()->x();
|
||||
widget->setScaleX(scaleX);
|
||||
float scaleY = options->scale()->scaleY();
|
||||
float scaleY = options->scale()->y();
|
||||
widget->setScaleY(scaleY);
|
||||
|
||||
float rotationSkewX = options->rotationSkew()->rotationSkewX();
|
||||
float rotationSkewX = options->rotationSkew()->x();
|
||||
widget->setRotationSkewX(rotationSkewX);
|
||||
float rotationSkewY = options->rotationSkew()->rotationSkewY();
|
||||
float rotationSkewY = options->rotationSkew()->y();
|
||||
widget->setRotationSkewY(rotationSkewY);
|
||||
|
||||
bool visible = options->visible() != 0;
|
||||
|
@ -845,7 +845,7 @@ void WidgetReader::setPropsWithFlatBuffers(ax::Node* node, const flatbuffers::Ta
|
|||
widget->setOpacity(alpha);
|
||||
|
||||
auto f_anchorPoint = options->anchorPoint();
|
||||
Vec2 anchorPoint(f_anchorPoint->scaleX(), f_anchorPoint->scaleY());
|
||||
Vec2 anchorPoint(f_anchorPoint->x(), f_anchorPoint->y());
|
||||
widget->setAnchorPoint(anchorPoint);
|
||||
|
||||
bool flippedX = options->flipX() != 0;
|
||||
|
|
Loading…
Reference in New Issue