diff options
author | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
---|---|---|
committer | danglassey <danglassey> | 2002-08-14 09:57:17 +0000 |
commit | daa67ff1f728c07f2a116ee9a9f4505479ca6808 (patch) | |
tree | c224a537d30480002ae0560cc9104b543b4d1b5e /include/encfiltmgr.h | |
parent | 6d6973e035aac5ec1676efccd5b8ada70c40b639 (diff) | |
download | sword-sf-cvs-daa67ff1f728c07f2a116ee9a9f4505479ca6808.tar.gz |
Initial import from crosswire CVS for syncingimport-1.1.1
Diffstat (limited to 'include/encfiltmgr.h')
-rw-r--r-- | include/encfiltmgr.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/include/encfiltmgr.h b/include/encfiltmgr.h new file mode 100644 index 0000000..f082b98 --- /dev/null +++ b/include/encfiltmgr.h @@ -0,0 +1,85 @@ +/****************************************************************************** + * swencodingmgr.h - definition of class SWEncodingMgr, subclass of + * used to transcode all module text to a requested + * markup. + * + * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org) + * CrossWire Bible Society + * P. O. Box 2528 + * Tempe, AZ 85280-2528 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation version 2. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#ifndef ENCFILTERMGR_H +#define ENCFILTERMGR_H + +#include <swfiltermgr.h> + + +/** This class is like a normal @ref SWMgr, + * but you can additonally specify which encoding + * you want to use. + */ + +class SWDLLEXPORT EncodingFilterMgr : public SWFilterMgr { + +protected: + SWFilter *latin1utf8; + SWFilter *scsuutf8; + SWFilter *targetenc; + + + /* + * current encoding value + */ + char encoding; + +public: + + + /** Constructor of SWEncodingMgr. + * + * @param iconfig + * @param isysconfig + * @param autoload If this bool is true the constructor starts loading the installed modules. If you reimplemented SWMgr you can set autoload=false to load the modules with your own reimplemented function. + * @param encoding The desired encoding. + */ + EncodingFilterMgr (char encoding = ENC_UTF8); + + /** + * The destructor of SWEncodingMgr. + */ + ~EncodingFilterMgr(); + + /** Markup sets/gets the encoding after initialization + * + * @param m The new encoding or ENC_UNKNOWN if you just want to get the current markup. + * @return The current (possibly changed) encoding format. + */ + char Encoding(char enc); + + /** + * Adds the raw filters which are defined in "section" to the SWModule object "module". + * @param module To this module the raw filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddRawFilters(SWModule *module, ConfigEntMap §ion); + + /** + * Adds the encoding filters which are defined in "section" to the SWModule object "module". + * @param module To this module the encoding filter(s) are added + * @param section We use this section to get a list of filters we should apply to the module + */ + virtual void AddEncodingFilters(SWModule *module, ConfigEntMap §ion); +}; + +#endif |