/// <summary> /// Write final outputs to disk /// </summary> private void WriteOutputs(Configuration config, string pluginHContent, string pluginCppContent, Dictionary <string, string> macros) { Utils.IO.CreateDirectory(config.General.OutputPath); var clangFormat = new ClangFormat(Context); // Write header var pluginH = Path.Combine(config.General.OutputPath, macros["BIFROST_PLUGIN_H_FILE"]); File.WriteAllText(pluginH, pluginHContent); Logger.Debug($"Writting plugin header file to: \"{pluginH}\""); clangFormat.Format(pluginH); // Write cpp var pluginCpp = Path.Combine(config.General.OutputPath, macros["BIFROST_PLUGIN_CPP_FILE"]); if (!File.Exists(pluginCpp)) { File.WriteAllText(pluginCpp, pluginCppContent); Logger.Debug($"Writting plugin source file to: \"{pluginCpp}\""); clangFormat.Format(pluginCpp); } }
public PredefinedStyleInfo(ClangFormat.StyleId idArg) { id = idArg; data = ClangFormat.Funcs.genStyle(id); }