CARTA Backend
The backend component of CARTA
Loading...
Searching...
No Matches
carta::LoaderCache Class Reference

#include <LoaderCache.h>

Collaboration diagram for carta::LoaderCache:
[legend]

Public Member Functions

 LoaderCache (int capacity)
 
std::shared_ptr< FileLoaderGet (const std::string &filename, const std::string &directory="")
 
void Remove (const std::string &filename, const std::string &directory="")
 

Private Member Functions

std::string GetKey (const std::string &filename, const std::string &directory)
 

Private Attributes

int _capacity
 
std::unordered_map< std::string, std::shared_ptr< FileLoader > > _map
 
std::list< std::string > _queue
 
std::mutex _loader_cache_mutex
 

Constructor & Destructor Documentation

◆ LoaderCache()

LoaderCache::LoaderCache ( int  capacity)

Member Function Documentation

◆ Get()

std::shared_ptr< FileLoader > LoaderCache::Get ( const std::string &  filename,
const std::string &  directory = "" 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetKey()

std::string LoaderCache::GetKey ( const std::string &  filename,
const std::string &  directory 
)
private
Here is the caller graph for this function:

◆ Remove()

void LoaderCache::Remove ( const std::string &  filename,
const std::string &  directory = "" 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _capacity

int carta::LoaderCache::_capacity
private

◆ _loader_cache_mutex

std::mutex carta::LoaderCache::_loader_cache_mutex
private

◆ _map

std::unordered_map<std::string, std::shared_ptr<FileLoader> > carta::LoaderCache::_map
private

◆ _queue

std::list<std::string> carta::LoaderCache::_queue
private

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