diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-02-28 15:18:55 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-05-28 14:20:01 (GMT) |
commit | d38d33cef2241cd8d29c99f519d21ae225453357 (patch) | |
tree | cec801d4e012ca1b245d48cfd6b854d8b6530842 /src/context.cpp | |
parent | f7a05140593d854955151e4286205ef1f908e07b (diff) | |
download | Doxygen-d38d33cef2241cd8d29c99f519d21ae225453357.zip Doxygen-d38d33cef2241cd8d29c99f519d21ae225453357.tar.gz Doxygen-d38d33cef2241cd8d29c99f519d21ae225453357.tar.bz2 |
Added generating template files and reading templates from disk if present
Diffstat (limited to 'src/context.cpp')
-rw-r--r-- | src/context.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/context.cpp b/src/context.cpp index 67b4e12..9973a59 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -46,12 +46,11 @@ #include "arguments.h" #include "groupdef.h" #include "searchindex.h" +#include "resourcemgr.h" // TODO: pass the current file to Dot*::writeGraph, so the user can put dot graphs in other // files as well -#define ADD_PROPERTY(name) addProperty(#name,this,&Private::name); - enum ContextOutputFormat { ContextOutputFormat_Unspecified=0, @@ -10168,6 +10167,7 @@ void generateOutputViaTemplate() //if (Config_getBool(GENERATE_HTML)) { // render HTML output + e.setTemplateDir("templates/html"); // TODO: make template part user configurable Template *tpl = e.loadByName("htmllayout.tpl",1); if (tpl) { @@ -10192,6 +10192,7 @@ void generateOutputViaTemplate() //if (Config_getBool(GENERATE_LATEX)) if (0) { // render LaTeX output + e.setTemplateDir("templates/latex"); // TODO: make template part user configurable Template *tpl = e.loadByName("latexlayout.tpl",1); if (tpl) { @@ -10241,3 +10242,20 @@ void generateOutputViaTemplate() #endif } +void generateTemplateFiles(const char *templateDir) +{ + if (!templateDir) return; + QDir thisDir; + if (!thisDir.exists(templateDir) && !thisDir.mkdir(templateDir)) + { + err("Failed to create output directory '%s'\n",templateDir); + return; + } + QCString outDir = QCString(templateDir)+"/html"; + if (!thisDir.exists(outDir) && !thisDir.mkdir(outDir)) + { + err("Failed to create output directory '%s'\n",templateDir); + return; + } + ResourceMgr::instance().writeCategory("html",outDir); +} |