The Refureku generator runs in two distinct phases to handle internal and public metadata:
- Internal Generation: Runs
runForInternalDirectory, which generates metadata into the Include/Internal/Refureku/Generated directory. This includes both header (.rfkh.h) and source (.rfks.h) files. - Public Generation: Runs
runForPublicDirectory, which generates metadata into the Include/Public/Refureku/Generated directory. To keep the public API clean, it automatically deletes all generated source files (.rfks.h) from this directory after the process completes, leaving only the headers.
The generator uses rfk::ReflectionCodeGenModule to drive the actual reflection logic during the kodgen execution.
// Typical execution flow in main()
rfk::FileParser fileParser;
// ... setup logger and manager ...
rfk::ReflectionCodeGenModule reflectionCodeGenModule;
codeGenUnit.addModule(reflectionCodeGenModule);
runForInternalDirectory(logger, codeGenMgr, fileParser, codeGenUnit, codeGenUnitSettings);
runForPublicDirectory(logger, codeGenMgr, fileParser, codeGenUnit, codeGenUnitSettings);