Documentation of UrbanFireXDT
Documentation of UrbanFireXDT
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
PVProfileIDCache Class Reference

#include <cache_helper.hpp>

Public Member Functions

 PVProfileIDCache (PVProfileIDCache const &)=delete
 
void operator= (PVProfileIDCache const &)=delete
 
void setCacheFilename (const std::string &filename)
 
void updateCache (size_t locationID, const std::string &roof_orientation, size_t profileID)
 
std::optional< size_t > readCache (size_t locationID, const std::string &roof_orientation)
 
void saveCacheFile ()
 

Static Public Member Functions

static PVProfileIDCacheGetInstance ()
 

Detailed Description

This is the singleton class for storing and querying the cache file for the PV profiles allocated to a given location referenced by the locationID and roof orientation.

Constructor & Destructor Documentation

◆ PVProfileIDCache()

PVProfileIDCache::PVProfileIDCache ( PVProfileIDCache const &  )
delete

Member Function Documentation

◆ GetInstance()

static PVProfileIDCache & PVProfileIDCache::GetInstance ( )
inlinestatic

Static method for getting the only instance of the singleton class

◆ operator=()

void PVProfileIDCache::operator= ( PVProfileIDCache const &  )
delete

◆ readCache()

std::optional< size_t > PVProfileIDCache::readCache ( size_t  locationID,
const std::string &  roof_orientation 
)
inline

Read an entry. Returns std::nullopt if not found

◆ saveCacheFile()

void PVProfileIDCache::saveCacheFile ( )
inline

Saves the current content of the cache file.

◆ setCacheFilename()

void PVProfileIDCache::setCacheFilename ( const std::string &  filename)
inline

Set the filename for the cache file

◆ updateCache()

void PVProfileIDCache::updateCache ( size_t  locationID,
const std::string &  roof_orientation,
size_t  profileID 
)
inline

Update or insert an entry


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