The base class for storing a Reporter's state. More...
#include <ReporterState.h>
Public Member Functions | |
ReporterStateBase (const ReporterName &name) | |
virtual | ~ReporterStateBase ()=default |
const ReporterName & | getReporterName () const |
Return the ReporterName that this state is associated with. More... | |
void | addConsumer (ReporterMode mode, const MooseObject &moose_object) |
Add a consumer for this ReporterState. More... | |
const std::set< std::pair< ReporterMode, const MooseObject * > > & | getConsumers () const |
Returns the consumers for this state; a pair that consists of the mode that the state is being consumed by, and the object consuming it. More... | |
virtual std::string | valueType () const =0 |
void | setIsPostprocessor () |
Sets the special Reporter type to a Postprocessor. More... | |
void | setIsVectorPostprocessor () |
Sets the special Reporter type to a VectorPostprocessor. More... | |
Private Attributes | |
ReporterName | _reporter_name |
Name of data that state is associated. More... | |
std::set< std::pair< ReporterMode, const MooseObject * > > | _consumers |
The consumers for this state; we store the MooseObject for detailed error reporting. More... | |
The base class for storing a Reporter's state.
The base class is needed in order to store the states without a template parameter so that they can be iterated through to observe the producers and consumers.
Definition at line 32 of file ReporterState.h.
ReporterStateBase::ReporterStateBase | ( | const ReporterName & | name | ) |
Definition at line 14 of file ReporterState.C.
|
virtualdefault |
void ReporterStateBase::addConsumer | ( | ReporterMode | mode, |
const MooseObject & | moose_object | ||
) |
Add a consumer for this ReporterState.
mode | The mode that the object will consume the Reporter value |
moose_object | The MooseObject doing the consuming (for error reporting) |
Definition at line 17 of file ReporterState.C.
Referenced by ReporterTransferInterface::addReporterTransferMode().
|
inline |
Returns the consumers for this state; a pair that consists of the mode that the state is being consumed by, and the object consuming it.
Definition at line 56 of file ReporterState.h.
Referenced by ReporterData::getReporterInfo(), and ReporterContextBase::requiresConsumerModes().
|
inline |
Return the ReporterName that this state is associated with.
Definition at line 41 of file ReporterState.h.
Referenced by ReporterData::getReporterInfo().
|
inline |
Sets the special Reporter type to a Postprocessor.
See ReporterData::declareReporterValue.
Definition at line 71 of file ReporterState.h.
|
inline |
Sets the special Reporter type to a VectorPostprocessor.
See ReporterData::declareReporterValue.
Definition at line 77 of file ReporterState.h.
|
pure virtual |
Implemented in ReporterState< T >, and ReporterState< std::vector< T > >.
Referenced by ReporterData::getReporterInfo().
|
private |
The consumers for this state; we store the MooseObject for detailed error reporting.
Definition at line 84 of file ReporterState.h.
Referenced by addConsumer(), and getConsumers().
|
private |
Name of data that state is associated.
Definition at line 81 of file ReporterState.h.
Referenced by getReporterName(), setIsPostprocessor(), and setIsVectorPostprocessor().