osishtmlhref.h

00001 /******************************************************************************
00002  *
00003  * $Id: osishtmlhref.h 2091 2007-09-28 01:49:45Z scribe $
00004  *
00005  * Copyright 1998 CrossWire Bible Society (http://www.crosswire.org)
00006  *      CrossWire Bible Society
00007  *      P. O. Box 2528
00008  *      Tempe, AZ  85280-2528
00009  *
00010  * This program is free software; you can redistribute it and/or modify it
00011  * under the terms of the GNU General Public License as published by the
00012  * Free Software Foundation version 2.
00013  *
00014  * This program is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017  * General Public License for more details.
00018  *
00019  */
00020 
00021 #ifndef OSISHTMLHREF_H
00022 #define OSISHTMLHREF_H
00023 
00024 #include <swbasicfilter.h>
00025 
00026 SWORD_NAMESPACE_START
00027 
00030 class SWDLLEXPORT OSISHTMLHREF : public SWBasicFilter {
00031 private:
00032         bool morphFirst;
00033 protected:
00034         // used by derived classes so we have it in the header
00035         class QuoteStack;
00036         class MyUserData : public BasicFilterUserData {
00037         public:
00038                 bool osisQToTick;
00039                 bool inBold;
00040                 bool inXRefNote;
00041                 bool BiblicalText;
00042                 int suspendLevel;
00043                 SWBuf wordsOfChristStart;
00044                 SWBuf wordsOfChristEnd;
00045                 QuoteStack *quoteStack;
00046                 SWBuf lastTransChange;
00047                 SWBuf w;
00048                 SWBuf fn;
00049                 SWBuf version;
00050                 MyUserData(const SWModule *module, const SWKey *key);
00051                 ~MyUserData();
00052         };
00053         virtual BasicFilterUserData *createUserData(const SWModule *module, const SWKey *key) {
00054                 return new MyUserData(module, key);
00055         }
00056         virtual bool handleToken(SWBuf &buf, const char *token, BasicFilterUserData *userData);
00057 public:
00058         OSISHTMLHREF();
00059         void setMorphFirst(bool val = true) { morphFirst = val; }
00060 };
00061 
00062 SWORD_NAMESPACE_END
00063 #endif