aboutsummaryrefslogtreecommitdiffstats
path: root/doc/api-documentation/html/swmgr_8h-source.html
blob: 021061a406609b714331f12861efdfa5341c8610 (plain) (blame)
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><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>
<!-- Generated by Doxygen 1.2.17 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>swmgr.h</h1><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment">*  swmgr.h   - definition of class SWMgr used to interact with an install</span>
00003 <span class="comment">*                               base of sword modules.</span>
00004 <span class="comment">*</span>
00005 <span class="comment">* $Id: swmgr_8h-source.html,v 1.9 2002/10/31 11:30:16 joachim Exp $</span>
00006 <span class="comment">*</span>
00007 <span class="comment">* Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)</span>
00008 <span class="comment">*       CrossWire Bible Society</span>
00009 <span class="comment">*       P. O. Box 2528</span>
00010 <span class="comment">*       Tempe, AZ  85280-2528</span>
00011 <span class="comment">*</span>
00012 <span class="comment">* This program is free software; you can redistribute it and/or modify it</span>
00013 <span class="comment">* under the terms of the GNU General Public License as published by the</span>
00014 <span class="comment">* Free Software Foundation version 2.</span>
00015 <span class="comment">*</span>
00016 <span class="comment">* This program is distributed in the hope that it will be useful, but</span>
00017 <span class="comment">* WITHOUT ANY WARRANTY; without even the implied warranty of</span>
00018 <span class="comment">* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span>
00019 <span class="comment">* General Public License for more details.</span>
00020 <span class="comment">*</span>
00021 <span class="comment">*/</span>
00022 
00039 <span class="preprocessor">#ifndef SWMGR_H</span>
00040 <span class="preprocessor"></span><span class="preprocessor">#define SWMGR_H</span>
00041 <span class="preprocessor"></span>
00042 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
00043 <span class="preprocessor">#include &lt;string&gt;</span>
00044 <span class="preprocessor">#include &lt;map&gt;</span>
00045 <span class="preprocessor">#include &lt;list&gt;</span>
00046 <span class="preprocessor">#include &lt;swmodule.h&gt;</span>
00047 <span class="preprocessor">#include &lt;swconfig.h&gt;</span>
00048 <span class="preprocessor">#include &lt;swlog.h&gt;</span>
00049 <span class="preprocessor">#include &lt;swfiltermgr.h&gt;</span>
00050 
00051 <span class="preprocessor">#include &lt;defs.h&gt;</span>
00052 
00053 SWORD_NAMESPACE_START
00054 
00055 <span class="keyword">typedef</span> std::map &lt; std::string, SWModule *, std::less &lt; std::string &gt; &gt;ModMap;
00056 <span class="keyword">typedef</span> std::list &lt; std::string &gt; <a class="code" href="namespacesword.html#a82">OptionsList</a>;
00057 <span class="keyword">typedef</span> std::map &lt; std::string, SWFilter * &gt;FilterMap;
00058 
<a name="l00069"></a><a class="code" href="classsword_1_1_s_w_mgr.html">00069</a> <span class="keyword">class </span>SWDLLEXPORT <a class="code" href="classsword_1_1_s_w_mgr.html">SWMgr</a> {
00070 
00071 <span class="keyword">private</span>:
00072         <span class="keywordtype">void</span> commonInit(<a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> * iconfig, <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> * isysconfig, <span class="keywordtype">bool</span> autoload, SWFilterMgr *filterMgr);
00073 
00074 <span class="keyword">protected</span>:
00075         SWFilterMgr *filterMgr;         <span class="comment">//made protected because because BibleTime needs it</span>
00076         <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> * myconfig;            <span class="comment">//made protected because because BibleTime needs it</span>
00077         <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> *mysysconfig;
00078         <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> *homeConfig;
00079         <span class="keywordtype">void</span> CreateMods();
00080         <a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> *CreateMod(std::string name, std::string driver, ConfigEntMap &amp; section);
00081         <span class="keywordtype">void</span> DeleteMods();
00082         <span class="keywordtype">char</span> configType;                <span class="comment">// 0 = file; 1 = directory</span>
00083         FilterMap optionFilters;
00084         FilterMap cipherFilters;
00085         SWFilter *gbfplain;
00086         SWFilter *thmlplain;
00087         SWFilter *transliterator;
00088         FilterList cleanupFilters;
00089         <a class="code" href="namespacesword.html#a82">OptionsList</a> options;
00090         <span class="keyword">virtual</span> <span class="keywordtype">void</span> init(); <span class="comment">// use to initialize before loading modules</span>
00091         <span class="keyword">virtual</span> <span class="keywordtype">char</span> AddModToConfig(<span class="keywordtype">int</span> conffd, <span class="keyword">const</span> <span class="keywordtype">char</span> *fname);
00092         <span class="keyword">virtual</span> <span class="keywordtype">void</span> loadConfigDir(<span class="keyword">const</span> <span class="keywordtype">char</span> *ipath);
00093         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddGlobalOptions(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section,
00094         ConfigEntMap::iterator start,
00095         ConfigEntMap::iterator end);
00096         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddLocalOptions(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section,
00097         ConfigEntMap::iterator start,
00098         ConfigEntMap::iterator end);
00099         std::list&lt;std::string&gt; augPaths;
00100 
00106         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddEncodingFilters(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section);
00112         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddRenderFilters(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section);
00118         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddStripFilters(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section);
00124         <span class="keyword">virtual</span> <span class="keywordtype">void</span> AddRawFilters(<a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> * module, ConfigEntMap &amp; section);
00125 
00126         <span class="keyword">virtual</span> <span class="keywordtype">void</span> augmentModules(<span class="keyword">const</span> <span class="keywordtype">char</span> *ipath);
00127 
00128 <span class="keyword">public</span>:
00129 
00134         <span class="keyword">static</span> <span class="keywordtype">bool</span> debug;
00135         <span class="keyword">static</span> <span class="keywordtype">bool</span> isICU;
00136         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *globalConfPath;
00140         <span class="keyword">static</span> <span class="keywordtype">void</span> findConfig(<span class="keywordtype">char</span> *configType, <span class="keywordtype">char</span> **prefixPath, <span class="keywordtype">char</span> **configPath, std::list&lt;std::string&gt; *augPaths = 0);
<a name="l00149"></a><a class="code" href="classsword_1_1_s_w_mgr.html#m0">00149</a>         <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> *config;
00153         <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> *sysconfig;
<a name="l00176"></a><a class="code" href="classsword_1_1_s_w_mgr.html#m2">00176</a>         ModMap Modules;
00177         <a class="code" href="classsword_1_1_s_w_module.html">SWModule</a> *getModule(<span class="keyword">const</span> <span class="keywordtype">char</span> *modName) { ModMap::iterator it = Modules.find(modName); <span class="keywordflow">return</span> ((it != Modules.end()) ? it-&gt;second : 0); }
<a name="l00181"></a><a class="code" href="classsword_1_1_s_w_mgr.html#m3">00181</a>         <span class="keywordtype">char</span> *prefixPath;
00185         <span class="keywordtype">char</span> *configPath;
00186 
00194         <a class="code" href="classsword_1_1_s_w_mgr.html">SWMgr</a>(<a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> * iconfig = 0, <a class="code" href="classsword_1_1_s_w_config.html">SWConfig</a> * isysconfig = 0, <span class="keywordtype">bool</span> autoload = <span class="keyword">true</span>, SWFilterMgr *filterMgr = 0);
00199         <a class="code" href="classsword_1_1_s_w_mgr.html">SWMgr</a>(SWFilterMgr *filterMgr);
00209         <a class="code" href="classsword_1_1_s_w_mgr.html">SWMgr</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *iConfigPath, <span class="keywordtype">bool</span> autoload = <span class="keyword">true</span>, SWFilterMgr *filterMgr = 0);
00215         <span class="keyword">virtual</span> ~<a class="code" href="classsword_1_1_s_w_mgr.html">SWMgr</a>();
00219         <span class="keyword">virtual</span> <span class="keywordtype">void</span> InstallScan(<span class="keyword">const</span> <span class="keywordtype">char</span> *dir);
00224         <span class="keyword">virtual</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> Load();
00232         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setGlobalOption(<span class="keyword">const</span> <span class="keywordtype">char</span> *option, <span class="keyword">const</span> <span class="keywordtype">char</span> *value);
00237         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *getGlobalOption(<span class="keyword">const</span> <span class="keywordtype">char</span> *option);
00243         <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *getGlobalOptionTip(<span class="keyword">const</span> <span class="keywordtype">char</span> *option);
00247         <span class="keyword">virtual</span> <a class="code" href="namespacesword.html#a82">OptionsList</a> getGlobalOptions();
00251         <span class="keyword">virtual</span> <a class="code" href="namespacesword.html#a82">OptionsList</a> getGlobalOptionValues(<span class="keyword">const</span> <span class="keywordtype">char</span> *option);
00293         <span class="keyword">virtual</span> <span class="keywordtype">signed</span> <span class="keywordtype">char</span> setCipherKey(<span class="keyword">const</span> <span class="keywordtype">char</span> *modName, <span class="keyword">const</span> <span class="keywordtype">char</span> *key);
00294 };
00295 
00296 SWORD_NAMESPACE_END
00297 <span class="preprocessor">#endif</span>
</pre></div><hr><address style="align: right;"><small>Generated on Thu Oct 31 12:11:28 2002 for The Sword Project by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.17 </small></address>
</body>
</html>