#ifndef FLATBUFFERS_INCLUDE_CODEGEN_PYTHON_H_
#define FLATBUFFERS_INCLUDE_CODEGEN_PYTHON_H_
#include <cstdint>
#include <set>
#include <string>
#include <vector>
#include "codegen/namer.h"
namespace flatbuffers {
namespace python {
static const Namer::Config kConfig = {
Case::kKeep,
Case::kScreamingSnake,
Case::kUpperCamel,
Case::kUpperCamel,
Case::kLowerCamel,
Case::kLowerCamel,
Case::kKeep,
".",
Namer::Config::Escape::AfterConvertingCase,
Case::kKeep, ".",
"",
"T",
"",
"_",
Namer::Config::KeywordsCasing::CaseSensitive,
Case::kKeep,
Case::kKeep,
"",
"",
".py",
};
static const Namer::Config kStubConfig = {
Case::kKeep,
Case::kScreamingSnake,
Case::kUpperCamel,
Case::kUpperCamel,
Case::kLowerCamel,
Case::kLowerCamel,
Case::kKeep,
".",
Namer::Config::Escape::AfterConvertingCase,
Case::kKeep, ".",
"",
"T",
"",
"_",
Namer::Config::KeywordsCasing::CaseSensitive,
Case::kKeep,
Case::kKeep,
"",
"",
".pyi",
};
struct Version {
explicit Version(const std::string& version);
bool IsValid() const;
int16_t major = 0;
int16_t minor = 0;
int16_t micro = 0;
};
std::set<std::string> Keywords(const Version& version);
struct Import {
bool IsLocal() const { return module == "."; }
std::string module;
std::string name;
};
struct Imports {
const python::Import& Import(const std::string& module);
const python::Import& Import(const std::string& module,
const std::string& name);
const python::Import& Export(const std::string& module);
const python::Import& Export(const std::string& module,
const std::string& name);
std::vector<python::Import> imports;
std::vector<python::Import> exports;
};
} }
#endif