Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defined CodeGenerator Interface and implement C++ #7771

Merged
merged 1 commit into from
Jan 8, 2023

Conversation

dbaileychess
Copy link
Collaborator

This makes a new CodeGenerator interface that has individual methods for generating code, GRPC, makefiles, etc.. This is to consolidate all the logic of a given code generator in a single location, instead of the current design with free functions.

This is part of a general refactoring of the FlatC.

@github-actions github-actions bot added c++ codegen Involving generating code from schema labels Jan 8, 2023
@dbaileychess dbaileychess merged commit 3b8644d into google:master Jan 8, 2023
@enum-class
Copy link
Contributor

is CodeGenrator same as BaseGenerator ?

sunwen18 pushed a commit to sunwen18/flatbuffers that referenced this pull request Jan 9, 2023
@dbaileychess
Copy link
Collaborator Author

No,CodeGenerator is a pure interface that combines everything language-specific together. BaseGenerator is an abstract base class that parser-based (not bfbs-based) code generators are written ontop of. At some point, BaseGenerator could implement CodeGenerator interface, but I didn't want to add that now as I would have to touch every language all at once. So I am just moving them over piecemeal.

jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
jochenparm pushed a commit to jochenparm/flatbuffers that referenced this pull request Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ codegen Involving generating code from schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants