[sword-cvs] sword/include gbfhtml.h,1.11,1.12 gbfhtmlhref.h,1.4,1.5 gbfwebif.h,1.2,1.3 osishtmlhref.h,1.3,1.4 osisplain.h,1.4,1.5 osisrtf.h,1.5,1.6 swbasicfilter.h,1.15,1.16 thmlhtml.h,1.9,1.10 thmlhtmlhref.h,1.4,1.5 thmlrtf.h,1.8,1.9 thmlwebif.h,1.2,1.3
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 29 Jul 2003 17:51:36 -0700
- Previous message: [sword-cvs] sword/include thmlolb.h,1.4,NONE
- Next message: [sword-cvs] sword/src/modules/filters gbfhtml.cpp,1.26,1.27 gbfhtmlhref.cpp,1.17,1.18 gbfwebif.cpp,1.3,1.4 osishtmlhref.cpp,1.11,1.12 osisplain.cpp,1.7,1.8 osisrtf.cpp,1.16,1.17 swbasicfilter.cpp,1.24,1.25 thmlhtml.cpp,1.27,1.28 thmlhtmlhref.cpp,1.34,1.35 thmlrtf.cpp,1.33,1.34 thmlwebif.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/local/cvsroot/sword/include
In directory www:/tmp/cvs-serv25840/include
Modified Files:
gbfhtml.h gbfhtmlhref.h gbfwebif.h osishtmlhref.h osisplain.h
osisrtf.h swbasicfilter.h thmlhtml.h thmlhtmlhref.h thmlrtf.h
thmlwebif.h
Log Message:
Index: gbfhtml.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/gbfhtml.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- gbfhtml.h 20 Feb 2003 07:25:19 -0000 1.11
+++ gbfhtml.h 30 Jul 2003 00:51:33 -0000 1.12
@@ -29,7 +29,15 @@
*/
class SWDLLEXPORT GBFHTML : public SWBasicFilter {
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ bool hasFootnotePreTag;
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
GBFHTML();
};
Index: gbfhtmlhref.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/gbfhtmlhref.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gbfhtmlhref.h 20 Feb 2003 07:25:19 -0000 1.4
+++ gbfhtmlhref.h 30 Jul 2003 00:51:33 -0000 1.5
@@ -29,7 +29,15 @@
*/
class SWDLLEXPORT GBFHTMLHREF : public SWBasicFilter {
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ bool hasFootnotePreTag;
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
GBFHTMLHREF();
};
Index: gbfwebif.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/gbfwebif.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gbfwebif.h 27 Jun 2003 01:41:06 -0000 1.2
+++ gbfwebif.h 30 Jul 2003 00:51:33 -0000 1.3
@@ -32,7 +32,7 @@
const SWBuf passageStudyURL;
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
GBFWEBIF();
};
Index: osishtmlhref.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/osishtmlhref.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- osishtmlhref.h 27 Jun 2003 01:41:06 -0000 1.3
+++ osishtmlhref.h 30 Jul 2003 00:51:33 -0000 1.4
@@ -30,7 +30,18 @@
class SWDLLEXPORT OSISHTMLHref : public SWBasicFilter {
private:
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ bool osisQToTick;
+ bool inBold;
+ SWBuf w;
+ SWBuf fn;
+ MyUserData(const SWModule *module, const SWKey *key);
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
OSISHTMLHref();
};
Index: osisplain.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/osisplain.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- osisplain.h 26 Jul 2003 23:10:55 -0000 1.4
+++ osisplain.h 30 Jul 2003 00:51:33 -0000 1.5
@@ -30,7 +30,15 @@
class SWDLLEXPORT OSISPlain : public SWBasicFilter {
public:
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ SWBuf w;
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
virtual char processText(SWBuf &text, const SWKey *key, const SWModule *module);
public:
OSISPlain();
Index: osisrtf.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/osisrtf.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- osisrtf.h 25 Jul 2003 22:56:46 -0000 1.5
+++ osisrtf.h 30 Jul 2003 00:51:33 -0000 1.6
@@ -31,8 +31,17 @@
private:
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
- virtual char processText(SWBuf &text, const SWKey *key, const SWModule *module);
+ class MyUserData : public UserData {
+ public:
+ bool osisQToTick;
+ SWBuf w;
+ MyUserData(const SWModule *module, const SWKey *key);
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
+ virtual bool processStage(char stage, SWBuf &text, const char *&from, UserData *userData);
public:
OSISRTF();
};
Index: swbasicfilter.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/swbasicfilter.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- swbasicfilter.h 12 Jul 2003 22:58:48 -0000 1.15
+++ swbasicfilter.h 30 Jul 2003 00:51:33 -0000 1.16
@@ -47,19 +47,46 @@
char *tokenEnd;
char *escStart;
char *escEnd;
+ char escStartLen;
+ char escEndLen;
+ char tokenStartLen;
+ char tokenEndLen;
bool escStringCaseSensitive;
bool tokenCaseSensitive;
bool passThruUnknownToken;
bool passThruUnknownEsc;
+ char processStages;
public:
+
SWBasicFilter();
virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
virtual ~SWBasicFilter();
protected:
- const SWModule *module;
- const SWKey *key;
+
+ class UserData {
+ public:
+ UserData(const SWModule *module, const SWKey *key) { this->module = module; this->key = key; suspendTextPassThru = false; }
+ virtual ~UserData() {}
+ const SWModule *module;
+ const SWKey *key;
+ SWBuf lastTextNode;
+ bool suspendTextPassThru;
+ };
+
+
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new UserData(module, key);
+ }
+
+ // STAGEs
+ static const char INITIALIZE; // flag for indicating processing before char loop
+ static const char PRECHAR; // flag for indicating processing at top in char loop
+ static const char POSTCHAR; // flag for indicating processing at bottom in char loop
+ static const char FINALIZE; // flag for indicating processing after char loop
+
+
typedef std::map<SWBuf, SWBuf> DualStringMap;
DualStringMap tokenSubMap;
DualStringMap escSubMap;
@@ -102,7 +129,9 @@
* @param userData FIXME: document this
* @return <code>false</code> if was not handled and should be handled in
* the default way (by just substituting).*/
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
+ virtual bool processStage(char stage, SWBuf &text, const char *&from, UserData *userData) {}
+ virtual void setStageProcessing(char stages) { processStages = stages; } // see STATICs up above
/** This function is called for every escape sequence encountered in the input text.
* @param buf the output buffer (FIXME: what is its size?)
@@ -110,7 +139,7 @@
* @param userData FIXME: document this
* @return <code>false</code> if was not handled and should be handled in
* the default way (by just substituting).*/
- virtual bool handleEscapeString(SWBuf &buf, const char *escString, DualStringMap &userData);
+ virtual bool handleEscapeString(SWBuf &buf, const char *escString, UserData *userData);
};
SWORD_NAMESPACE_END
Index: thmlhtml.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/thmlhtml.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- thmlhtml.h 20 Feb 2003 07:25:20 -0000 1.9
+++ thmlhtml.h 30 Jul 2003 00:51:33 -0000 1.10
@@ -29,7 +29,15 @@
*/
class SWDLLEXPORT ThMLHTML : public SWBasicFilter {
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ bool SecHead;
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
ThMLHTML();
};
Index: thmlhtmlhref.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/thmlhtmlhref.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- thmlhtmlhref.h 20 Feb 2003 07:25:20 -0000 1.4
+++ thmlhtmlhref.h 30 Jul 2003 00:51:33 -0000 1.5
@@ -29,7 +29,16 @@
*/
class SWDLLEXPORT ThMLHTMLHREF : public SWBasicFilter {
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ bool inscriptRef;
+ bool SecHead;
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
ThMLHTMLHREF();
};
Index: thmlrtf.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/thmlrtf.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- thmlrtf.h 26 Jul 2003 23:10:55 -0000 1.8
+++ thmlrtf.h 30 Jul 2003 00:51:33 -0000 1.9
@@ -29,7 +29,15 @@
*/
class SWDLLEXPORT ThMLRTF : public SWBasicFilter {
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ class MyUserData : public UserData {
+ public:
+ MyUserData(const SWModule *module, const SWKey *key) : UserData(module, key) {}
+ bool sechead;
+ };
+ virtual UserData *createUserData(const SWModule *module, const SWKey *key) {
+ return new MyUserData(module, key);
+ }
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
public:
ThMLRTF();
Index: thmlwebif.h
===================================================================
RCS file: /usr/local/cvsroot/sword/include/thmlwebif.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- thmlwebif.h 27 Jun 2003 01:41:07 -0000 1.2
+++ thmlwebif.h 30 Jul 2003 00:51:33 -0000 1.3
@@ -32,7 +32,7 @@
const SWBuf passageStudyURL;
protected:
- virtual bool handleToken(SWBuf &buf, const char *token, DualStringMap &userData);
+ virtual bool handleToken(SWBuf &buf, const char *token, UserData *userData);
public:
ThMLWEBIF();
};
- Previous message: [sword-cvs] sword/include thmlolb.h,1.4,NONE
- Next message: [sword-cvs] sword/src/modules/filters gbfhtml.cpp,1.26,1.27 gbfhtmlhref.cpp,1.17,1.18 gbfwebif.cpp,1.3,1.4 osishtmlhref.cpp,1.11,1.12 osisplain.cpp,1.7,1.8 osisrtf.cpp,1.16,1.17 swbasicfilter.cpp,1.24,1.25 thmlhtml.cpp,1.27,1.28 thmlhtmlhref.cpp,1.34,1.35 thmlrtf.cpp,1.33,1.34 thmlwebif.cpp,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]