The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
encfiltmgr.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * encfiltmgr.h - class SWEncodingMgr: a FilterMgr which applies
4  * appropriate EncodingFilters to obtain a requested
5  * encoding
6  *
7  * $Id: encfiltmgr.h 3808 2020-10-02 13:23:34Z scribe $
8  *
9  * Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
10  * CrossWire Bible Society
11  * P. O. Box 2528
12  * Tempe, AZ 85280-2528
13  *
14  * This program is free software; you can redistribute it and/or modify it
15  * under the terms of the GNU General Public License as published by the
16  * Free Software Foundation version 2.
17  *
18  * This program is distributed in the hope that it will be useful, but
19  * WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21  * General Public License for more details.
22  *
23  */
24 
25 #ifndef ENCFILTERMGR_H
26 #define ENCFILTERMGR_H
27 
28 #include <swmodule.h>
29 #include <swfiltermgr.h>
30 
32 
33 class SWFilter;
34 
41 
42 protected:
47 
48 
49  /*
50  * current encoding value
51  */
52  char encoding;
53 
54 public:
55 
56 
61  EncodingFilterMgr(char encoding = ENC_UTF8);
62 
67 
75  char Encoding(char enc) { if (enc != ENC_UNKNOWN) setEncoding(enc); return getEncoding(); }
76 
81  char getEncoding() const { return encoding; }
82 
87  void setEncoding(char enc);
88 
94  virtual void addRawFilters(SWModule *module, ConfigEntMap &section);
95 
101  virtual void addEncodingFilters(SWModule *module, ConfigEntMap &section);
102 };
103 
105 #endif
SWFilter * utf16utf8
Definition: encfiltmgr.h:45
#define SWORD_NAMESPACE_START
Definition: defs.h:39
#define SWDLLEXPORT
Definition: defs.h:171
virtual void addRawFilters(SWModule *module, ConfigEntMap &section)
Definition: swfiltermgr.cpp:92
char Encoding(char enc)
Definition: encfiltmgr.h:75
SWText * module
Definition: osis2mod.cpp:105
char getEncoding() const
Definition: encfiltmgr.h:81
SWFilter * targetenc
Definition: encfiltmgr.h:46
virtual void addEncodingFilters(SWModule *module, ConfigEntMap &section)
Definition: swfiltermgr.cpp:62
SWFilter * latin1utf8
Definition: encfiltmgr.h:43
SWORD_NAMESPACE_START typedef multimapwithdefault< SWBuf, SWBuf, std::less< SWBuf > > ConfigEntMap
Definition: swconfig.h:35
SWFilter * scsuutf8
Definition: encfiltmgr.h:44
#define SWORD_NAMESPACE_END
Definition: defs.h:40