The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OSISXHTML::MyUserData Class Reference

#include <osisxhtml.h>

+ Inheritance diagram for OSISXHTML::MyUserData:
+ Collaboration diagram for OSISXHTML::MyUserData:

Public Member Functions

 MyUserData (const SWModule *module, const SWKey *key)
 
void outputNewline (SWBuf &buf)
 
 ~MyUserData ()
 

Public Attributes

int consecutiveNewlines
 
SWBuf fn
 
TagStack * hiStack
 
SWBuf interModuleLinkEnd
 
SWBuf interModuleLinkStart
 
bool inXRefNote
 
bool isBiblicalText
 
const SWKey * key
 
SWBuf lastSuspendSegment
 
SWBuf lastTextNode
 
SWBuf lastTransChange
 
TagStack * lineStack
 
const SWModule * module
 
bool osisQToTick
 
TagStack * quoteStack
 
bool supressAdjacentWhitespace
 
int suspendLevel
 
bool suspendTextPassThru
 
TagStack * titleStack
 
SWBuf version
 
const VerseKey * vkey
 
SWBuf w
 
SWBuf wordsOfChristEnd
 
SWBuf wordsOfChristStart
 

Detailed Description

Definition at line 46 of file osisxhtml.h.

Constructor & Destructor Documentation

OSISXHTML::MyUserData::MyUserData ( const SWModule *  module,
const SWKey *  key 
)

Definition at line 180 of file osisxhtml.cpp.

180  : BasicFilterUserData(module, key), quoteStack(new TagStack()), hiStack(new TagStack()), titleStack(new TagStack()), lineStack(new TagStack()) {
181  inXRefNote = false;
182  suspendLevel = 0;
183  wordsOfChristStart = "<span class=\"wordsOfJesus\"> ";
184  wordsOfChristEnd = "</span> ";
185  interModuleLinkStart = "<a class=\"%s\" href=\"sword://%s/%s\">";
186  interModuleLinkEnd = "</a>";
187  isBiblicalText = false;
188  osisQToTick = true; // default
190  if (module) {
191  osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
192  version = module->getName();
193  isBiblicalText = (!strcmp(module->getType(), "Biblical Texts"));
194  }
195 }
const char * getName() const
Definition: swmodule.cpp:204
SWBuf interModuleLinkStart
Definition: osisxhtml.h:54
TagStack * quoteStack
Definition: osisxhtml.h:56
const char * getType() const
Definition: swmodule.cpp:232
virtual const char * getConfigEntry(const char *key) const
Definition: swmodule.cpp:1159
std::stack< SWBuf > TagStack
BasicFilterUserData(const SWModule *module, const SWKey *key)
TagStack * hiStack
Definition: osisxhtml.h:57
TagStack * lineStack
Definition: osisxhtml.h:59
TagStack * titleStack
Definition: osisxhtml.h:58
OSISXHTML::MyUserData::~MyUserData ( )

Definition at line 197 of file osisxhtml.cpp.

197  {
198  delete quoteStack;
199  delete hiStack;
200  delete titleStack;
201  delete lineStack;
202 }
TagStack * quoteStack
Definition: osisxhtml.h:56
TagStack * hiStack
Definition: osisxhtml.h:57
TagStack * lineStack
Definition: osisxhtml.h:59
TagStack * titleStack
Definition: osisxhtml.h:58

Member Function Documentation

void OSISXHTML::MyUserData::outputNewline ( SWBuf &  buf)

Definition at line 205 of file osisxhtml.cpp.

205  {
206  if (++consecutiveNewlines <= 2) {
207  // any newlines at the start of a verse should get appended to a preverse heading
208  // since preverse cause a newline, simply be sure we have a preverse
209  if (!buf.size() && vkey && vkey->getVerse() && module && module->isProcessEntryAttributes()) {
210  module->getEntryAttributes()["Heading"]["Preverse"]["0"] += "<div></div>";
211  }
212  else {
213  outText("<br />\n", buf, this);
214  }
216  }
217 }
const SWModule * module
Definition: swbasicfilter.h:42
const VerseKey * vkey
Definition: swbasicfilter.h:44
static void outText(const char *t, SWBuf &o, BasicFilterUserData *u)
virtual int getVerse() const
Definition: versekey.cpp:1534
unsigned long size() const
Definition: swbuf.h:185
virtual bool isProcessEntryAttributes() const
Definition: swmodule.h:832
virtual AttributeTypeList & getEntryAttributes() const
Definition: swmodule.h:817

Member Data Documentation

int OSISXHTML::MyUserData::consecutiveNewlines

Definition at line 60 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::fn

Definition at line 63 of file osisxhtml.h.

TagStack* OSISXHTML::MyUserData::hiStack

Definition at line 57 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::interModuleLinkEnd

Definition at line 55 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::interModuleLinkStart

Definition at line 54 of file osisxhtml.h.

bool OSISXHTML::MyUserData::inXRefNote

Definition at line 49 of file osisxhtml.h.

bool OSISXHTML::MyUserData::isBiblicalText

Definition at line 50 of file osisxhtml.h.

const SWKey* BasicFilterUserData::key
inherited

Definition at line 43 of file swbasicfilter.h.

SWBuf BasicFilterUserData::lastSuspendSegment
inherited

Definition at line 46 of file swbasicfilter.h.

SWBuf BasicFilterUserData::lastTextNode
inherited

Definition at line 45 of file swbasicfilter.h.

SWBuf OSISXHTML::MyUserData::lastTransChange

Definition at line 61 of file osisxhtml.h.

TagStack* OSISXHTML::MyUserData::lineStack

Definition at line 59 of file osisxhtml.h.

const SWModule* BasicFilterUserData::module
inherited

Definition at line 42 of file swbasicfilter.h.

bool OSISXHTML::MyUserData::osisQToTick

Definition at line 48 of file osisxhtml.h.

TagStack* OSISXHTML::MyUserData::quoteStack

Definition at line 56 of file osisxhtml.h.

bool BasicFilterUserData::supressAdjacentWhitespace
inherited

Definition at line 48 of file swbasicfilter.h.

int OSISXHTML::MyUserData::suspendLevel

Definition at line 51 of file osisxhtml.h.

bool BasicFilterUserData::suspendTextPassThru
inherited

Definition at line 47 of file swbasicfilter.h.

TagStack* OSISXHTML::MyUserData::titleStack

Definition at line 58 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::version

Definition at line 64 of file osisxhtml.h.

const VerseKey* BasicFilterUserData::vkey
inherited

Definition at line 44 of file swbasicfilter.h.

SWBuf OSISXHTML::MyUserData::w

Definition at line 62 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::wordsOfChristEnd

Definition at line 53 of file osisxhtml.h.

SWBuf OSISXHTML::MyUserData::wordsOfChristStart

Definition at line 52 of file osisxhtml.h.


The documentation for this class was generated from the following files: