CoolProp
4.2.5
An open-source fluid property and humid air property database
|
#include <CPState.h>
Public Member Functions | |
CachedElement () | |
Default constructor. More... | |
void | operator= (const double &value) |
Assignment operator - sets the value and sets the flag. More... | |
operator bool () const | |
Cast to boolean, for checking if cached. More... | |
operator double () const | |
Cast to double, for returning value. More... | |
void | clear () |
Clear the flag and the value. More... | |
A class that contains the magic to cache a value.
Includes an "=" assignment operator and casting to boolean so you can do something like::
double CoolPropStateClassSI::d3phir_dTau3(double tau, double delta){ if (cache.d3phir_dTau3) { return cache.d3phir_dTau3; } else { cache.d3phir_dTau3 = pFluid->d3phir_dTau3(tau,delta); return cache.d3phir_dTau3; } };
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |