Define a way for the Regular Expression code to access the document
| 2079 | |
| 2080 | // Define a way for the Regular Expression code to access the document |
| 2081 | class DocumentIndexer : public CharacterIndexer { |
| 2082 | Document *pdoc; |
| 2083 | int end; |
| 2084 | public: |
| 2085 | DocumentIndexer(Document *pdoc_, int end_) : |
| 2086 | pdoc(pdoc_), end(end_) { |
| 2087 | } |
| 2088 | |
| 2089 | virtual ~DocumentIndexer() { |
| 2090 | } |
| 2091 | |
| 2092 | virtual char CharAt(int index) { |
| 2093 | if (index < 0 || index >= end) |
| 2094 | return 0; |
| 2095 | else |
| 2096 | return pdoc->CharAt(index); |
| 2097 | } |
| 2098 | }; |
| 2099 | |
| 2100 | long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s, |
| 2101 | bool caseSensitive, bool, bool, int flags, |
nothing calls this directly
no outgoing calls
no test coverage detected