MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / DocumentIndexer

Class DocumentIndexer

scintilla/src/Document.cxx:2081–2098  ·  view source on GitHub ↗

Define a way for the Regular Expression code to access the document

Source from the content-addressed store, hash-verified

2079
2080// Define a way for the Regular Expression code to access the document
2081class DocumentIndexer : public CharacterIndexer {
2082 Document *pdoc;
2083 int end;
2084public:
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
2100long BuiltinRegex::FindText(Document *doc, int minPos, int maxPos, const char *s,
2101 bool caseSensitive, bool, bool, int flags,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected