#include <swmodule.h>
Inheritance diagram for sword::SWModule:


Public Member Functions | |
| SWModule (const char *imodname=0, const char *imoddesc=0, SWDisplay *idisp=0, char *imodtype=0, char encoding=ENC_UNKNOWN, char dir=DIRECTION_LTR, char markup=FMT_UNKNOWN, const char *modlang=0) | |
| Initializes data for instance of SWModule. | |
| virtual | ~SWModule () |
| Cleans up instance of SWModule. | |
| virtual char | Error () |
| Gets and clears error status. | |
| virtual const bool | isUnicode () const |
| virtual const ConfigEntMap & | getConfig () const |
| virtual void | setConfig (ConfigEntMap *config) |
| virtual const char * | getConfigEntry (const char *key) const |
| virtual const int | getEntrySize () const |
| char | SetKey (const SWKey *ikey) |
| Sets a key to this module for position to a particular record or set of records. | |
| virtual char | setKey (const SWKey *ikey) |
| virtual long | Index () const |
| virtual long | Index (long iindex) |
| char | SetKey (const SWKey &ikey) |
| Sets the key of this module. | |
| char | setKey (const SWKey &ikey) |
| SWKey & | Key () const |
| Gets the current module key. | |
| SWKey * | getKey () const |
| char | Key (const SWKey &ikey) |
| Sets the current key of the module to ikey, and returns the keytext. | |
| virtual const char * | KeyText (const char *ikeytext=0) |
| virtual char | Display () |
| Calls this modules display object and passes itself. | |
| virtual SWDisplay * | Disp (SWDisplay *idisp=0) |
| Sets/gets display driver. | |
| virtual char * | Name (const char *imodname=0) |
| Sets/gets module name. | |
| virtual char * | Description (const char *imoddesc=0) |
| Sets/gets module description. | |
| virtual char * | Type (const char *imodtype=0) |
| Sets/gets module type. | |
| virtual char | Direction (signed char newdir=-1) |
| Sets/gets module direction. | |
| virtual char | Encoding (signed char enc=-1) |
| Sets/gets module encoding. | |
| virtual char | Markup (signed char markup=-1) |
| Sets/gets module markup. | |
| virtual char * | Lang (const char *imodlang=0) |
| Sets/gets module language. | |
| virtual ListKey & | Search (const char *istr, int searchType=0, int flags=0, SWKey *scope=0, bool *justCheckIfSupported=0, void(*percent)(char, void *)=&nullPercent, void *percentUserData=0) |
| Searches a module for a string. | |
| virtual signed char | createSearchFramework () |
| virtual bool | hasSearchFramework () |
| virtual bool | isSearchOptimallySupported (const char *istr, int searchType, int flags, SWKey *scope) |
| Check if the search is optimally supported (e.g. | |
| virtual SWKey * | CreateKey () |
| Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. | |
| virtual SWBuf & | getRawEntryBuf ()=0 |
| This function is reimplemented by the different kinds of module objects. | |
| virtual const char * | getRawEntry () |
| virtual bool | isWritable () |
| Is the module writable? :). | |
| virtual void | setEntry (const char *inbuf, long len=-1) |
| Modify the current module entry text only if module isWritable(). | |
| virtual void | linkEntry (const SWKey *sourceKey) |
| Link the current module entry to another module entry only if module isWritable(). | |
| virtual void | deleteEntry () |
| Delete current module entry - only if module isWritable(). | |
| virtual void | decrement (int steps=1) |
| Decrements module key a number of entries. | |
| virtual void | increment (int steps=1) |
| Increments module key a number of entries. | |
| virtual void | setPosition (SW_POSITION pos) |
| Positions this modules to an entry. | |
| virtual SWModule & | AddRenderFilter (SWFilter *newfilter) |
| Adds a RenderFilter to this module's. | |
| virtual SWModule & | RemoveRenderFilter (SWFilter *oldfilter) |
| Removes a RenderFilter from this module's. | |
| virtual SWModule & | ReplaceRenderFilter (SWFilter *oldfilter, SWFilter *newfilter) |
| Replaces a RenderFilter in this module's. | |
| virtual void | renderFilter (SWBuf &buf, SWKey *key) |
| RenderFilter a text buffer. | |
| virtual SWModule & | AddEncodingFilter (SWFilter *newfilter) |
| Adds an EncodingFilter to this module's. | |
| virtual SWModule & | RemoveEncodingFilter (SWFilter *oldfilter) |
| Removes an EncodingFilter from this module's. | |
| virtual SWModule & | ReplaceEncodingFilter (SWFilter *oldfilter, SWFilter *newfilter) |
| Replaces an EncodingFilter in this module's. | |
| virtual void | encodingFilter (SWBuf &buf, SWKey *key) |
| encodingFilter a text buffer | |
| virtual SWModule & | AddStripFilter (SWFilter *newfilter) |
| Adds a StripFilter to this module's stripfilters queue. | |
| virtual void | stripFilter (SWBuf &buf, SWKey *key) |
| StripFilter a text buffer. | |
| virtual SWModule & | AddRawFilter (SWFilter *newfilter) |
| Adds a RawFilter to this module's rawfilters queue. | |
| virtual void | filterBuffer (FilterList *filters, SWBuf &buf, SWKey *key) |
| FilterBuffer a text buffer. | |
| virtual void | rawFilter (SWBuf &buf, SWKey *key) |
| RawFilter a text buffer. | |
| virtual SWModule & | AddOptionFilter (SWFilter *newfilter) |
| Adds an OptionFilter to this module's optionfilters queue. | |
| virtual void | optionFilter (SWBuf &buf, SWKey *key) |
| OptionFilter a text buffer. | |
| virtual const char * | StripText (char *buf=0, int len=-1) |
| calls all StripFilters on buffer or current text | |
| virtual const char * | RenderText (char *buf=0, int len=-1, bool render=true) |
| calls all RenderFilters on buffer or current text | |
| virtual const char * | StripText (SWKey *tmpKey) |
| calls all StripFilters on current text | |
| virtual const char * | RenderText (SWKey *tmpKey) |
| calls all RenderFilters on current text | |
| virtual void | setSkipConsecutiveLinks (bool val) |
| option to specify behaviour when iterating over consecutive entried linked to same text | |
| virtual bool | getSkipConsecutiveLinks () |
| virtual AttributeTypeList & | getEntryAttributes () const |
| virtual void | processEntryAttributes (bool val) const |
| virtual bool | isProcessEntryAttributes () const |
| operator const char * () | |
| operator SWKey & () | |
| operator SWKey * () | |
| SWModule & | operator<< (const char *inbuf) |
| SWModule & | operator<< (const SWKey *sourceKey) |
| SWModule & | operator-= (int steps) |
| SWModule & | operator+= (int steps) |
| SWModule & | operator++ (int) |
| SWModule & | operator-- (int) |
| SWModule & | operator= (SW_POSITION p) |
Static Public Member Functions | |
| void | nullPercent (char percent, void *userData) |
| This is the default callback function for searching. | |
| signed char | createModule (const char *path) |
| Creates a new module. | |
Public Attributes | |
| bool | terminateSearch |
| Set this bool to false to terminate the search which is executed by this module (Search()). | |
Protected Attributes | |
| ConfigEntMap | ownConfig |
| ConfigEntMap * | config |
| AttributeTypeList | entryAttributes |
| bool | procEntAttr |
| char | error |
| bool | skipConsecutiveLinks |
| SWKey * | key |
| the current key | |
| ListKey | listkey |
| char * | modname |
| char * | moddesc |
| char * | modtype |
| char * | modlang |
| char | direction |
| char | markup |
| char | encoding |
| SWDisplay * | disp |
| this module's display object | |
| SWBuf | entryBuf |
| FilterList * | stripFilters |
| executed to remove all markup (for searches) | |
| FilterList * | rawFilters |
| executed immediately upon fileread | |
| FilterList * | renderFilters |
| executed to format for display | |
| FilterList * | optionFilters |
| executed to change markup to user prefs | |
| FilterList * | encodingFilters |
| executed to decode text for display | |
| int | entrySize |
| long | entryIndex |
Static Protected Attributes | |
| SWDisplay | rawdisp |
It provides functions to look up a text passage, to search in the module, to switch on/off the state of optional things like Strong's numbers or footnotes.
SWModule has also functions to write to the data files.
|
||||||||||||||||||||||||||||||||||||
|
Initializes data for instance of SWModule.
|
|
|
Adds an EncodingFilter to this module's.
|
|
|
Adds an OptionFilter to this module's optionfilters queue.
|
|
|
Adds a RawFilter to this module's rawfilters queue.
|
|
|
Adds a RenderFilter to this module's.
|
|
|
Adds a StripFilter to this module's stripfilters queue.
|
|
|
Allocates a key of specific type for module The different reimplementatiosn of SWModule (e.g. SWText) support SWKey implementations, which support special. This functions returns a SWKey object which works with the current implementation of SWModule. For example for the SWText class it returns a VerseKey object.
Reimplemented in sword::SWCom, sword::SWGenBook, sword::SWLD, and sword::SWText. |
|
|
Creates a new module.
|
|
|
Decrements module key a number of entries.
|
|
|
Delete current module entry - only if module isWritable().
|
|
|
Sets/gets module description.
|
|
|
Sets/gets module direction.
|
|
|
Sets/gets display driver.
|
|
|
Calls this modules display object and passes itself.
|
|
|
Sets/gets module encoding.
|
|
||||||||||||
|
encodingFilter a text buffer
|
|
|
Gets and clears error status.
|
|
||||||||||||||||
|
FilterBuffer a text buffer.
|
|
|
|
|
|
This function is reimplemented by the different kinds of module objects.
|
|
|
Increments module key a number of entries.
|
|
||||||||||||||||||||
|
Check if the search is optimally supported (e.g. if index files are presnt and working) This function checks whether the search framework may work in the best way.
|
|
|
|
|
|
Is the module writable? :).
|
|
|
Sets the current key of the module to ikey, and returns the keytext.
|
|
|
Gets the current module key.
|
|
|
Sets/gets module language.
|
|
|
Link the current module entry to another module entry only if module isWritable().
|
|
|
Sets/gets module markup.
|
|
|
Sets/gets module name.
|
|
||||||||||||
|
This is the default callback function for searching. This function is a placeholder and does nothing. You can define your own function for search progress evaluation, and pass it over to Search(). |
|
||||||||||||
|
OptionFilter a text buffer.
|
|
||||||||||||
|
RawFilter a text buffer.
|
|
|
Removes an EncodingFilter from this module's.
|
|
|
Removes a RenderFilter from this module's.
|
|
||||||||||||
|
RenderFilter a text buffer.
|
|
|
calls all RenderFilters on current text
|
|
||||||||||||||||
|
calls all RenderFilters on buffer or current text
|
|
||||||||||||
|
Replaces an EncodingFilter in this module's.
|
|
||||||||||||
|
Replaces a RenderFilter in this module's.
|
|
||||||||||||||||||||||||||||||||
|
Searches a module for a string.
|
|
||||||||||||
|
Modify the current module entry text only if module isWritable().
|
|
|
Sets the key of this module. Similar to
|
|
|
Sets a key to this module for position to a particular record or set of records.
|
|
|
Positions this modules to an entry.
Reimplemented in sword::SWLD. |
|
|
option to specify behaviour when iterating over consecutive entried linked to same text
|
|
||||||||||||
|
StripFilter a text buffer.
|
|
|
calls all StripFilters on current text
|
|
||||||||||||
|
calls all StripFilters on buffer or current text
|
|
|
Sets/gets module type.
|
|
|
Set this bool to false to terminate the search which is executed by this module (Search()). This is useful for threaded applications to terminate the search in another thread. |
1.3-rc3