FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Core::FMTYieldsCache Class Reference

Cache of yield values keyed by development and yield name. More...

#include <FMTYieldsCache.h>

Public Member Functions

 FMTYieldsCache ()=default
 Default constructor for FMTYieldsCache.
 
 FMTYieldsCache (const FMTYieldsCache &rhs)=default
 Copy constructor for FMTYieldsCache.
 
FMTYieldsCacheoperator= (const FMTYieldsCache &rhs)=default
 Copy assignment operator for FMTYieldsCache.
 
 ~FMTYieldsCache ()=default
 Default destructor for FMTYieldsCache.
 
bool inCache (const FMTYieldRequest &p_request, const std::string &p_yield) const
 Return true if the value for a request and yield is cached.
 
double get (const FMTYieldRequest &p_request, const std::string &p_yield) const
 Get the cached value for a request and yield.
 
void set (double p_value, const FMTYieldRequest &p_request, const std::string &p_yield)
 Cache a value for a request and yield.
 
void reserve (const FMTYieldRequest &p_request)
 Reserve memory in the cache for a request.
 

Detailed Description

Cache of yield values keyed by development and yield name.

Constructor & Destructor Documentation

◆ FMTYieldsCache() [1/2]

Core::FMTYieldsCache::FMTYieldsCache ( )
default

Default constructor for FMTYieldsCache.

◆ FMTYieldsCache() [2/2]

Core::FMTYieldsCache::FMTYieldsCache ( const FMTYieldsCache rhs)
default

Copy constructor for FMTYieldsCache.

Parameters
[in]rhsthe FMTYieldsCache to copy.

◆ ~FMTYieldsCache()

Core::FMTYieldsCache::~FMTYieldsCache ( )
default

Default destructor for FMTYieldsCache.

Member Function Documentation

◆ get()

double Core::FMTYieldsCache::get ( const FMTYieldRequest p_request,
const std::string &  p_yield 
) const

Get the cached value for a request and yield.

Parameters
[in]p_requestthe yield request.
[in]p_yieldthe yield name.
Returns
the cached value.

◆ inCache()

bool Core::FMTYieldsCache::inCache ( const FMTYieldRequest p_request,
const std::string &  p_yield 
) const

Return true if the value for a request and yield is cached.

Parameters
[in]p_requestthe yield request.
[in]p_yieldthe yield name.
Returns
true if the value is cached else false.

◆ operator=()

FMTYieldsCache & Core::FMTYieldsCache::operator= ( const FMTYieldsCache rhs)
default

Copy assignment operator for FMTYieldsCache.

Parameters
[in]rhsthe FMTYieldsCache to copy.
Returns
a reference to this FMTYieldsCache.

◆ reserve()

void Core::FMTYieldsCache::reserve ( const FMTYieldRequest p_request)

Reserve memory in the cache for a request.

Parameters
[in]p_requestthe yield request.

◆ set()

void Core::FMTYieldsCache::set ( double  p_value,
const FMTYieldRequest p_request,
const std::string &  p_yield 
)

Cache a value for a request and yield.

Parameters
[in]p_valuethe value.
[in]p_requestthe yield request.
[in]p_yieldthe yield name.

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