![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class defines a shared cache for use with data that is displayed with an OpenGL drawing surface.
The cache is intended to be used my multiple data layers (TSLDataLayer) at the same time, rather than each data layer having its own cache. The cache can be used in an application to set a single cache size.
This is useful when there are multiple data layers in use but not all of them are currently visible. As visible layers are drawn they can utilise the cache without being limited to individual cache sizes per layer.
Note that the cache is not thread safe.
To use the cache with a particular data layer, call the setSharedCache() function and pass in the data layer which will use the cache. This can be repeated for any other data layers that will share the same cache.
Public Member Functions | |
TSLOpenGLSingleThreadCache () | |
void * | operator new (size_t size) TSL_NO_THROW |
void * | operator new (size_t size, char *filename, int line) |
![]() | |
TSLSingleThreadCache () | |
Constructor. | |
void | destroy () |
void | setCacheSize (uint64_t size) |
uint64_t | getCacheSize () const |
bool | setSharedCache (TSLDataLayer &dataLayer) |
int | userCount () const |
void * | operator new (size_t size) TSL_NO_THROW |
Allocation override for API redirection. | |
void * | operator new (size_t size, char *filename, int line) |
Additional Inherited Members | |
![]() | |
~TSLSingleThreadCache () | |
Destructor. | |
TSLOpenGLSingleThreadCache::TSLOpenGLSingleThreadCache | ( | ) |
void * TSLOpenGLSingleThreadCache::operator new | ( | size_t | size | ) |
Overridden allocation to redirect to MapLink
void * TSLOpenGLSingleThreadCache::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.