Flow123d  JS_before_hm-1804-gf2ad740aa
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CacheMapElementNumber Class Reference

Auxiliary data class holds number of elements in cache and allow to set this value explicitly (e.g. as input parameter). More...

#include <field_value_cache.hh>

Public Member Functions

 CacheMapElementNumber (CacheMapElementNumber const &)=delete
 We don't need copy constructor. More...
 
void operator= (CacheMapElementNumber const &)=delete
 We don't need assignment operator. More...
 

Static Public Member Functions

static unsigned int get ()
 Return number of stored elements. More...
 
static void set (unsigned int n_elem)
 Set number of stored elements. More...
 

Private Member Functions

 CacheMapElementNumber ()
 Forbiden default constructor. More...
 

Static Private Member Functions

static CacheMapElementNumberget_instance ()
 

Private Attributes

unsigned int n_elem_
 Maximal number of elements stored in cache. More...
 

Detailed Description

Auxiliary data class holds number of elements in cache and allow to set this value explicitly (e.g. as input parameter).

Implementation is done as singletone with two access through static methods 'get' and 'set'.

TODO: This is actually a constant so make it a constant int in element cache map.

Definition at line 90 of file field_value_cache.hh.

Constructor & Destructor Documentation

◆ CacheMapElementNumber() [1/2]

CacheMapElementNumber::CacheMapElementNumber ( CacheMapElementNumber const &  )
delete

We don't need copy constructor.

◆ CacheMapElementNumber() [2/2]

CacheMapElementNumber::CacheMapElementNumber ( )
inlineprivate

Forbiden default constructor.

Definition at line 107 of file field_value_cache.hh.

Member Function Documentation

◆ get()

static unsigned int CacheMapElementNumber::get ( )
inlinestatic

Return number of stored elements.

Definition at line 93 of file field_value_cache.hh.

Here is the caller graph for this function:

◆ get_instance()

static CacheMapElementNumber& CacheMapElementNumber::get_instance ( )
inlinestaticprivate

Definition at line 110 of file field_value_cache.hh.

Here is the caller graph for this function:

◆ operator=()

void CacheMapElementNumber::operator= ( CacheMapElementNumber const &  )
delete

We don't need assignment operator.

◆ set()

static void CacheMapElementNumber::set ( unsigned int  n_elem)
inlinestatic

Set number of stored elements.

Definition at line 98 of file field_value_cache.hh.

Member Data Documentation

◆ n_elem_

unsigned int CacheMapElementNumber::n_elem_
private

Maximal number of elements stored in cache.

Definition at line 117 of file field_value_cache.hh.


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