The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
swld.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * swld.h - class SWLD: the basis for all
4  * types of Lexicon and Dictionary modules (hence the 'LD').
5  *
6  * $Id: swld.h 3805 2020-09-19 12:19:28Z 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 SWLD_H
25 #define SWLD_H
26 
27 #include <swmodule.h>
28 
29 #include <defs.h>
30 
32 
36 class SWDLLEXPORT SWLD : public SWModule {
37 protected:
38  mutable char *entkeytxt;
39  static void strongsPad(char *buf);
41 public:
44  SWLD(const char *imodname = 0, const char *imoddesc = 0,
45  SWDisplay * idisp = 0, SWTextEncoding encoding = ENC_UNKNOWN,
47  SWTextMarkup markup = FMT_UNKNOWN, const char* ilang = 0, bool strongsPadding = true);
48 
49  virtual ~SWLD();
50  virtual SWKey *createKey() const;
51 
56  virtual const char *getKeyText() const;
57  virtual void setPosition(SW_POSITION pos);
58 
59 
60  virtual long getEntryCount() const = 0;
61  virtual long getEntryForKey(const char *key) const = 0;
62  virtual char *getKeyForEntry(long entry) const = 0;
63 
64  virtual bool hasEntry(const SWKey *k) const;
65 
66  // OPERATORS -----------------------------------------------------------------
67 
69 
70 };
71 
73 #endif
#define SWTextEncoding
Definition: swmodule.h:78
#define SWORD_NAMESPACE_START
Definition: defs.h:39
int pos
Definition: regex.c:5534
#define SWDLLEXPORT
Definition: defs.h:171
virtual void setPosition(SW_POSITION pos)
Definition: swmodule.cpp:327
bool strongsPadding
Definition: swld.h:40
char * entkeytxt
Definition: swld.h:38
virtual bool hasEntry(const SWKey *) const
Definition: swmodule.h:809
virtual const char * getKeyText() const
Definition: swmodule.h:304
#define SWMODULE_OPERATORS
Definition: swmodule.h:54
#define SWTextDirection
Definition: swmodule.h:77
#define SWORD_NAMESPACE_END
Definition: defs.h:40
virtual SWKey * createKey() const
Definition: swmodule.cpp:173
Definition: swkey.h:77
Definition: swld.h:36
#define SWTextMarkup
Definition: swmodule.h:79