Molassembler  3.0.0
Molecule graph and conformer library
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Scine::Molassembler::Temple::MinimalCache< KeyType, ValueType > Class Template Reference

A minimal wrapper around a map class with cache semantics. More...

#include <Cache.h>

Public Types

using key_type = KeyType
 
using value_type = ValueType
 

Public Member Functions

Modification
void add (const KeyType key, const ValueType value)
 Adds a data value for a key value into the cache.
 
void invalidate ()
 Invalidates the entire cache, removing all stored data.
 
void invalidate (const KeyType &key)
 Selectively invalidates cache entries.
 
Information
boost::optional< const
ValueType & > 
getOption (const KeyType &key) const
 Fetches a cache entry via an optional.
 
bool has (const KeyType &key) const
 Tests whether the cache contains an entry for a key.
 
const ValueType & get (const KeyType &key) const
 Fetches a particular key, assuming that it is currently cached.
 

Private Attributes

std::map< KeyType, ValueType > cache_
 Cache data.
 

Detailed Description

template<typename KeyType, typename ValueType>
class Scine::Molassembler::Temple::MinimalCache< KeyType, ValueType >

A minimal wrapper around a map class with cache semantics.


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