diff options
Diffstat (limited to 'bindings/corba/orbitcpp/webmgr.hpp')
-rw-r--r-- | bindings/corba/orbitcpp/webmgr.hpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/bindings/corba/orbitcpp/webmgr.hpp b/bindings/corba/orbitcpp/webmgr.hpp index 048882c..05fa569 100644 --- a/bindings/corba/orbitcpp/webmgr.hpp +++ b/bindings/corba/orbitcpp/webmgr.hpp @@ -2,7 +2,7 @@ * * webmgr.cpp - * - * $Id: webmgr.hpp 2833 2013-06-29 06:40:28Z chrislit $ + * $Id: webmgr.hpp 3548 2017-12-10 05:11:38Z scribe $ * * Copyright 2005-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -25,6 +25,7 @@ #include <swmgr.h> #include <swmodule.h> +#include <filemgr.h> #include <swfilter.h> #include <markupfiltmgr.h> #include <osiswordjs.h> @@ -41,9 +42,13 @@ class WebMgr : public SWMgr { SWModule *defaultHebLex; SWModule *defaultGreekParse; SWModule *defaultHebParse; + char *extraConf; public: - WebMgr(SWConfig *sysConf) : SWMgr(0, sysConf, false, new MarkupFilterMgr(FMT_WEBIF)) { + WebMgr(const char *path, const char *extraConfPath = 0) : SWMgr(path, false, new MarkupFilterMgr(FMT_WEBIF)) { init(); if (extraConfPath) stdstr(&extraConf, extraConfPath); } + WebMgr(SWConfig *sysConf) : SWMgr(0, sysConf, false, new MarkupFilterMgr(FMT_WEBIF)) { init(); } + void init() { + extraConf = 0; defaultGreekLex = 0; defaultHebLex = 0; defaultGreekParse = 0; @@ -52,7 +57,7 @@ public: osisWordJS = new OSISWordJS(); thmlWordJS = new ThMLWordJS(); gbfWordJS = new GBFWordJS(); - Load(); + load(); osisWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); thmlWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); gbfWordJS->setDefaultModules(defaultGreekLex, defaultHebLex, defaultGreekParse, defaultHebParse); @@ -66,10 +71,22 @@ public: delete osisWordJS; delete thmlWordJS; delete gbfWordJS; + delete extraConf; } + void createAllModules(bool multiMod) { - void AddGlobalOptions(SWModule *module, ConfigEntMap §ion, ConfigEntMap::iterator start, ConfigEntMap::iterator end) { + if (extraConf) { + bool exists = FileMgr::existsFile(extraConf); + if (exists) { + SWConfig addConfig(extraConf); + this->config->augment(addConfig); + } + } + SWMgr::createAllModules(multiMod); + } + + void addGlobalOptionFilters(SWModule *module, ConfigEntMap §ion) { // ThML word stuff needs to process before strongs strip if (module->getMarkup() == FMT_THML) { @@ -81,7 +98,7 @@ public: } // add other module filters - SWMgr::AddGlobalOptions(module, section, start, end); + SWMgr::addGlobalOptionFilters(module, section); // add our special filters if (module->getConfig().has("Feature", "GreekDef")) { |