The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
osishtmlhref.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * osishtmlhref.h - class OSISHTMLHREF: a RenderFilter to render HTMLHREF
4  * from modules marked up in OSIS
5  *
6  * $Id: osishtmlhref.h 3786 2020-08-30 11:35:14Z scribe $
7  *
8  * Copyright 2003-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 OSISHTMLHREF_H
25 #define OSISHTMLHREF_H
26 
27 #include <swbasicfilter.h>
28 
30 
34 private:
35  bool morphFirst;
37 protected:
38  // used by derived classes so we have it in the header
39  class TagStacks;
41  public:
43  bool inBold; // TODO: obsolete. left for binary compat for 1.6.x
44  bool inXRefNote;
49  TagStacks *tagStacks; // TODO: modified to wrap all TagStacks necessary for this filter until 1.7.x
50 // TagStack *hiStack; // TODO: commented out for binary compat for 1.6.x wrapped in tagStacks until 1.7.x
55  MyUserData(const SWModule *module, const SWKey *key);
56  ~MyUserData();
57  };
58  virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
59  return new MyUserData(module, key);
60  }
61  virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
62 public:
63  OSISHTMLHREF();
64  void setMorphFirst(bool val = true) { morphFirst = val; }
65  void setRenderNoteNumbers(bool val = true) { renderNoteNumbers = val; }
66 };
67 
69 #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
bool handleToken(SWBuf &text, XMLTag token)
Definition: osis2mod.cpp:617
bool renderNoteNumbers
Definition: osishtmlhref.h:36
void setMorphFirst(bool val=true)
Definition: osishtmlhref.h:64
virtual BasicFilterUserData * createUserData(const SWModule *module, const SWKey *key)
Definition: osishtmlhref.h:58
void setRenderNoteNumbers(bool val=true)
Definition: osishtmlhref.h:65
#define SWORD_NAMESPACE_END
Definition: defs.h:40
Definition: swkey.h:77