The SWORD Project
1.9.0.svnversion
|
#include <swbasicfilter.h>
Classes | |
class | Private |
Public Member Functions | |
virtual const char * | getHeader () const |
virtual char | processText (SWBuf &text, const SWKey *key=0, const SWModule *module=0) |
SWBasicFilter () | |
virtual | ~SWBasicFilter () |
Static Protected Attributes | |
static const char | FINALIZE = 8 |
static const char | INITIALIZE = 1 |
static const char | POSTCHAR = 4 |
static const char | PRECHAR = 2 |
Private Attributes | |
char * | escEnd |
char | escEndLen |
char * | escStart |
char | escStartLen |
bool | escStringCaseSensitive |
Private * | p |
bool | passThruNumericEsc |
bool | passThruUnknownEsc |
bool | passThruUnknownToken |
char | processStages |
bool | tokenCaseSensitive |
char * | tokenEnd |
char | tokenEndLen |
char * | tokenStart |
char | tokenStartLen |
A filter providing commonly used functionality. This filter has facilities for handling SGML/HTML/XML like tokens and escape strings (like SGML entities). It has the facility for just substituting the given tokens and escape strings to other strings and for "manual" custom token handling.
In this class the functions with arguments looking as char **buf
write a character sequnce at address specified by *buf
address and change *buf
to point past the last char of the written sequence.
Definition at line 62 of file swbasicfilter.h.
SWBasicFilter::SWBasicFilter | ( | ) |
Definition at line 71 of file swbasicfilter.cpp.
|
virtual |
Definition at line 94 of file swbasicfilter.cpp.
|
protected |
Registers an esc control sequence that can pass unchanged
Definition at line 156 of file swbasicfilter.cpp.
|
protected |
Registers an esc control sequence
Definition at line 176 of file swbasicfilter.cpp.
|
protected |
Registers a simple token substitutions. Usually called from the c-tor of a subclass
Definition at line 136 of file swbasicfilter.cpp.
|
inlineprotectedvirtual |
Reimplemented in OSISHTMLHREF, ThMLHTMLHREF, ThMLLaTeX, ThMLXHTML, TEILaTeX, TEIXHTML, OSISOSIS, TEIHTMLHREF, TEIRTF, ThMLRTF, OSISCGI, GBFHTML, GBFHTMLHREF, GBFLaTeX, GBFXHTML, TEIPlain, ThMLHTML, OSISLaTeX, OSISXHTML, OSISWEBIF, OSISHeadings, OSISPlain, OSISRTF, GBFCGI, and ThMLCGI.
Definition at line 91 of file swbasicfilter.h.
|
inlinevirtualinherited |
|
protectedvirtual |
This function is called for every escape sequence encountered in the input text.
buf | the output buffer |
escString | the escape sequence (e.g. "amp" for &) |
userData | user storage space for data transient to 1 full buffer parse |
false
if was not handled and should be handled in Definition at line 286 of file swbasicfilter.cpp.
|
protectedvirtual |
This function is called for all numeric escape sequences. If passThrough
buf | the output buffer |
escString | the escape sequence (e.g. "#235" for &235;) |
Definition at line 244 of file swbasicfilter.cpp.
|
protectedvirtual |
This function is called for every token encountered in the input text.
buf | the output buffer |
token | the token (e.g. "p align='left'" |
userData | user storage space for data transient to 1 full buffer parse |
Reimplemented in OSISHTMLHREF, ThMLHTMLHREF, ThMLLaTeX, ThMLXHTML, TEILaTeX, OSISOSIS, TEIXHTML, TEIHTMLHREF, ThMLRTF, TEIRTF, OSISCGI, ThMLHTML, GBFHTML, GBFHTMLHREF, GBFLaTeX, GBFXHTML, TEIPlain, OSISLaTeX, OSISXHTML, OSISWEBIF, ThMLWEBIF, GBFWEBIF, OSISHeadings, OSISPlain, OSISRTF, GBFCGI, and ThMLCGI.
Definition at line 281 of file swbasicfilter.cpp.
This passes allowed escapeStrings
Definition at line 223 of file swbasicfilter.cpp.
|
inlineprotectedvirtual |
|
virtual |
This method processes and appropriately modifies the text given it for a particular filter task
text | The text to be filtered/converted |
key | Current key That was used. |
module | Current module. |
Implements SWFilter.
Reimplemented in ThMLRTF, OSISOSIS, and OSISRTF.
Definition at line 315 of file swbasicfilter.cpp.
|
protected |
Unregisters an esc control sequence that can pass unchanged
Definition at line 169 of file swbasicfilter.cpp.
|
protected |
|
protected |
|
protected |
Sets the end of escape sequence (by default ";").
Definition at line 297 of file swbasicfilter.cpp.
|
protected |
Sets the beginning of escape sequence (by default "&").
Definition at line 291 of file swbasicfilter.cpp.
|
protected |
Are escapeStrings case sensitive or not? Call this function before addEscapeStingSubstitute()
Definition at line 131 of file swbasicfilter.cpp.
|
protected |
Sets whether to pass thru a numeric escape sequence unchanged or allow it to be handled otherwise. Default is false.
Definition at line 121 of file swbasicfilter.cpp.
|
protected |
Sets whether to pass thru an unknown escape sequence unchanged or just remove it. Default is false.
Definition at line 116 of file swbasicfilter.cpp.
|
protected |
Sets whether to pass thru an unknown token unchanged or just remove it. Default is false.
Definition at line 111 of file swbasicfilter.cpp.
|
inlineprotectedvirtual |
Definition at line 186 of file swbasicfilter.h.
|
protected |
Are tokens case sensitive (like in GBF) or not? Call this function before addTokenSubstitute()
Definition at line 126 of file swbasicfilter.cpp.
|
protected |
Sets the end of token start sequence (by default ">").
Definition at line 309 of file swbasicfilter.cpp.
|
protected |
Sets the beginning of token start sequence (by default "<").
Definition at line 303 of file swbasicfilter.cpp.
This function performs the substitution of escapeStrings
Definition at line 253 of file swbasicfilter.cpp.
This function performs the substitution of tokens
Definition at line 196 of file swbasicfilter.cpp.
|
private |
Definition at line 69 of file swbasicfilter.h.
|
private |
Definition at line 71 of file swbasicfilter.h.
|
private |
Definition at line 68 of file swbasicfilter.h.
|
private |
Definition at line 70 of file swbasicfilter.h.
|
private |
Definition at line 74 of file swbasicfilter.h.
|
staticprotected |
Definition at line 99 of file swbasicfilter.h.
|
staticprotected |
Definition at line 96 of file swbasicfilter.h.
|
private |
Definition at line 82 of file swbasicfilter.h.
|
private |
Definition at line 78 of file swbasicfilter.h.
|
private |
Definition at line 77 of file swbasicfilter.h.
|
private |
Definition at line 76 of file swbasicfilter.h.
|
staticprotected |
Definition at line 98 of file swbasicfilter.h.
|
staticprotected |
Definition at line 97 of file swbasicfilter.h.
|
private |
Definition at line 79 of file swbasicfilter.h.
|
private |
Definition at line 75 of file swbasicfilter.h.
|
private |
Definition at line 67 of file swbasicfilter.h.
|
private |
Definition at line 73 of file swbasicfilter.h.
|
private |
Definition at line 64 of file swbasicfilter.h.
|
private |
Definition at line 72 of file swbasicfilter.h.