language/duchain
KDevelop::TopDUContext::Cache Class Reference
The cache allows speeding up repeated searches. More...
#include <topducontext.h>
Public Member Functions | |
| Cache (TopDUContextPointer context) | |
Detailed Description
The cache allows speeding up repeated searches.
When you're planning to do many searches from within the same top-context, this should be done. Just create an item of type Cache, and give it the du-context. The duchain must not be locked when calling this. The cache will automatically be discarded on destruction of the item. It is thread-local, so you don't need to care about multi-threading.
- Warning:
- The DUChain must not be locked when the constructor is called, and it must not be locked when the destructor is executed.
- Only use this in phases when you're not changing the Data within this contexts, else the cache will become invalid and search will be fuzzy.
Definition at line 320 of file topducontext.h.
Constructor & Destructor Documentation
| KDevelop::TopDUContext::Cache::Cache | ( | TopDUContextPointer | context | ) |
- Todo:
- move this kind of caching into the symbol-table
Definition at line 1536 of file topducontext.cpp.
The documentation for this class was generated from the following files:
KDE 4.4 API Reference