#include <swmodule.h>
Inheritance diagram for SWModule:
Public Methods | |
SWModule (const char *imodname = 0, const char *imoddesc = 0, SWDisplay * idisp = 0, char *imodtype = 0) | |
Initializes data for instance of SWModule. More... | |
virtual | ~SWModule () |
Cleans up instance of SWModule. | |
virtual char | Error () |
Gets and clears error status. More... | |
virtual char | SetKey (const SWKey *ikey) |
Sets a key to this module for position to a particular record or set of records. More... | |
virtual char | SetKey (const SWKey &ikey) |
virtual SWKey& | Key () const |
Gets the current module key. More... | |
virtual char | Key (const SWKey & ikey) |
Sets the current key of the module to ikey, and returns the keytext. More... | |
virtual const char* | KeyText (const char *imodtype = 0) |
Sets/gets module KeyText. More... | |
virtual char | Display () |
Calls this modules display object and passes itself. More... | |
virtual SWDisplay* | Disp (SWDisplay * idisp = 0) |
Sets/gets display driver. More... | |
virtual char* | Name (const char *imodname = 0) |
Sets/gets module name. More... | |
virtual char* | Description (const char *imoddesc = 0) |
Sets/gets module description. More... | |
virtual char* | Type (const char *imodtype = 0) |
Sets/gets module type. More... | |
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. More... | |
virtual char | createSearchFramework () |
virtual bool | hasSearchFramework () |
virtual bool | isSearchOptimallySupported (const char *istr, int searchType, int flags, SWKey * scope) |
virtual SWKey* | CreateKey () |
Allocates a key of specific type for module. More... | |
virtual | operator char * () |
Renders and returns the current module text. More... | |
virtual char* | getRawEntry () = 0 |
This function is reimplemented by the different kinds of module objects. More... | |
virtual | operator SWKey & () |
virtual | operator SWKey * () |
virtual bool | isWritable () |
Is the module writable? :). More... | |
virtual SWModule& | operator<< (const char *) |
Modify the current module entry text only if module isWritable(). More... | |
virtual SWModule& | operator<< (const SWKey *) |
Link the current module entry to another module entry only if module isWritable(). More... | |
virtual void | deleteEntry () |
Delete current module entry - only if module isWritable(). | |
virtual SWModule& | operator-= (int decrement) |
Decrements module key a number of entries. More... | |
virtual SWModule& | operator+= (int increment) |
Increments module key a number of entries. More... | |
virtual SWModule& | operator++ (int) |
Increments module key by 1 entry. | |
virtual SWModule& | operator-- (int) |
Decrements module key by 1 entry. | |
virtual SWModule& | operator= (SW_POSITION p) |
Positions this modules to an entry. More... | |
virtual SWModule& | AddRenderFilter (SWFilter * newfilter) |
Adds a RenderFilter to this module's. More... | |
virtual void | renderFilter (char *buf, long size, SWKey *key) |
RenderFilter a text buffer. More... | |
virtual SWModule& | AddStripFilter (SWFilter * newfilter) |
Adds a StripFilter to this module's stripfilters unknown reference! queue. More... | |
virtual void | stripFilter (char *buf, long size, SWKey *key) |
StripFilter a text buffer. More... | |
virtual SWModule& | AddRawFilter (SWFilter * newfilter) |
Adds a RawFilter to this module's rawfilters unknown reference! queue. More... | |
virtual void | filterBuffer (FilterList *filters, char *buf, long size, SWKey *key) |
FilterBuffer a text buffer. More... | |
virtual void | rawFilter (char *buf, long size, SWKey *key) |
RawFilter a text buffer. More... | |
virtual SWModule& | AddOptionFilter (SWFilter * newfilter) |
Adds an OptionFilter to this module's optionfilters unknown reference! queue. More... | |
virtual void | optionFilter (char *buf, long size, SWKey *key) |
OptionFilter a text buffer. More... | |
virtual const char* | StripText (char *buf = 0, int len = -1) |
calls all StripFilters on buffer or current text. More... | |
virtual const char* | RenderText (char *buf = 0, int len = -1) |
calls all RenderFilters on buffer or current text. More... | |
virtual const char* | StripText (SWKey * tmpKey) |
calls all StripFilters on current text. More... | |
virtual const char* | RenderText (SWKey * tmpKey) |
calls all RenderFilters on current text. More... | |
Public Attributes | |
bool | terminateSearch |
Set this bool to false to terminate the search which is executed by this module (Search()). More... | |
Static Public Methods | |
void | nullPercent (char percent, void *userData) |
This is the default callback function for searching. More... | |
char | createModule (const char *) |
Creates a new module. More... | |
Protected Attributes | |
char | error |
SWKey* | key |
the current key. | |
ListKey | listkey |
char* | modname |
char* | moddesc |
char* | modtype |
SWDisplay* | disp |
this module's display object. | |
char* | 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. | |
bool | render |
Static Protected Attributes | |
SWDisplay | rawdisp |
Definition at line 47 of file swmodule.h.
|
Initializes data for instance of SWModule.
imodname | Internal name for module; see also Name() |
imoddesc | Name to display to user for module; see also Description() |
idisp | Display object to use for displaying see also Disp() |
imodtype | Type of Module (All modules will be displayed with others of same type under their modtype heading) see also Type() |
|
Adds an OptionFilter to this module's optionfilters unknown reference! queue.
newfilter | the filter to add |
Definition at line 416 of file swmodule.h.
|
Adds a RawFilter to this module's rawfilters unknown reference! queue.
newfilter | the filter to add |
Definition at line 383 of file swmodule.h.
|
Adds a RenderFilter to this module's.
newfilter | the filter to add |
Definition at line 345 of file swmodule.h.
|
Adds a StripFilter to this module's stripfilters unknown reference! queue.
newfilter | the filter to add |
Definition at line 364 of file swmodule.h.
|
Allocates a key of specific type for module.
|
Sets/gets module description.
imoddesc | value which to set moddesc; [0] - only get |
|
Sets/gets display driver.
idisp | value which to set disp; [0] - only get |
|
Calls this modules display object and passes itself.
|
Gets and clears error status.
|
Sets the current key of the module to ikey, and returns the keytext.
ikey | new current key for the module |
Definition at line 143 of file swmodule.h.
|
Gets the current module key.
Definition at line 133 of file swmodule.h.
|
Sets/gets module KeyText.
ikeytext | value which to set keytext; [0] - only get |
Reimplemented in SWLD.
|
Sets/gets module name.
imodname | value which to set modname; [0] - only get |
|
calls all RenderFilters on current text.
tmpKey | key to use to grab text |
|
calls all RenderFilters on buffer or current text.
buf | buffer to Render instead of current module position; if buf is NULL, the current text will be used |
len | max len of buf OR current text -- will be applied anyway |
|
Searches a module for a string.
istr | string for which to search |
searchType | type of search to perform >=0 ->regex; 1->phrase; 2->multiword; |
flags | options flags for search |
justCheckIfSupported |
if set, don't search, only tell if this function supports requested search.
|
|
Sets a key to this module for position to a particular record or set of records.
ikey | key with which to set this module |
Referenced by Key().
|
calls all StripFilters on current text.
tmpKey | key to use to grab text |
|
calls all StripFilters on buffer or current text.
buf | buf to massage instead of current module position; if buf is NULL, the current text will be used |
len | max len of buf OR current text -- will be applied anyway |
|
Sets/gets module type.
imodtype | value which to set modtype; [0] - only get |
|
Creates a new module.
path | The first parameter is path of the new module |
Definition at line 278 of file swmodule.h.
|
FilterBuffer a text buffer.
filters | the FilterList of filters to iterate |
buf | the buffer to filter |
size | the allocated size of the buffer |
key | key location from where this buffer was extracted |
Definition at line 395 of file swmodule.h.
Referenced by optionFilter(), rawFilter(), renderFilter(), and stripFilter().
|
This function is reimplemented by the different kinds of module objects.
|
|
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().
|
Renders and returns the current module text.
|
Increments module key a number of entries.
increment | Number of entries to jump forward |
|
Decrements module key a number of entries.
decrement | Number of entries to jump backward |
|
Link the current module entry to another module entry only if module isWritable().
Definition at line 294 of file swmodule.h.
|
Modify the current module entry text only if module isWritable().
Definition at line 286 of file swmodule.h.
|
Positions this modules to an entry.
p | position (e.g. TOP, BOTTOM) |
|
OptionFilter a text buffer.
buf | the buffer to filter |
size | the allocated size of the buffer |
key | key location from where this buffer was extracted |
Definition at line 427 of file swmodule.h.
|
RawFilter a text buffer.
buf | the buffer to filter |
size | the allocated size of the buffer |
key | key location from where this buffer was extracted |
Definition at line 408 of file swmodule.h.
|
RenderFilter a text buffer.
buf | the buffer to filter |
size | the allocated size of the buffer |
key | key location from where this buffer was extracted |
Definition at line 356 of file swmodule.h.
|
StripFilter a text buffer.
buf | the buffer to filter |
size | the allocated size of the buffer |
key | key location from where this buffer was extracted |
Definition at line 375 of file swmodule.h.
|
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.
Definition at line 95 of file swmodule.h.