![]() |
XII Release 0.1.0
|
This object caches files in a tokenized state. It can be shared among xiiPreprocessor instances to improve performance when they access the same files. More...
#include <Preprocessor.h>
Classes | |
struct | FileData |
Public Member Functions | |
xiiMap< xiiString, FileData >::ConstIterator | Lookup (const xiiString &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 xiiString &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 xiiTokenizer * | Tokenize (const xiiString &sFileName, xiiArrayPtr< const xiiUInt8 > fileContent, const xiiTimestamp &fileTimeStamp, xiiLogInterface *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 xiiPreprocessor instances to improve performance when they access the same files.
const xiiTokenizer * xiiTokenizedFileCache::Tokenize | ( | const xiiString & | sFileName, |
xiiArrayPtr< const xiiUInt8 > | fileContent, | ||
const xiiTimestamp & | fileTimeStamp, | ||
xiiLogInterface * | 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.