The Reporter system is comprised of objects that can contain any number of data values. More...
#include <ReporterName.h>
Public Member Functions | |
ReporterName (const std::string &object_name, const std::string &value_name) | |
ReporterName (const std::string &object_and_value_name) | |
ReporterName (const char *combined_name) | |
ReporterName () | |
const std::string & | getObjectName () const |
Return the object name that produces the Reporter value. More... | |
const std::string & | getValueName () const |
Return the data name for the Reporter value. More... | |
const std::string | getCombinedName () const |
Return the name of the object and data as object_name/data_name. More... | |
std::string | getRestartableName () const |
Return the name used for registration of this Reporter in the restartable data system. More... | |
operator std::string () const | |
std::string operator allows this object to behave as a std::sting object More... | |
bool | operator== (const ReporterName &rhs) const |
Compare with another object or string. More... | |
bool | operator== (const std::string &combined_name) const |
bool | operator< (const ReporterName &rhs) const |
Less than operator. More... | |
std::string | specialTypeToName () const |
Converts the special type to a usable name for error reporting. More... | |
bool | isPostprocessor () const |
bool | isVectorPostprocessor () const |
void | setIsPostprocessor () |
Sets the special type to a Postprocessor. More... | |
void | setIsVectorPostprocessor () |
Sets the special type to a VectorPostprocessor. More... | |
bool | empty () const |
Whether or not the ReporterName is empty, similar to std::string::empty() More... | |
Static Public Member Functions | |
static bool | isValidName (const std::string &object_and_value_name) |
Determines if the inputted string is convertible to a ReporterName. More... | |
Static Public Attributes | |
static const std::string | REPORTER_RESTARTABLE_DATA_PREFIX = "ReporterData" |
The prefix for reporter data in the restartable system. More... | |
Private Types | |
enum | SpecialType { SpecialType::ANY = 0, SpecialType::POSTPROCESSOR = 1, SpecialType::VECTORPOSTPROCESSOR = 2 } |
Enum for storing a "special" type for this Reporter. More... | |
Private Attributes | |
ReporterName::SpecialType | _special_type = ReporterName::SpecialType::ANY |
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors. More... | |
std::string | _object_name |
The object name. More... | |
std::string | _value_name |
The value name. More... | |
The Reporter system is comprised of objects that can contain any number of data values.
This class is a wrapper that severs two main purposes.
Examples: ReporterName("object", "data"); ReporterName("object/data");
Definition at line 30 of file ReporterName.h.
|
strongprivate |
Enum for storing a "special" type for this Reporter.
This is used to designate Reporters that represent Postprocessors and VectorPostprocessors in output and error handling.
Enumerator | |
---|---|
ANY | |
POSTPROCESSOR | |
VECTORPOSTPROCESSOR |
Definition at line 124 of file ReporterName.h.
ReporterName::ReporterName | ( | const std::string & | object_name, |
const std::string & | value_name | ||
) |
Definition at line 15 of file ReporterName.C.
ReporterName::ReporterName | ( | const std::string & | object_and_value_name | ) |
Definition at line 20 of file ReporterName.C.
ReporterName::ReporterName | ( | const char * | combined_name | ) |
Definition at line 32 of file ReporterName.C.
|
inline |
Definition at line 36 of file ReporterName.h.
|
inline |
Whether or not the ReporterName is empty, similar to std::string::empty()
Definition at line 116 of file ReporterName.h.
const std::string ReporterName::getCombinedName | ( | ) | const |
Return the name of the object and data as object_name/data_name.
Definition at line 53 of file ReporterName.C.
Referenced by ReporterData::getAllRealReporterFullNames(), ReporterData::getAllRealReporterValues(), getRestartableName(), ReporterTransferInterface::hideVariableHelper(), operator<(), operator<<(), and operator==().
const std::string & ReporterName::getObjectName | ( | ) | const |
Return the object name that produces the Reporter value.
Definition at line 41 of file ReporterName.C.
Referenced by CommonOutputAction::act(), UserObject::addReporterDependencyHelper(), AccumulateReporter::declareAccumulateHelper(), ReporterTransferInterface::hideVariableHelper(), TableOutput::outputReporters(), and Exodus::outputReporters().
std::string ReporterName::getRestartableName | ( | ) | const |
Return the name used for registration of this Reporter in the restartable data system.
Definition at line 59 of file ReporterName.C.
const std::string & ReporterName::getValueName | ( | ) | const |
Return the data name for the Reporter value.
Definition at line 47 of file ReporterName.C.
Referenced by AccumulateReporter::declareAccumulateHelper(), ReporterData::getReporterStateHelper(), and Exodus::outputReporters().
|
inline |
Definition at line 94 of file ReporterName.h.
Referenced by ReporterData::getReporterStateHelper(), and specialTypeToName().
|
static |
Determines if the inputted string is convertible to a ReporterName.
object_and_value_name | The string to determine convertibility |
Definition at line 35 of file ReporterName.C.
Referenced by WebServerControl::startServer().
|
inline |
Definition at line 98 of file ReporterName.h.
Referenced by ReporterData::getReporterStateHelper(), and specialTypeToName().
ReporterName::operator std::string | ( | ) | const |
std::string operator allows this object to behave as a std::sting object
Definition at line 64 of file ReporterName.C.
bool ReporterName::operator< | ( | const ReporterName & | rhs | ) | const |
Less than operator.
Definition at line 81 of file ReporterName.C.
bool ReporterName::operator== | ( | const ReporterName & | rhs | ) | const |
bool ReporterName::operator== | ( | const std::string & | combined_name | ) | const |
Definition at line 75 of file ReporterName.C.
|
inline |
Sets the special type to a Postprocessor.
See ReporterData::declareReporterValue.
Definition at line 105 of file ReporterName.h.
Referenced by PostprocessorReporterName::PostprocessorReporterName(), and ReporterStateBase::setIsPostprocessor().
|
inline |
Sets the special type to a VectorPostprocessor.
See ReporterData::declareReporterValue.
Definition at line 111 of file ReporterName.h.
Referenced by ReporterStateBase::setIsVectorPostprocessor(), and VectorPostprocessorReporterName::VectorPostprocessorReporterName().
std::string ReporterName::specialTypeToName | ( | ) | const |
Converts the special type to a usable name for error reporting.
Definition at line 89 of file ReporterName.C.
Referenced by ReporterData::getReporterStateHelper().
|
private |
The object name.
Definition at line 135 of file ReporterName.h.
Referenced by empty(), getCombinedName(), getObjectName(), operator==(), and ReporterName().
|
private |
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors.
Definition at line 132 of file ReporterName.h.
Referenced by isPostprocessor(), isVectorPostprocessor(), setIsPostprocessor(), and setIsVectorPostprocessor().
|
private |
The value name.
Definition at line 137 of file ReporterName.h.
Referenced by empty(), getCombinedName(), getValueName(), operator==(), and ReporterName().
|
static |
The prefix for reporter data in the restartable system.
Definition at line 63 of file ReporterName.h.
Referenced by RestartableDataReporter::execute(), and getRestartableName().