This is a macro on some (older) versions of GCC, and macOS, and Windows. Sigh. I moved the `#undef` block to a common section. I also took the opportunity to add a regression test for all these macros that need to be `#undef`'d.
Part of the work for googleapis/google-cloud-cpp#8125
Closes#12903
PiperOrigin-RevId: 535649278
These files get automatically updated as post-submit actions, and there's no reason to ever used the checked in versions. Daily run staleness test verify that those don't go out of date.
PiperOrigin-RevId: 496800868
This CL:
* Does the aforementioned.
* Deletes all of the associated headers and moves the implementation class definitions into the .cc files.
* Exposes factory functions for all the different FieldGenerator implementations.
This change will be followed up by parallel changes that clean up individual .cc files to delete redundant code. This change reduces what files need to be updated in future FieldGenerator refactors, and places them in a central location for this. Finally, because these classes only exist to implement FieldGenerator, they should not expose any other API for other parts of the compiler to use.
PiperOrigin-RevId: 496722868
Currently, FieldGenerator holds onto a bit of state, and due to the way its interface is constructed it results in untracked dependencies between the contents of map<string, string> values that get tossed around the compiler. In order to break these dependencies, we want to move calculation of string variables into a centrally tracked place, but that requires inserting variable setup and destruction code in each FieldGenerator call.
Hence, FieldGenerator is replaced with a PIMPL wrapper (FieldGenWrapper) to allow us to do this. Followup CLs will:
* Rename FieldGenWrapper to FieldGenerator and FieldGenerator to some interface-ey name.
* Gradually morph the interface of FieldGenerator to encapsulate all per-field logic, so that message.cc does not have to iterate over fields except to call into generators, and as such does not need to manipulate per-field substitution variables.
This CL is a no-op refactor.
PiperOrigin-RevId: 496489306