Online Maps  v3
OnlineMapsCache.CacheAtlas< T > Class Template Referenceabstract

Base class for cache atlas. More...

Public Member Functions

 CacheAtlas ()
 Constructor More...
 
bool Contains (string filename)
 Checks whether the atlas contains the specified file. More...
 
abstract T CreateItem (string filename, int size, long time)
 Creates a new item. More...
 
abstract void DeleteOldItems (OnlineMapsCache cache)
 Deletes old items. More...
 
void Load (OnlineMapsCache cache)
 Loads the atlas from the cache. More...
 
void Save (OnlineMapsCache cache)
 Saves the atlas. More...
 

Protected Attributes

int capacity = 256
 Capacity of the atlas. More...
 
int count = 0
 Count of items in the atlas. More...
 
T[] items
 Items of the atlas. More...
 

Static Protected Attributes

const short ATLAS_VERSION = 1
 Version of the atlas. More...
 

Properties

abstract string atlasName [get]
 Name of the atlas. More...
 
int size [get, protected set]
 Size of the atlas. More...
 

Detailed Description

Base class for cache atlas.

Template Parameters
TType of cache item
Type Constraints
T :CacheItem 

Constructor & Destructor Documentation

◆ CacheAtlas()

Constructor

Member Function Documentation

◆ Contains()

bool OnlineMapsCache.CacheAtlas< T >.Contains ( string  filename)

Checks whether the atlas contains the specified file.

Parameters
filenameName of the file
Returns
True - contains, false - not contains.

◆ CreateItem()

abstract T OnlineMapsCache.CacheAtlas< T >.CreateItem ( string  filename,
int  size,
long  time 
)
pure virtual

Creates a new item.

Parameters
filenameName of the file
sizeSize of the file
timeCreation time
Returns
Item

Implemented in OnlineMapsCache.FileCacheAtlas, and OnlineMapsCache.CustomCacheAtlas.

◆ DeleteOldItems()

abstract void OnlineMapsCache.CacheAtlas< T >.DeleteOldItems ( OnlineMapsCache  cache)
pure virtual

Deletes old items.

Parameters
cacheCache

Implemented in OnlineMapsCache.FileCacheAtlas, and OnlineMapsCache.CustomCacheAtlas.

◆ Load()

void OnlineMapsCache.CacheAtlas< T >.Load ( OnlineMapsCache  cache)

Loads the atlas from the cache.

Parameters
cacheCache

◆ Save()

void OnlineMapsCache.CacheAtlas< T >.Save ( OnlineMapsCache  cache)

Saves the atlas.

Parameters
cacheCache

Member Data Documentation

◆ ATLAS_VERSION

const short OnlineMapsCache.CacheAtlas< T >.ATLAS_VERSION = 1
staticprotected

Version of the atlas.

◆ capacity

int OnlineMapsCache.CacheAtlas< T >.capacity = 256
protected

Capacity of the atlas.

◆ count

int OnlineMapsCache.CacheAtlas< T >.count = 0
protected

Count of items in the atlas.

◆ items

T [] OnlineMapsCache.CacheAtlas< T >.items
protected

Items of the atlas.

Property Documentation

◆ atlasName

abstract string OnlineMapsCache.CacheAtlas< T >.atlasName
getprotected

Name of the atlas.

◆ size

int OnlineMapsCache.CacheAtlas< T >.size
getprotected set

Size of the atlas.