The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swfilter.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * swfilter.h - class SWFilter: the base for all Filters in SWORD
4  * a Filter manipulates the text stream in some way,
5  * usually converting text between different markups,
6  * encoding, to show or hide text features
7  * for the user, or to strip markup for searching
8  *
9  * $Id: swfilter.h 3786 2020-08-30 11:35:14Z scribe $
10  *
11  * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
12  * CrossWire Bible Society
13  * P. O. Box 2528
14  * Tempe, AZ 85280-2528
15  *
16  * This program is free software; you can redistribute it and/or modify it
17  * under the terms of the GNU General Public License as published by the
18  * Free Software Foundation version 2.
19  *
20  * This program is distributed in the hope that it will be useful, but
21  * WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23  * General Public License for more details.
24  *
25  */
26 
27 #ifndef SWFILTER_H
28 #define SWFILTER_H
29 
30 #include <defs.h>
31 
33 
34 class SWKey;
35 class SWBuf;
36 class SWModule;
37 
38 
39 class SWModule;
40 
46 public:
47  virtual ~SWFilter() {}
48 
57  virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0) = 0;
58 
62  virtual const char *getHeader() const { return ""; }
63 };
64 
66 #endif
#define SWORD_NAMESPACE_START
Definition: defs.h:39
Definition: swbuf.h:47
#define SWDLLEXPORT
Definition: defs.h:171
SWText * module
Definition: osis2mod.cpp:105
virtual ~SWFilter()
Definition: swfilter.h:47
virtual const char * getHeader() const
Definition: swfilter.h:62
#define SWORD_NAMESPACE_END
Definition: defs.h:40
Definition: swkey.h:77