#ifndef FLATBUFFERS_FLEXBUFFERS_H_
#define FLATBUFFERS_FLEXBUFFERS_H_
#include <algorithm>
#include <map>
#include "flatbuffers/base.h"
#include "flatbuffers/util.h"
#ifdef _MSC_VER
# include <intrin.h>
#endif
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4127)
#endif
namespace flexbuffers {
class Reference;
class Map;
enum BitWidth { … };
enum Type { … };
inline bool IsInline(Type t) { … }
inline bool IsTypedVectorElementType(Type t) { … }
inline bool IsTypedVector(Type t) { … }
inline bool IsFixedTypedVector(Type t) { … }
inline Type ToTypedVector(Type t, size_t fixed_len = 0) { … }
inline Type ToTypedVectorElementType(Type t) { … }
inline Type ToFixedTypedVectorElementType(Type t, uint8_t *len) { … }
half;
quarter;
template<typename R, typename T1, typename T2, typename T4, typename T8>
R ReadSizedScalar(const uint8_t *data, uint8_t byte_width) { … }
inline int64_t ReadInt64(const uint8_t *data, uint8_t byte_width) { … }
inline uint64_t ReadUInt64(const uint8_t *data, uint8_t byte_width) { … }
inline double ReadDouble(const uint8_t *data, uint8_t byte_width) { … }
inline const uint8_t *Indirect(const uint8_t *offset, uint8_t byte_width) { … }
template<typename T> const uint8_t *Indirect(const uint8_t *offset) { … }
inline BitWidth WidthU(uint64_t u) { … }
inline BitWidth WidthI(int64_t i) { … }
inline BitWidth WidthF(double f) { … }
class Object { … };
class Sized : public Object { … };
class String : public Sized { … };
class Blob : public Sized { … };
class Vector : public Sized { … };
class TypedVector : public Sized { … };
class FixedTypedVector : public Object { … };
class Map : public Vector { … };
inline void IndentString(std::string &s, int indent,
const char *indent_string) { … }
template<typename T>
void AppendToString(std::string &s, T &&v, bool keys_quoted, bool indented,
int cur_indent, const char *indent_string) { … }
template<typename T>
void AppendToString(std::string &s, T &&v, bool keys_quoted) { … }
class Reference { … };
template<> inline bool Reference::As<bool>() const { … }
template<> inline int8_t Reference::As<int8_t>() const { … }
template<> inline int16_t Reference::As<int16_t>() const { … }
template<> inline int32_t Reference::As<int32_t>() const { … }
template<> inline int64_t Reference::As<int64_t>() const { … }
template<> inline uint8_t Reference::As<uint8_t>() const { … }
template<> inline uint16_t Reference::As<uint16_t>() const { … }
template<> inline uint32_t Reference::As<uint32_t>() const { … }
template<> inline uint64_t Reference::As<uint64_t>() const { … }
template<> inline double Reference::As<double>() const { … }
template<> inline float Reference::As<float>() const { … }
template<> inline String Reference::As<String>() const { … }
template<> inline std::string Reference::As<std::string>() const { … }
template<> inline Blob Reference::As<Blob>() const { … }
template<> inline Vector Reference::As<Vector>() const { … }
template<> inline TypedVector Reference::As<TypedVector>() const { … }
template<> inline FixedTypedVector Reference::As<FixedTypedVector>() const { … }
template<> inline Map Reference::As<Map>() const { … }
inline uint8_t PackedType(BitWidth bit_width, Type type) { … }
inline uint8_t NullPackedType() { … }
inline Reference Vector::operator[](size_t i) const { … }
inline Reference TypedVector::operator[](size_t i) const { … }
inline Reference FixedTypedVector::operator[](size_t i) const { … }
template<typename T> int KeyCompare(const void *key, const void *elem) { … }
inline Reference Map::operator[](const char *key) const { … }
inline Reference Map::operator[](const std::string &key) const { … }
inline Reference GetRoot(const uint8_t *buffer, size_t size) { … }
inline Reference GetRoot(const std::vector<uint8_t> &buffer) { … }
enum BuilderFlag { … };
class Builder FLATBUFFERS_FINAL_CLASS { … };
class Verifier FLATBUFFERS_FINAL_CLASS { … };
inline bool VerifyBuffer(const uint8_t *buf, size_t buf_len,
std::vector<uint8_t> *reuse_tracker = nullptr) { … }
}
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif