A class that represents a stencil database.
More...
#include <stencilDataBase.hpp>
|
| StencilDataBase ()=default |
| Default constructor for StencilDataBase.
|
|
template<typename T > |
void | insert (const std::string &key, T value) |
| Inserts a value into the stencil database.
|
|
std::any & | operator[] (const std::string &key) |
| Retrieves a reference to the value associated with the given key.
|
|
const std::any & | operator[] (const std::string &key) const |
| Retrieves a const reference to the value associated with the given key.
|
|
template<typename T > |
T & | get (const std::string &key) |
| Retrieves a reference to the value associated with the given key.
|
|
template<typename T > |
const T & | get (const std::string &key) const |
| Retrieves a const reference to the value associated with the given key.
|
|
bool | contains (const std::string &key) const |
| Checks if the stencil database contains a value associated with the given key.
|
|
A class that represents a stencil database.
The StencilDataBase class provides a container for storing stencil data. It allows insertion, retrieval, and checking of stencil data using string keys.
Definition at line 19 of file stencilDataBase.hpp.
◆ StencilDataBase()
NeoFOAM::StencilDataBase::StencilDataBase |
( |
| ) |
|
|
default |
◆ contains()
bool NeoFOAM::StencilDataBase::contains |
( |
const std::string & |
key | ) |
const |
Checks if the stencil database contains a value associated with the given key.
- Parameters
-
- Returns
- true if the database contains the key, false otherwise.
◆ get() [1/2]
template<typename T >
T & NeoFOAM::StencilDataBase::get |
( |
const std::string & |
key | ) |
|
|
inline |
Retrieves a reference to the value associated with the given key.
- Template Parameters
-
T | The type of the value to be retrieved. |
- Parameters
-
key | The key associated with the value. |
- Returns
- A reference to the value associated with the key.
- Exceptions
-
std::bad_any_cast | if the value cannot be cast to type T. |
Definition at line 67 of file stencilDataBase.hpp.
◆ get() [2/2]
template<typename T >
const T & NeoFOAM::StencilDataBase::get |
( |
const std::string & |
key | ) |
const |
|
inline |
Retrieves a const reference to the value associated with the given key.
- Template Parameters
-
T | The type of the value to be retrieved. |
- Parameters
-
key | The key associated with the value. |
- Returns
- A const reference to the value associated with the key.
- Exceptions
-
std::bad_any_cast | if the value cannot be cast to type T. |
Definition at line 82 of file stencilDataBase.hpp.
◆ insert()
template<typename T >
void NeoFOAM::StencilDataBase::insert |
( |
const std::string & |
key, |
|
|
T |
value |
|
) |
| |
|
inline |
Inserts a value into the stencil database.
- Template Parameters
-
T | The type of the value to be inserted. |
- Parameters
-
key | The key associated with the value. |
value | The value to be inserted. |
Definition at line 36 of file stencilDataBase.hpp.
◆ operator[]() [1/2]
std::any & NeoFOAM::StencilDataBase::operator[] |
( |
const std::string & |
key | ) |
|
Retrieves a reference to the value associated with the given key.
- Parameters
-
key | The key associated with the value. |
- Returns
- A reference to the value associated with the key.
◆ operator[]() [2/2]
const std::any & NeoFOAM::StencilDataBase::operator[] |
( |
const std::string & |
key | ) |
const |
Retrieves a const reference to the value associated with the given key.
- Parameters
-
key | The key associated with the value. |
- Returns
- A const reference to the value associated with the key.
The documentation for this class was generated from the following file:
- /home/runner/work/NeoFOAM/NeoFOAM/include/NeoFOAM/finiteVolume/cellCentred/stencil/stencilDataBase.hpp