A helper warehouse class for storing the "execute_on" settings for the various output types. More...
#include <AdvancedOutputUtils.h>
Public Member Functions | |
OutputOnWarehouse (const ExecFlagEnum &execute_on, const InputParameters ¶meters) | |
Constructor. More... | |
ExecFlagEnum & | operator[] (const std::string &name) |
A map accessor that errors if the key is not found. More... | |
bool | contains (const std::string &name) const |
A method for testing of a key exists. More... | |
std::map< std::string, ExecFlagEnum >::iterator | begin () |
Provide iterator and find access to the underlying map data. More... | |
std::map< std::string, ExecFlagEnum >::const_iterator | begin () const |
std::map< std::string, ExecFlagEnum >::iterator | end () |
std::map< std::string, ExecFlagEnum >::const_iterator | end () const |
std::map< std::string, ExecFlagEnum >::iterator | find (const std::string &name) |
const std::map< std::string, ExecFlagEnum >::const_iterator | find (const std::string &name) const |
Protected Attributes | |
std::map< std::string, ExecFlagEnum > | _map |
Data storage. More... | |
A helper warehouse class for storing the "execute_on" settings for the various output types.
In order to allow for new output types to be defined and to minimize the number of member variables the "execute_on" parameter for each of the output types (e.g., execute_postprocessors_on) are stored in a map.
This allows for iterative access to these parameters, which makes creating generic code (e.g., AdvancedOutput::shouldOutput) possible. However, ExecFlagEnum has a private constructor, so calling operator[] on the map is a compile time error.
To get around this and to provide a more robust storage structure, one that will error if the wrong output name is given, this warehouse was created. For the purposes of the AdvancedOutput object this warehouse functions exactly like a std::map, but provides an operator[] that works with ExecFlagEnum and errors if called on an invalid key.
Definition at line 127 of file AdvancedOutputUtils.h.
OutputOnWarehouse::OutputOnWarehouse | ( | const ExecFlagEnum & | execute_on, |
const InputParameters & | parameters | ||
) |
Constructor.
execute_on | The general "execute_on" settings for the object. |
parameters | The parameters object holding data for the class to use. |
Definition at line 25 of file AdvancedOutputUtils.C.
|
inlineinherited |
Provide iterator and find access to the underlying map data.
Definition at line 84 of file AdvancedOutputUtils.h.
|
inlineinherited |
Definition at line 90 of file AdvancedOutputUtils.h.
|
inlineinherited |
A method for testing of a key exists.
Definition at line 101 of file AdvancedOutputUtils.h.
|
inlineinherited |
Definition at line 85 of file AdvancedOutputUtils.h.
|
inlineinherited |
Definition at line 91 of file AdvancedOutputUtils.h.
|
inlineinherited |
Definition at line 86 of file AdvancedOutputUtils.h.
|
inlineinherited |
Definition at line 92 of file AdvancedOutputUtils.h.
|
inlineinherited |
A map accessor that errors if the key is not found.
Definition at line 71 of file AdvancedOutputUtils.h.
|
protectedinherited |
Data storage.
Definition at line 105 of file AdvancedOutputUtils.h.
Referenced by OutputOnWarehouse().