CoolProp
Public Member Functions | List of all members
CoolProp::CachedElement Class Reference

Detailed Description

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; } };

#include <CachedElement.h>

Public Member Functions

 CachedElement ()
 Default constructor.
 
void _do_cache (double value)
 Function to carry out the caching.
 
void operator= (const double &value)
 Assignment operator - sets the value and sets the flag.
 
 operator bool ()
 Cast to boolean, for checking if cached.
 
 operator double ()
 Cast to double, for returning value.
 
void clear ()
 Clear the flag and the value.
 
CoolPropDbl & pt ()
 

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