The place where all sections with solution invalid warnings will be stored. More...
#include <SolutionInvalidityRegistry.h>
Public Member Functions | |
InvalidSolutionID | registerInvalidity (const std::string &object_type, const std::string &message, const bool warning) |
Call to register an invalid calculation. More... | |
std::size_t | size () const |
std::size_t | id (const SolutionInvalidityName &key) const |
bool | keyExists (const SolutionInvalidityName &key) const |
bool | idExists (const std::size_t id) const |
const SolutionInvalidityInfo & | item (const std::size_t id) const |
Protected Member Functions | |
const SolutionInvalidityInfo & | itemNonLocking (const std::size_t id) const |
std::size_t | registerItem (const SolutionInvalidityName &key, CreateItem &create_item) |
Registers an item with key key if said key does not exist. More... | |
Protected Attributes | |
const std::string | _name |
The name of this registry; used in error handling. More... | |
std::unordered_map< SolutionInvalidityName, std::size_t, SoltionInvalidityNameHash > | _key_to_id |
Map of keys to IDs. More... | |
std::deque< SolutionInvalidityInfo > | _id_to_item |
Vector of IDs to Items. More... | |
std::mutex | _key_to_id_mutex |
Mutex for locking access to _key_to_id NOTE: These can be changed to shared_mutexes once we get C++17. More... | |
std::mutex | _id_to_item_mutex |
Mutex for locking access to _id_to_item NOTE: These can be changed to shared_mutexes once we get C++17. More... | |
Private Member Functions | |
SolutionInvalidityRegistry () | |
Private Attributes | |
friend | SolutionInvalidity |
This is only here so that SolutionInvalidity can access readSectionInfo. More... | |
Friends | |
SolutionInvalidityRegistry & | getSolutionInvalidityRegistry () |
So it can be constructed. More... | |
The place where all sections with solution invalid warnings will be stored.
Definition at line 91 of file SolutionInvalidityRegistry.h.
|
private |
Definition at line 26 of file SolutionInvalidityRegistry.C.
|
inherited |
key
Definition at line 97 of file GeneralRegistry.h.
Referenced by registerInvalidity().
|
inherited |
id
is registered Definition at line 116 of file GeneralRegistry.h.
|
inherited |
key
(thread safe) Definition at line 124 of file GeneralRegistry.h.
Referenced by registerInvalidity().
|
protectedinherited |
key
(not thread safe) Definition at line 132 of file GeneralRegistry.h.
|
inherited |
key
is registered Definition at line 108 of file GeneralRegistry.h.
Referenced by registerInvalidity().
InvalidSolutionID moose::internal::SolutionInvalidityRegistry::registerInvalidity | ( | const std::string & | object_type, |
const std::string & | message, | ||
const bool | warning | ||
) |
Call to register an invalid calculation.
object_type | The type of the object doing the registration |
message | The description of the solution invalid warning |
warning | Whether or not it is a warning |
Definition at line 33 of file SolutionInvalidityRegistry.C.
Referenced by dataLoad(), SolutionInvalidInterface::registerInvalidSolutionInternal(), and SolutionInvalidity::syncIteration().
|
protectedinherited |
Registers an item with key key
if said key does not exist.
key | The key |
create_item | Lambda called to create an item if the key does not exist. Takes a single argument std::size_t which is the new ID and should return an Item |
Definition at line 142 of file GeneralRegistry.h.
Referenced by registerInvalidity().
|
inherited |
Definition at line 89 of file GeneralRegistry.h.
|
friend |
So it can be constructed.
Definition at line 18 of file SolutionInvalidityRegistry.C.
|
protectedinherited |
Vector of IDs to Items.
Definition at line 72 of file GeneralRegistry.h.
|
mutableprotectedinherited |
Mutex for locking access to _id_to_item NOTE: These can be changed to shared_mutexes once we get C++17.
Definition at line 79 of file GeneralRegistry.h.
|
protectedinherited |
Map of keys to IDs.
Definition at line 70 of file GeneralRegistry.h.
|
mutableprotectedinherited |
Mutex for locking access to _key_to_id NOTE: These can be changed to shared_mutexes once we get C++17.
Definition at line 76 of file GeneralRegistry.h.
|
protectedinherited |
The name of this registry; used in error handling.
Definition at line 67 of file GeneralRegistry.h.
|
private |
This is only here so that SolutionInvalidity can access readSectionInfo.
Definition at line 114 of file SolutionInvalidityRegistry.h.