#include "idl_gen_fbs.h"
#include <unordered_map>
#include <utility>
#include <vector>
#include "flatbuffers/code_generator.h"
#include "flatbuffers/code_generators.h"
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/idl.h"
#include "flatbuffers/util.h"
namespace flatbuffers {
namespace {
static std::string GenType(const Type &type, bool underlying = false) { … }
static bool HasFieldWithId(const std::vector<FieldDef *> &fields) { … }
static bool HasNonPositiveFieldId(const std::vector<FieldDef *> &fields) { … }
static bool HasFieldIdFromReservedIds(
const std::vector<FieldDef *> &fields,
const std::vector<voffset_t> &reserved_ids) { … }
static std::vector<voffset_t> ExtractProtobufIds(
const std::vector<FieldDef *> &fields) { … }
static bool HasTwiceUsedId(const std::vector<FieldDef *> &fields) { … }
static bool HasGapInProtoId(const std::vector<FieldDef *> &fields) { … }
static bool ProtobufIdSanityCheck(const StructDef &struct_def,
IDLOptions::ProtoIdGapAction gap_action,
bool no_log = false) { … }
struct ProtobufToFbsIdMap { … };
static ProtobufToFbsIdMap MapProtoIdsToFieldsId(
const StructDef &struct_def, IDLOptions::ProtoIdGapAction gap_action,
bool no_log) { … }
static void GenNameSpace(const Namespace &name_space, std::string *_schema,
const Namespace **last_namespace) { … }
static std::string GenerateFBS(const Parser &parser,
const std::string &file_name,
bool no_log = false) { … }
static bool GenerateFBS(const Parser &parser, const std::string &path,
const std::string &file_name, bool no_log = false) { … }
class FBSCodeGenerator : public CodeGenerator { … };
}
std::unique_ptr<CodeGenerator> NewFBSCodeGenerator(const bool no_log) { … }
}