#pragma once #include "CodegenDecl.hpp" #include #include #include #include #include #include #include // A generic "thing" (could be anything, comments, string-concated functionsm, etc.) to spit into the output file struct CodegenOutputThing { std::string text; }; class CodegenOutput { private: robin_hood::unordered_set mRequestIncludes; std::vector mOutThings; std::vector mOutStructs; std::vector mOutEnums; std::vector mOutFunctions; public: std::string optionOutPrefix; // Whether to add prefixes mOutPrefix to all global names or not bool optionAutoAddPrefix : 1 = false; public: void AddRequestInclude(std::string_view include); void AddOutputThing(CodegenOutputThing thing); void MergeContents(CodegenOutput other); void Write(FILE* file) const; };