![]() |
ezEngine Release 25.08
|
This object caches files in a tokenized state. It can be shared among ezPreprocessor instances to improve performance when they access the same files. More...
#include <Preprocessor.h>
Classes | |
struct | FileData |
Public Member Functions | |
ezMap< ezString, FileData >::ConstIterator | Lookup (const ezString &sFileName) const |
Checks whether sFileName is already in the cache, returns an iterator to it. If the iterator is invalid, the file is not cached yet. | |
void | Remove (const ezString &sFileName) |
Removes the cached content for sFileName from the cache. Should be used when the file content has changed and needs to be re-read. | |
void | Clear () |
Removes all files from the cache to ensure that they will be re-read. | |
const ezTokenizer * | Tokenize (const ezString &sFileName, ezArrayPtr< const ezUInt8 > fileContent, const ezTimestamp &fileTimeStamp, ezLogInterface *pLog) |
Stores FileContent for the file sFileName as the new cached data. | |
This object caches files in a tokenized state. It can be shared among ezPreprocessor instances to improve performance when they access the same files.
const ezTokenizer * ezTokenizedFileCache::Tokenize | ( | const ezString & | sFileName, |
ezArrayPtr< const ezUInt8 > | fileContent, | ||
const ezTimestamp & | fileTimeStamp, | ||
ezLogInterface * | pLog | ||
) |
Stores FileContent for the file sFileName as the new cached data.
The file content is tokenized first and all line directives are evaluated, to update the line number and file origin for each token. Any errors are written to the given log.