forked from BigfootDev/flatbuffers
Final refactor for bfsb_generator* and text generator (#7806)
* Refactor BfbsGenerator to use CodeGenerator interface * Update * Refactor bfbs generator * Refactor bfbs generator for lua and nim. Remove old code that use Generator interface. * Update import * Update CMakeLists * Update BUILD file * Update BUILD file for src * Remove from Android CMakeLists and add error message * Update * Add generate root file function to Code Generator interface * Update * Update * Minor format fix
This commit is contained in:
@@ -32,7 +32,8 @@ class CodeGenerator {
|
||||
enum Status {
|
||||
OK = 0,
|
||||
ERROR = 1,
|
||||
NOT_IMPLEMENTED = 2,
|
||||
FAILED_VERIFICATION = 2,
|
||||
NOT_IMPLEMENTED = 3
|
||||
};
|
||||
|
||||
// Generate code from the provided `parser`.
|
||||
@@ -52,11 +53,17 @@ class CodeGenerator {
|
||||
virtual Status GenerateGrpcCode(const Parser &parser, const std::string &path,
|
||||
const std::string &filename) = 0;
|
||||
|
||||
virtual Status GenerateRootFile(const Parser &parser,
|
||||
const std::string &path) = 0;
|
||||
|
||||
virtual bool IsSchemaOnly() const = 0;
|
||||
|
||||
virtual bool SupportsBfbsGeneration() const = 0;
|
||||
|
||||
virtual bool SupportsRootFileGeneration() const = 0;
|
||||
|
||||
virtual IDLOptions::Language Language() const = 0;
|
||||
|
||||
virtual std::string LanguageName() const = 0;
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user