The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swmodule.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * swmodule.h - class SWModule: the basis for all types of modules
4  * (e.g. Bibles, commentaries, maps, lexicons, general books, etc.)
5  *
6  * $Id: swmodule.h 3846 2021-02-24 21:04:04Z scribe $
7  *
8  * Copyright 1997-2013 CrossWire Bible Society (http://www.crosswire.org)
9  * CrossWire Bible Society
10  * P. O. Box 2528
11  * Tempe, AZ 85280-2528
12  *
13  * This program is free software; you can redistribute it and/or modify it
14  * under the terms of the GNU General Public License as published by the
15  * Free Software Foundation version 2.
16  *
17  * This program is distributed in the hope that it will be useful, but
18  * WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  * General Public License for more details.
21  *
22  */
23 
24 #ifndef SWMODULE_H
25 #define SWMODULE_H
26 
27 #include <swdisp.h>
28 #include <listkey.h>
29 #include <swconfig.h>
30 
31 #include <swcacher.h>
32 #include <swsearchable.h>
33 #ifndef _WIN32_WCE
34 #include <iostream>
35 #endif
36 
37 #include <list>
38 
39 #include <defs.h>
40 
42 
43 
47 enum {BIB_BIBTEX = 0, /* possible future formats: BIB_MARCXML, BIB_MARC21, BIB_DCMI BIB_OSISHEADER, BIB_SBL_XHTML, BIB_MLA_XHTML, BIB_APA_XHTML, BIB_CHICAGO_XHTML */};
48 
49 
50 class SWOptionFilter;
51 class SWFilter;
52 
53 
54 #define SWMODULE_OPERATORS \
55  operator SWBuf() { return renderText(); } \
56  operator SWKey &() { return *getKey(); } \
57  operator SWKey *() { return getKey(); } \
58  SWModule &operator <<(const char *inbuf) { setEntry(inbuf); return *this; } \
59  SWModule &operator <<(const SWKey *sourceKey) { linkEntry(sourceKey); return *this; } \
60  SWModule &operator -=(int steps) { decrement(steps); return *this; } \
61  SWModule &operator +=(int steps) { increment(steps); return *this; } \
62  SWModule &operator ++(int) { return *this += 1; } \
63  SWModule &operator --(int) { return *this -= 1; } \
64  SWModule &operator =(SW_POSITION p) { setPosition(p); return *this; } \
65  \
68  SWDEPRECATED operator const char *() { static SWBuf unsafeTmp = renderText(); return unsafeTmp.c_str(); }
69 
70 
71 typedef std::list < SWFilter * >FilterList;
72 typedef std::list < SWOptionFilter * >OptionFilterList;
73 typedef std::map < SWBuf, SWBuf, std::less < SWBuf > > AttributeValue;
74 typedef std::map < SWBuf, AttributeValue, std::less < SWBuf > > AttributeList;
75 typedef std::map < SWBuf, AttributeList, std::less < SWBuf > > AttributeTypeList;
76 
77 #define SWTextDirection char
78 #define SWTextEncoding char
79 #define SWTextMarkup char
80 
90 // TODO: should all SWModule decendents be SWCachers? Only some really
91 // cache data. But if we don't do this, then we need another mechanism to
92 // check if we are an SWCacher. Maybe make SWModule extend SWObject (which
93 // it probably should anyway. But then we need to add all the cheezy
94 // heirarchy info to all the decendent classes for our SWDYNAMIC_CAST and
95 // then we can see if we implement SWCacher so we know whether or not to add
96 // to the yet to be developed cachemgr.
97 // Just leave for now. This lets us always able to call module->flush()
98 // to manually flush a cache, and doesn't hurt if there is no work done.
99 
100 
101 class SWDLLEXPORT SWModule : public SWCacher, public SWSearchable {
102 
103 private:
104  class StdOutDisplay : public SWDisplay {
105  char display(SWModule &imodule) {
106 #ifndef _WIN32_WCE
107  std::cout << imodule.renderText();
108 #endif
109  return 0;
110  }
111  };
112 
113 protected:
114 
118  mutable bool procEntAttr;
119 
120  mutable char error;
122 
125 
127  char *modname;
128  char *moddesc;
129  char *modtype;
130  char *modlang;
131 
132  char direction;
133  char markup;
134  char encoding;
135 
138 
140  mutable SWBuf entryBuf;
141 
144 
147 
150 
153 
156 
157  mutable int entrySize;
158  mutable long entryIndex; // internal common storage for index
159 
160  static void prepText(SWBuf &buf);
161 
162 
163 public:
164  // used for matching whole entry (not substring) in entry attributes searches.
165  static const signed int SEARCHFLAG_MATCHWHOLEENTRY;
166 
167  // used for turning off the default behavior of SWORD to use a sliding search window
168  // which allows hits across verse boundaries.
169  static const signed int SEARCHFLAG_STRICTBOUNDARIES;
170 
171  static const signed int SEARCHTYPE_REGEX;
172  static const signed int SEARCHTYPE_PHRASE;
173  static const signed int SEARCHTYPE_MULTIWORD;
174  static const signed int SEARCHTYPE_ENTRYATTR;
175  static const signed int SEARCHTYPE_EXTERNAL;
176 
182 
194  SWModule(const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, const char *imodtype = 0, SWTextEncoding encoding = ENC_UNKNOWN, SWTextDirection dir = DIRECTION_LTR, SWTextMarkup markup = FMT_UNKNOWN, const char *modlang = 0);
195 
198  virtual ~SWModule();
199 
204  virtual char popError();
208  SWDEPRECATED virtual char Error() { return popError(); }
209 
213  virtual bool isUnicode() const { return (encoding == (char)ENC_UTF8 || encoding == (char)ENC_SCSU); }
214 
215  // These methods are useful for modules that come from a standard SWORD install (most do).
216  // SWMgr will call setConfig. The user may use getConfig and getConfigEntry (if they
217  // are not comfortable with, or don't wish to use stl maps).
218  virtual void setConfig(ConfigEntMap *config);
219  virtual const ConfigEntMap &getConfig() const { return *config; }
220 
230  virtual const char *getConfigEntry(const char *key) const;
231 
238  virtual SWBuf getBibliography(unsigned char bibFormat = BIB_BIBTEX) const;
239 
243  virtual int getEntrySize() const { return entrySize; }
244 
251  virtual char setKey(const SWKey *ikey);
252 
260  inline char setKeyText(const char *keyText) { getKey()->setText(keyText); return key->getError(); }
261 
267  char setKey(const SWKey &ikey) { return setKey(&ikey); }
268 
272  SWDEPRECATED char SetKey(const SWKey *ikey) { return setKey(ikey); }
276  SWDEPRECATED char SetKey(const SWKey &ikey) { return setKey(ikey); }
280  SWDEPRECATED char Key(const SWKey & ikey) { return setKey(ikey); }
281 
285  virtual SWKey *getKey() const;
289  SWDEPRECATED SWKey &Key() const { return *getKey(); }
290 
297  SWDEPRECATED const char *KeyText(const char *ikeytext = 0) { if (ikeytext) setKey(ikeytext); return *getKey(); }
298 
304  virtual const char *getKeyText() const {
305  return *getKey();
306  }
307 
308 
309  virtual long getIndex() const { return entryIndex; }
310  virtual void setIndex(long iindex) { entryIndex = iindex; }
314  SWDEPRECATED long Index() const { return getIndex(); }
318  SWDEPRECATED long Index(long iindex) { setIndex(iindex); return getIndex(); }
319 
324  virtual char display();
328  SWDEPRECATED char Display() { return display(); }
329 
334  virtual SWDisplay *getDisplay() const;
335 
340  virtual void setDisplay(SWDisplay * idisp);
341 
345  SWDEPRECATED SWDisplay *Disp(SWDisplay * idisp = 0) { if (idisp) setDisplay(idisp); return getDisplay(); }
346 
351  const char *getName() const;
355  SWDEPRECATED const char *Name() const { return getName(); }
356 
363  SWDEPRECATED const char *Name(const char *imodname) { stdstr(&modname, imodname); return getName(); }
364 
369  const char *getDescription() const;
373  SWDEPRECATED const char *Description() const { return getDescription(); }
374 
381  SWDEPRECATED const char *Description(const char *imoddesc) { stdstr(&moddesc, imoddesc); return getDescription(); }
382 
387  const char *getType() const;
391  SWDEPRECATED const char *Type() const { return getType(); }
392 
397  void setType(const char *imodtype) { stdstr(&modtype, imodtype); }
401  SWDEPRECATED const char *Type(const char *imodtype) { setType(imodtype); return getType(); }
402 
407  virtual char getDirection() const;
411  SWDEPRECATED char Direction(signed char newdir = -1) { char retVal = getDirection(); if (newdir != -1) return direction = newdir; return retVal; }
412 
417  char getEncoding() const { return encoding; }
421  SWDEPRECATED char Encoding(signed char enc = -1) { char retVal = getEncoding(); if (enc != -1) encoding = enc; return retVal; }
422 
427  char getMarkup() const { return markup; }
431  SWDEPRECATED char Markup(signed char imarkup = -1) { char retVal = getMarkup(); if (imarkup != -1) markup = imarkup; return retVal; }
432 
437  const char *getLanguage() const { return modlang; }
441  SWDEPRECATED const char *Lang(char *imodlang = 0) { if (imodlang != 0) stdstr(&modlang, imodlang); return getLanguage(); }
442 
443 
444  // search interface -------------------------------------------------
445 
467  virtual ListKey &search(const char *istr, int searchType = 0, int flags = 0,
468  SWKey *scope = 0,
469  bool *justCheckIfSupported = 0,
470  void (*percent) (char, void *) = &nullPercent,
471  void *percentUserData = 0);
472 
473  // for backward compat-- deprecated
474 
478  SWDEPRECATED ListKey &Search(const char *istr, int searchType = 0, int flags = 0, SWKey * scope = 0, bool * justCheckIfSupported = 0, void (*percent) (char, void *) = &nullPercent, void *percentUserData = 0) { return search(istr, searchType, flags, scope, justCheckIfSupported, percent, percentUserData); }
479 
480 
488  virtual SWKey *createKey() const;
492  SWDEPRECATED SWKey *CreateKey() const { return createKey(); }
493 
498  virtual SWBuf &getRawEntryBuf() const = 0;
499 
500  const char *getRawEntry() const { return getRawEntryBuf().c_str(); }
501 
502  // write interface ----------------------------
506  virtual bool isWritable() const { return false; }
507 
512  static signed char createModule(const char *path);
513 
516  virtual void setEntry(const char *inbuf, long len= -1);
517 
521  virtual void linkEntry(const SWKey *sourceKey);
522 
525  virtual void deleteEntry() {}
526 
527  // end write interface ------------------------
528 
532  virtual void decrement(int steps = 1);
533 
537  virtual void increment(int steps = 1);
538 
542  virtual void setPosition(SW_POSITION pos);
543 
549  virtual void filterBuffer(OptionFilterList *filters, SWBuf &buf, const SWKey *key) const;
550 
556  virtual void filterBuffer(FilterList *filters, SWBuf &buf, const SWKey *key) const;
557 
564  virtual SWModule &addRenderFilter(SWFilter *newFilter) {
565  renderFilters->push_back(newFilter);
566  return *this;
567  }
571  SWDEPRECATED SWModule &AddRenderFilter(SWFilter *newFilter) { return addRenderFilter(newFilter); }
572 
577  virtual const FilterList &getRenderFilters() const {
578  return *renderFilters;
579  }
580 
585  virtual SWModule &removeRenderFilter(SWFilter *oldFilter) {
586  renderFilters->remove(oldFilter);
587  return *this;
588  }
592  SWDEPRECATED SWModule &RemoveRenderFilter(SWFilter *oldFilter) { return removeRenderFilter(oldFilter); }
593 
599  virtual SWModule &replaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter) {
600  FilterList::iterator iter;
601  for (iter = renderFilters->begin(); iter != renderFilters->end(); iter++) {
602  if (*iter == oldFilter)
603  *iter = newFilter;
604  }
605  return *this;
606  }
610  SWDEPRECATED SWModule &ReplaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter) { return replaceRenderFilter(oldFilter, newFilter); }
611 
616  virtual void renderFilter(SWBuf &buf, const SWKey *key) const {
617  filterBuffer(renderFilters, buf, key);
618  }
619 
627  virtual SWModule &addEncodingFilter(SWFilter *newFilter) {
628  encodingFilters->push_back(newFilter);
629  return *this;
630  }
634  SWDEPRECATED SWModule &AddEncodingFilter(SWFilter *newFilter) { return addEncodingFilter(newFilter); }
635 
640  virtual SWModule &removeEncodingFilter(SWFilter *oldFilter) {
641  encodingFilters->remove(oldFilter);
642  return *this;
643  }
647  SWDEPRECATED SWModule &RemoveEncodingFilter(SWFilter *oldFilter) { return removeEncodingFilter(oldFilter); }
648 
654  virtual SWModule &replaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter) {
655  FilterList::iterator iter;
656  for (iter = encodingFilters->begin(); iter != encodingFilters->end(); iter++) {
657  if (*iter == oldFilter)
658  *iter = newFilter;
659  }
660  return *this;
661  }
665  SWDEPRECATED SWModule &ReplaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter) { return replaceEncodingFilter(oldFilter, newFilter); }
666 
671  virtual void encodingFilter(SWBuf &buf, const SWKey *key) const {
672  filterBuffer(encodingFilters, buf, key);
673  }
674 
681  virtual SWModule &addStripFilter(SWFilter *newFilter) {
682  stripFilters->push_back(newFilter);
683  return *this;
684  }
688  SWDEPRECATED SWModule &AddStripFilter(SWFilter *newFilter) { return addStripFilter(newFilter); }
689 
694  virtual SWModule &addRawFilter(SWFilter *newFilter) {
695  rawFilters->push_back(newFilter);
696  return *this;
697  }
701  SWDEPRECATED SWModule &AddRawFilter(SWFilter *newFilter) { return addRawFilter(newFilter); }
702 
707  virtual void stripFilter(SWBuf &buf, const SWKey *key) const {
708  filterBuffer(stripFilters, buf, key);
709  }
710 
711 
716  virtual void rawFilter(SWBuf &buf, const SWKey *key) const {
717  filterBuffer(rawFilters, buf, key);
718  }
719 
727  virtual SWModule &addOptionFilter(SWOptionFilter *newFilter) {
728  optionFilters->push_back(newFilter);
729  return *this;
730  }
734  SWDEPRECATED SWModule &AddOptionFilter(SWOptionFilter *newFilter) { return addOptionFilter(newFilter); }
735 
736  virtual const OptionFilterList &getOptionFilters() const { return *optionFilters; }
737 
742  virtual void optionFilter(SWBuf &buf, const SWKey *key) const {
743  filterBuffer(optionFilters, buf, key);
744  }
745 
754  virtual const char *stripText(const char *buf = 0, int len = -1);
758  SWDEPRECATED const char *StripText(const char *buf = 0, int len = -1) { return stripText(buf, len); }
759 
768  SWBuf renderText(const char *buf, int len = -1, bool render = true) const;
769  SWBuf renderText();
773  SWDEPRECATED const char *RenderText(const char *buf = 0, int len = -1, bool render = true) { return renderText(buf, len, render); }
774 
779  virtual const char *getRenderHeader() const;
780 
785  virtual const char *stripText(const SWKey *tmpKey);
786 
791  SWBuf renderText(const SWKey *tmpKey);
792 
797  virtual void setSkipConsecutiveLinks(bool val) { skipConsecutiveLinks = val; }
798 
802  virtual bool isSkipConsecutiveLinks() { return skipConsecutiveLinks; }
806  SWDEPRECATED bool getSkipConsecutiveLinks() { return isSkipConsecutiveLinks(); }
807 
808  virtual bool isLinked(const SWKey *, const SWKey *) const { return false; }
809  virtual bool hasEntry(const SWKey *) const { return false; }
810 
817  virtual AttributeTypeList &getEntryAttributes() const { return entryAttributes; }
818 
824  virtual void setProcessEntryAttributes(bool val) const { procEntAttr = val; }
828  SWDEPRECATED void processEntryAttributes(bool val) const { setProcessEntryAttributes(val); }
829 
832  virtual bool isProcessEntryAttributes() const { return procEntAttr; }
833 
834 
835  // SWSearchable Interface Impl -----------------------------------------------
836  virtual signed char createSearchFramework(
837  void (*percent) (char, void *) = &nullPercent,
838  void *percentUserData = 0);
839  virtual void deleteSearchFramework();
840  virtual bool hasSearchFramework();
841 
842  // OPERATORS -----------------------------------------------------------------
844 
845 };
846 
848 #endif
SWDEPRECATED char SetKey(const SWKey &ikey)
Definition: swmodule.h:276
ListKey listKey
Definition: swmodule.h:126
#define SWTextEncoding
Definition: swmodule.h:78
const char * getLanguage() const
Definition: swmodule.h:437
#define SWORD_NAMESPACE_START
Definition: defs.h:39
virtual bool isUnicode() const
Definition: swmodule.h:213
virtual void renderFilter(SWBuf &buf, const SWKey *key) const
Definition: swmodule.h:616
Definition: swbuf.h:47
virtual SWModule & addEncodingFilter(SWFilter *newFilter)
Definition: swmodule.h:627
char * modname
Definition: swmodule.h:127
char encoding
Definition: swmodule.h:134
virtual void setIndex(long iindex)
Definition: swmodule.h:310
int pos
Definition: regex.c:5534
char * moddesc
Definition: swmodule.h:128
#define SWDLLEXPORT
Definition: defs.h:171
virtual void rawFilter(SWBuf &buf, const SWKey *key) const
Definition: swmodule.h:716
virtual void deleteSearchFramework()
virtual void deleteEntry()
Definition: swmodule.h:525
virtual SWModule & addRenderFilter(SWFilter *newFilter)
Definition: swmodule.h:564
virtual void optionFilter(SWBuf &buf, const SWKey *key) const
Definition: swmodule.h:742
std::map< SWBuf, AttributeList, std::less< SWBuf > > AttributeTypeList
Definition: swmodule.h:75
static StdOutDisplay rawdisp
Definition: swmodule.h:139
FilterList * stripFilters
Definition: swmodule.h:143
SWDEPRECATED const char * Lang(char *imodlang=0)
Definition: swmodule.h:441
std::list< SWOptionFilter * > OptionFilterList
Definition: swmgr.h:81
SWDEPRECATED bool getSkipConsecutiveLinks()
Definition: swmodule.h:806
virtual ListKey & search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)=0
SWDEPRECATED SWModule & RemoveEncodingFilter(SWFilter *oldFilter)
Definition: swmodule.h:647
SWDisplay * disp
Definition: swmodule.h:137
char getMarkup() const
Definition: swmodule.h:427
virtual int getEntrySize() const
Definition: swmodule.h:243
char * modtype
Definition: swmodule.h:129
ConfigEntMap * config
Definition: swmodule.h:116
#define SWDEPRECATED
Definition: defs.h:174
virtual void setSkipConsecutiveLinks(bool val)
Definition: swmodule.h:797
SWBuf renderText(const char *buf, int len=-1, bool render=true) const
Definition: swmodule.cpp:1038
virtual signed char createSearchFramework(void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)
virtual void encodingFilter(SWBuf &buf, const SWKey *key) const
Definition: swmodule.h:671
virtual SWModule & replaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter)
Definition: swmodule.h:654
char direction
Definition: swmodule.h:132
virtual bool isLinked(const SWKey *, const SWKey *) const
Definition: swmodule.h:808
SWDEPRECATED const char * Description(const char *imoddesc)
Definition: swmodule.h:381
SWDEPRECATED SWModule & RemoveRenderFilter(SWFilter *oldFilter)
Definition: swmodule.h:592
char error
Definition: swmodule.h:120
SWDEPRECATED const char * Type() const
Definition: swmodule.h:391
SWDEPRECATED char Direction(signed char newdir=-1)
Definition: swmodule.h:411
std::map< SWBuf, SWBuf, std::less< SWBuf > > AttributeValue
Definition: swmodule.h:73
SWORD_NAMESPACE_START char * stdstr(char **ipstr, const char *istr, unsigned int memPadFactor=1)
Definition: utilstr.h:44
static const signed int SEARCHTYPE_MULTIWORD
Definition: swmodule.h:173
char setKey(const SWKey &ikey)
Definition: swmodule.h:267
SWDEPRECATED const char * KeyText(const char *ikeytext=0)
Definition: swmodule.h:297
SWDEPRECATED ListKey & Search(const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0)
Definition: swmodule.h:478
SWDEPRECATED SWModule & ReplaceEncodingFilter(SWFilter *oldFilter, SWFilter *newFilter)
Definition: swmodule.h:665
virtual long getIndex() const
Definition: swmodule.h:309
virtual SWDEPRECATED char Error()
Definition: swmodule.h:208
virtual bool hasSearchFramework()
Definition: swsearchable.h:89
SWDEPRECATED const char * RenderText(const char *buf=0, int len=-1, bool render=true)
Definition: swmodule.h:773
virtual const FilterList & getRenderFilters() const
Definition: swmodule.h:577
std::list< SWFilter * > FilterList
Definition: swmgr.h:80
static const signed int SEARCHTYPE_REGEX
Definition: swmodule.h:171
static const signed int SEARCHTYPE_EXTERNAL
Definition: swmodule.h:175
virtual bool isWritable() const
Definition: swmodule.h:506
bool skipConsecutiveLinks
Definition: swmodule.h:121
AttributeTypeList entryAttributes
Definition: swmodule.h:117
SWDEPRECATED char Key(const SWKey &ikey)
Definition: swmodule.h:280
virtual const OptionFilterList & getOptionFilters() const
Definition: swmodule.h:736
FilterList * renderFilters
Definition: swmodule.h:149
SWDEPRECATED long Index(long iindex)
Definition: swmodule.h:318
virtual SWModule & addOptionFilter(SWOptionFilter *newFilter)
Definition: swmodule.h:727
virtual bool hasEntry(const SWKey *) const
Definition: swmodule.h:809
FilterList * rawFilters
Definition: swmodule.h:146
virtual SWModule & removeRenderFilter(SWFilter *oldFilter)
Definition: swmodule.h:585
char getEncoding() const
Definition: swmodule.h:417
SWDEPRECATED const char * Description() const
Definition: swmodule.h:373
virtual SWModule & addRawFilter(SWFilter *newFilter)
Definition: swmodule.h:694
FilterList * encodingFilters
Definition: swmodule.h:155
virtual SWModule & addStripFilter(SWFilter *newFilter)
Definition: swmodule.h:681
int entrySize
Definition: swmodule.h:157
virtual bool isProcessEntryAttributes() const
Definition: swmodule.h:832
virtual AttributeTypeList & getEntryAttributes() const
Definition: swmodule.h:817
virtual void setProcessEntryAttributes(bool val) const
Definition: swmodule.h:824
virtual const char * getKeyText() const
Definition: swmodule.h:304
SWDEPRECATED long Index() const
Definition: swmodule.h:314
bool procEntAttr
Definition: swmodule.h:118
ConfigEntMap ownConfig
Definition: swmodule.h:115
SWDEPRECATED const char * Name() const
Definition: swmodule.h:355
SWDEPRECATED const char * StripText(const char *buf=0, int len=-1)
Definition: swmodule.h:758
SWDEPRECATED const char * Type(const char *imodtype)
Definition: swmodule.h:401
#define SWMODULE_OPERATORS
Definition: swmodule.h:54
SWORD_NAMESPACE_START typedef multimapwithdefault< SWBuf, SWBuf, std::less< SWBuf > > ConfigEntMap
Definition: swconfig.h:35
SWBuf entryBuf
Definition: swmodule.h:140
SWDEPRECATED SWModule & AddEncodingFilter(SWFilter *newFilter)
Definition: swmodule.h:634
char setKeyText(const char *keyText)
Definition: swmodule.h:260
SWDEPRECATED char Display()
Definition: swmodule.h:328
static const signed int SEARCHFLAG_MATCHWHOLEENTRY
Definition: swmodule.h:165
SWDEPRECATED const char * Name(const char *imodname)
Definition: swmodule.h:363
#define SWTextDirection
Definition: swmodule.h:77
SWKey * key
Definition: swmodule.h:124
#define SWORD_NAMESPACE_END
Definition: defs.h:40
OptionFilterList * optionFilters
Definition: swmodule.h:152
SWDEPRECATED SWKey & Key() const
Definition: swmodule.h:289
void setType(const char *imodtype)
Definition: swmodule.h:397
Definition: swkey.h:77
const char * getRawEntry() const
Definition: swmodule.h:500
bool terminateSearch
Definition: swmodule.h:181
virtual SWModule & removeEncodingFilter(SWFilter *oldFilter)
Definition: swmodule.h:640
char display(SWModule &imodule)
Definition: swmodule.h:105
#define SWTextMarkup
Definition: swmodule.h:79
std::map< SWBuf, AttributeValue, std::less< SWBuf > > AttributeList
Definition: swmodule.h:74
SWDEPRECATED SWDisplay * Disp(SWDisplay *idisp=0)
Definition: swmodule.h:345
SWDEPRECATED SWModule & AddOptionFilter(SWOptionFilter *newFilter)
Definition: swmodule.h:734
SWDEPRECATED void processEntryAttributes(bool val) const
Definition: swmodule.h:828
SWDEPRECATED char SetKey(const SWKey *ikey)
Definition: swmodule.h:272
SWDEPRECATED SWKey * CreateKey() const
Definition: swmodule.h:492
virtual bool isSkipConsecutiveLinks()
Definition: swmodule.h:802
virtual void stripFilter(SWBuf &buf, const SWKey *key) const
Definition: swmodule.h:707
SWDEPRECATED char Encoding(signed char enc=-1)
Definition: swmodule.h:421
char markup
Definition: swmodule.h:133
virtual const ConfigEntMap & getConfig() const
Definition: swmodule.h:219
SWDEPRECATED SWModule & AddStripFilter(SWFilter *newFilter)
Definition: swmodule.h:688
char * modlang
Definition: swmodule.h:130
SWDEPRECATED SWModule & AddRawFilter(SWFilter *newFilter)
Definition: swmodule.h:701
static const signed int SEARCHTYPE_PHRASE
Definition: swmodule.h:172
SWDEPRECATED SWModule & ReplaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter)
Definition: swmodule.h:610
long entryIndex
Definition: swmodule.h:158
SWDEPRECATED SWModule & AddRenderFilter(SWFilter *newFilter)
Definition: swmodule.h:571
SWDEPRECATED char Markup(signed char imarkup=-1)
Definition: swmodule.h:431
static const signed int SEARCHTYPE_ENTRYATTR
Definition: swmodule.h:174
virtual SWModule & replaceRenderFilter(SWFilter *oldFilter, SWFilter *newFilter)
Definition: swmodule.h:599
static const signed int SEARCHFLAG_STRICTBOUNDARIES
Definition: swmodule.h:169