Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::Tiled::TilesetCache Class Reference

#include <TilesetCache.h>

Public Member Functions

std::shared_ptr< TiledTilesetGetTileset (const std::string &filepath)
 
void AddTileset (const std::string &filepath, std::shared_ptr< TiledTileset > tileset)
 
void Clear ()
 
bool HasTileset (const std::string &filepath) const
 

Static Public Member Functions

static TilesetCacheGetInstance ()
 

Private Member Functions

 TilesetCache ()=default
 
 ~TilesetCache ()=default
 
 TilesetCache (const TilesetCache &)=delete
 
TilesetCacheoperator= (const TilesetCache &)=delete
 

Private Attributes

std::map< std::string, std::shared_ptr< TiledTileset > > cache_
 
std::mutex mutex_
 

Detailed Description

Definition at line 20 of file TilesetCache.h.

Constructor & Destructor Documentation

◆ TilesetCache() [1/2]

Olympe::Tiled::TilesetCache::TilesetCache ( )
privatedefault

◆ ~TilesetCache()

Olympe::Tiled::TilesetCache::~TilesetCache ( )
privatedefault

◆ TilesetCache() [2/2]

Olympe::Tiled::TilesetCache::TilesetCache ( const TilesetCache )
privatedelete

Member Function Documentation

◆ AddTileset()

void Olympe::Tiled::TilesetCache::AddTileset ( const std::string &  filepath,
std::shared_ptr< TiledTileset tileset 
)

Definition at line 44 of file TilesetCache.cpp.

References cache_, GetComponentTypeID_Static(), and mutex_.

+ Here is the call graph for this function:

◆ Clear()

void Olympe::Tiled::TilesetCache::Clear ( )

Definition at line 50 of file TilesetCache.cpp.

References cache_, GetComponentTypeID_Static(), mutex_, and SYSTEM_LOG.

+ Here is the call graph for this function:

◆ GetInstance()

TilesetCache & Olympe::Tiled::TilesetCache::GetInstance ( )
static

Definition at line 12 of file TilesetCache.cpp.

References GetComponentTypeID_Static().

Referenced by Olympe::Tiled::TiledLevelLoader::LoadExternalTileset(), and TilesetManager::LoadTilesets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetTileset()

std::shared_ptr< TiledTileset > Olympe::Tiled::TilesetCache::GetTileset ( const std::string &  filepath)

Definition at line 18 of file TilesetCache.cpp.

References cache_, GetComponentTypeID_Static(), mutex_, and SYSTEM_LOG.

Referenced by Olympe::Tiled::TiledLevelLoader::LoadExternalTileset(), and TilesetManager::LoadTilesets().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasTileset()

bool Olympe::Tiled::TilesetCache::HasTileset ( const std::string &  filepath) const

Definition at line 57 of file TilesetCache.cpp.

References cache_, GetComponentTypeID_Static(), and mutex_.

+ Here is the call graph for this function:

◆ operator=()

TilesetCache & Olympe::Tiled::TilesetCache::operator= ( const TilesetCache )
privatedelete

Member Data Documentation

◆ cache_

std::map<std::string, std::shared_ptr<TiledTileset> > Olympe::Tiled::TilesetCache::cache_
private

Definition at line 45 of file TilesetCache.h.

Referenced by AddTileset(), Clear(), GetTileset(), and HasTileset().

◆ mutex_

std::mutex Olympe::Tiled::TilesetCache::mutex_
mutableprivate

Definition at line 46 of file TilesetCache.h.

Referenced by AddTileset(), Clear(), GetTileset(), and HasTileset().


The documentation for this class was generated from the following files: