Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsCache.CacheAtlas< T > Class Template Referenceabstract

Base class for cache atlas. More...

Public Member Functions

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

Protected Attributes

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

Static Protected Attributes

const short ATLAS_VERSION = 1
 Version of the atlas.
 

Properties

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

Detailed Description

Base class for cache atlas.

Template Parameters
TType of cache item
Type Constraints
T :CacheItem 

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()

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

Creates a new item.

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

◆ DeleteOldItems()

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

Deletes old items.

Parameters
cacheCache

◆ Load()

Loads the atlas from the cache.

Parameters
cacheCache

◆ Save()

Saves the atlas.

Parameters
cacheCache