1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>swmgr.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.6 -->
<center>
<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> </center>
<hr><h1>swmgr.h</h1><div class="fragment"><pre>00001 <font class="comment">/******************************************************************************</font>
00002 <font class="comment"> * swmgr.h - definition of class SWMgr used to interact with an install</font>
00003 <font class="comment"> * base of sword modules.</font>
00004 <font class="comment"> *</font>
00005 <font class="comment"> * $Id: swmgr_h-source.html,v 1.4 2001/10/05 20:45:22 mgruner Exp $</font>
00006 <font class="comment"> *</font>
00007 <font class="comment"> * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</font>
00008 <font class="comment"> * CrossWire Bible Society</font>
00009 <font class="comment"> * P. O. Box 2528</font>
00010 <font class="comment"> * Tempe, AZ 85280-2528</font>
00011 <font class="comment"> *</font>
00012 <font class="comment"> * This program is free software; you can redistribute it and/or modify it</font>
00013 <font class="comment"> * under the terms of the GNU General Public License as published by the</font>
00014 <font class="comment"> * Free Software Foundation version 2.</font>
00015 <font class="comment"> *</font>
00016 <font class="comment"> * This program is distributed in the hope that it will be useful, but</font>
00017 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00018 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
00019 <font class="comment"> * General Public License for more details.</font>
00020 <font class="comment"> *</font>
00021 <font class="comment"> */</font>
00022
00036 <font class="preprocessor">#ifndef SWMGR_H</font>
00037 <font class="preprocessor"></font><font class="preprocessor">#define SWMGR_H</font>
00038 <font class="preprocessor"></font>
00039 <font class="preprocessor">#include <sys/types.h></font>
00040 <font class="preprocessor">#include <string></font>
00041 <font class="preprocessor">#include <map></font>
00042 <font class="preprocessor">#include <list></font>
00043 <font class="preprocessor">#include <swmodule.h></font>
00044 <font class="preprocessor">#include <swconfig.h></font>
00045 <font class="preprocessor">#include <swlog.h></font>
00046
00047 <font class="preprocessor">#include <defs.h></font>
00048
00049 <font class="keyword">using</font> <font class="keyword">namespace </font>std;
00050
00051 <font class="keyword">typedef</font> map < string, SWModule *, less < string > >ModMap;
00052 <font class="keyword">typedef</font> list < string > OptionsList;
00053 <font class="keyword">typedef</font> map < string, SWFilter * >FilterMap;
00054
<a name="l00063"></a><a class="code" href="class_swmgr.html">00063</a> <font class="keyword">class </font>SWDLLEXPORT <a class="code" href="class_swmgr.html">SWMgr</a>
00064 {
00065 <font class="keyword">protected</font>:
00066 <a class="code" href="class_swconfig.html">SWConfig</a> * myconfig; <font class="comment">//made protected because because BibleTime needs it</font>
00067 <a class="code" href="class_swconfig.html">SWConfig</a> *mysysconfig;
00068 <font class="keywordtype">void</font> CreateMods ();
00069 <a class="code" href="class_swmodule.html">SWModule</a> *CreateMod (string name, string driver, ConfigEntMap & section);
00070 <font class="keywordtype">void</font> DeleteMods ();
00071 <font class="keywordtype">char</font> configType; <font class="comment">// 0 = file; 1 = directory</font>
00072 FilterMap optionFilters;
00073 FilterMap cipherFilters;
00074 <a class="code" href="class_swfilter.html">SWFilter</a> *gbfplain;
00075 <a class="code" href="class_swfilter.html">SWFilter</a> *thmlplain;
00076 FilterList cleanupFilters;
00077 OptionsList options;
00078 <font class="keyword">virtual</font> <font class="keywordtype">void</font> init (); <font class="comment">// use to initialize before loading modules</font>
00079 <font class="keyword">virtual</font> <font class="keywordtype">char</font> AddModToConfig (<font class="keywordtype">int</font> conffd, <font class="keyword">const</font> <font class="keywordtype">char</font> *fname);
00080 <font class="keyword">virtual</font> <font class="keywordtype">void</font> loadConfigDir (<font class="keyword">const</font> <font class="keywordtype">char</font> *ipath);
00081 <font class="keyword">virtual</font> <font class="keywordtype">void</font> AddGlobalOptions (<a class="code" href="class_swmodule.html">SWModule</a> * module, ConfigEntMap & section,
00082 ConfigEntMap::iterator start,
00083 ConfigEntMap::iterator end);
00084 <font class="keyword">virtual</font> <font class="keywordtype">void</font> AddLocalOptions (<a class="code" href="class_swmodule.html">SWModule</a> * module, ConfigEntMap & section,
00085 ConfigEntMap::iterator start,
00086 ConfigEntMap::iterator end);
00092 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#b8">AddRenderFilters</a> (<a class="code" href="class_swmodule.html">SWModule</a> * module, ConfigEntMap & section);
00098 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#b9">AddStripFilters</a> (<a class="code" href="class_swmodule.html">SWModule</a> * module, ConfigEntMap & section);
00104 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#b10">AddRawFilters</a> (<a class="code" href="class_swmodule.html">SWModule</a> * module, ConfigEntMap & section);
00105
00106 <font class="keyword">public</font>:
<a name="l00110"></a><a class="code" href="class_swmgr.html#p0">00110</a> <font class="keyword">static</font> <font class="keywordtype">bool</font> debug;
00114 <font class="keyword">static</font> <font class="keywordtype">void</font> findConfig (<font class="keywordtype">char</font> *configType, <font class="keywordtype">char</font> **prefixPath,
00115 <font class="keywordtype">char</font> **configPath);
<a name="l00122"></a><a class="code" href="class_swmgr.html#m0">00122</a> <a class="code" href="class_swconfig.html">SWConfig</a> *config;
00126 <a class="code" href="class_swconfig.html">SWConfig</a> *sysconfig;
<a name="l00130"></a><a class="code" href="class_swmgr.html#m2">00130</a> ModMap Modules;
<a name="l00134"></a><a class="code" href="class_swmgr.html#m3">00134</a> <font class="keywordtype">char</font> *prefixPath;
00138 <font class="keywordtype">char</font> *configPath;
00145 <a class="code" href="class_swmgr.html#a0">SWMgr</a> (<a class="code" href="class_swconfig.html">SWConfig</a> * iconfig = 0, <a class="code" href="class_swconfig.html">SWConfig</a> * isysconfig = 0, <font class="keywordtype">bool</font> autoload = <font class="keyword">true</font>);
00149 <a class="code" href="class_swmgr.html#a0">SWMgr</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *iConfigPath, <font class="keywordtype">bool</font> autoload = <font class="keyword">true</font>);
00155 <font class="keyword">virtual</font> <a class="code" href="class_swmgr.html#a2">~SWMgr</a> ();
00159 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#a3">InstallScan</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *dir);
00164 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#a4">Load</a> ();
00171 <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_swmgr.html#a5">setGlobalOption</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option, <font class="keyword">const</font> <font class="keywordtype">char</font> *value);
00176 <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="class_swmgr.html#a6">getGlobalOption</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00182 <font class="keyword">virtual</font> <font class="keyword">const</font> <font class="keywordtype">char</font> *<a class="code" href="class_swmgr.html#a7">getGlobalOptionTip</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00186 <font class="keyword">virtual</font> OptionsList <a class="code" href="class_swmgr.html#a8">getGlobalOptions</a> ();
00190 <font class="keyword">virtual</font> OptionsList getGlobalOptionValues (<font class="keyword">const</font> <font class="keywordtype">char</font> *option);
00232 <font class="keyword">virtual</font> <font class="keywordtype">char</font> <a class="code" href="class_swmgr.html#a10">setCipherKey</a> (<font class="keyword">const</font> <font class="keywordtype">char</font> *modName, <font class="keyword">const</font> <font class="keywordtype">char</font> *key);
00233
<a name="l00239"></a><a class="code" href="class_swmgr.html#a11">00239</a> <font class="keyword">const</font> <font class="keywordtype">float</font> <a class="code" href="class_swmgr.html#a11">Version</a>()<font class="keyword"> const </font>{<font class="keywordflow">return</font> 1.52;};
00240 };
00241 <font class="preprocessor">#endif</font>
</font></pre></div><hr><address><small>Generated at Fri Oct 5 22:45:33 2001 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0
width=110 height=53></a>1.2.6 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
© 1997-2001</small></address>
</body>
</html>
|