UE Reflection System

It occurred to me that if the Unreal Header Tool was used to generate a header file to support the header file we wrote, why not just examine the cpp file and generate all the header file for us?

We could use macros in the cpp file so that it knew which header files we would include if we wrote the h file ourselves.

We could then update only the cpp file and not have to bother making matching/corresponding changes to the header file.

This would make the entire development process saving time in hand coding by eliminating matching declarations in a second (header) file, and the process would be more robust.

It would essentially do what C# does - it hides the class, function, and property signature declarations from the developer and keeps them for use through out the program.

Thoughts?

Thinking about this further today, it seems like it would be a trivial task for Epic to write a tool to run through all their code base, recreate the CPP files with new macros that would be used to generate the original H files, then check for accuracy by generating both CPP and H files and compare them to the originals. This would all be automated. Once it fully regenerates the code base, one could run it and use the CPP only paradigm.