#include <djv_text.h>
Classes | |
struct | Match |
Public Member Functions | |
virtual String | getFullText () const =0 |
virtual bool | getMatchFromIndex (size_t inIndex, size_t inLength, Match &outMatch) const =0 |
virtual bool | locateTextZonePos (const TextZone *inTextZone, size_t &outIndex, size_t &outLength) const =0 |
Public Member Functions inherited from Celartem::Referable | |
Referable () | |
void | addRef () const |
void | releaseRef () const |
size_t | getReferenceCount () const |
Static Public Member Functions | |
static AutoPtr< TextSearcher > | create (TextZone *inTextZone) |
Static Public Member Functions inherited from Celartem::Referable | |
static void | dumpDbgAllRefCount () |
This class provides a way to do full text search against a tree structured TextZone instances.
|
static |
Create a new instance of TextSearcher.
inTextZone | TextZone where you search texts. |
|
pure virtual |
Return the full text of the tree structured TextZone instances.
|
pure virtual |
Get \ref Match information corresponding to the specified indeces.\n This method is used with \ref getFullText and you can use any searching function against the full text returned by \ref getFullText. This method accepts the index and the length of the matched text. The following sample roughly illustrates the procedure:
inIndex | The position of the pattern. |
inLength | The length of the pattern. |
outMatch | Match instance which receives the information. |
|
pure virtual |
Locate the position of the specified TextZone instance.
inTextZone | A TextZone instance to search. |
outIndex | Reference to a variable to receive the position of the specified instance. If the function failed, the value of the variable is not predictable. |
outLength | Reference to a variable to receive the length of the specified instance. If the function failed, the value of the variable is not predictable. |
ture
if the instance is found; otherwise false
.