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 21 of file stencilDataBase.hpp.
◆ StencilDataBase()
| NeoN::StencilDataBase::StencilDataBase |
( |
| ) |
|
|
default |
◆ contains()
| bool NeoN::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 & NeoN::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 69 of file stencilDataBase.hpp.
◆ get() [2/2]
template<typename T >
| const T & NeoN::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 84 of file stencilDataBase.hpp.
◆ insert()
template<typename T >
| void NeoN::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 38 of file stencilDataBase.hpp.
◆ operator[]() [1/2]
| std::any & NeoN::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 & NeoN::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: