CycloBranch
cIsotopePatternCache Class Reference

Isotope pattern cache (LRU cache is implemented). More...

#include <cIsotopePatternCache.h>

Inheritance diagram for cIsotopePatternCache:

Public Member Functions

 cIsotopePatternCache (int size=10000)
 The constructor. More...
 
 ~cIsotopePatternCache ()
 The destructor.
 
bool get (string &formula, cPeaksList &isotopepattern)
 Get the isotope pattern corresponding to the formula from the cache. More...
 
void put (string &formula, cPeaksList &isotopepattern)
 Put the isotope pattern corresponding to the formula into the cache. More...
 
void clear ()
 Clear the cache.
 

Detailed Description

Isotope pattern cache (LRU cache is implemented).

Constructor & Destructor Documentation

◆ cIsotopePatternCache()

cIsotopePatternCache::cIsotopePatternCache ( int  size = 10000)

The constructor.

Parameters
sizemaximum number of cached items

Member Function Documentation

◆ get()

bool cIsotopePatternCache::get ( string &  formula,
cPeaksList isotopepattern 
)

Get the isotope pattern corresponding to the formula from the cache.

Parameters
formulainput summary formula
isotopepatternoutput isotope pattern
Return values
booltrue if the isotope pattern was found; false otherwise.

◆ put()

void cIsotopePatternCache::put ( string &  formula,
cPeaksList isotopepattern 
)

Put the isotope pattern corresponding to the formula into the cache.

Parameters
formulainput summary formula
isotopepatterninput isotope pattern

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