https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
PostprocessorReporterName Class Reference

A ReporterName that represents a Postprocessor. More...

#include <ReporterName.h>

Inheritance diagram for PostprocessorReporterName:
[legend]

Public Member Functions

 PostprocessorReporterName (const PostprocessorName &name)
 
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...
 

Detailed Description

A ReporterName that represents a Postprocessor.

Definition at line 143 of file ReporterName.h.

Constructor & Destructor Documentation

◆ PostprocessorReporterName()

PostprocessorReporterName::PostprocessorReporterName ( const PostprocessorName &  name)

Definition at line 105 of file ReporterName.C.

106  : ReporterName(name, "value")
107 {
109 }
void setIsPostprocessor()
Sets the special type to a Postprocessor.
Definition: ReporterName.h:105

Member Function Documentation

◆ empty()

bool ReporterName::empty ( ) const
inlineinherited

Whether or not the ReporterName is empty, similar to std::string::empty()

Definition at line 116 of file ReporterName.h.

116 { return _object_name.empty() || _value_name.empty(); }
std::string _value_name
The value name.
Definition: ReporterName.h:137
std::string _object_name
The object name.
Definition: ReporterName.h:135

◆ getCombinedName()

const std::string ReporterName::getCombinedName ( ) const
inherited

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(), ReporterName::getRestartableName(), ReporterTransferInterface::hideVariableHelper(), ReporterName::operator<(), operator<<(), and ReporterName::operator==().

54 {
55  return _object_name + "/" + _value_name;
56 }
std::string _value_name
The value name.
Definition: ReporterName.h:137
std::string _object_name
The object name.
Definition: ReporterName.h:135

◆ getObjectName()

const std::string & ReporterName::getObjectName ( ) const
inherited

◆ getRestartableName()

std::string ReporterName::getRestartableName ( ) const
inherited

Return the name used for registration of this Reporter in the restartable data system.

Definition at line 59 of file ReporterName.C.

60 {
62 }
static const std::string REPORTER_RESTARTABLE_DATA_PREFIX
The prefix for reporter data in the restartable system.
Definition: ReporterName.h:63
const std::string getCombinedName() const
Return the name of the object and data as object_name/data_name.
Definition: ReporterName.C:53

◆ getValueName()

const std::string & ReporterName::getValueName ( ) const
inherited

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().

48 {
49  return _value_name;
50 }
std::string _value_name
The value name.
Definition: ReporterName.h:137

◆ isPostprocessor()

bool ReporterName::isPostprocessor ( ) const
inlineinherited
Returns
True if this ReporterName represents a Postprocessor

Definition at line 94 of file ReporterName.h.

Referenced by ReporterData::getReporterStateHelper(), and ReporterName::specialTypeToName().

ReporterName::SpecialType _special_type
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors.
Definition: ReporterName.h:132

◆ isValidName()

bool ReporterName::isValidName ( const std::string &  object_and_value_name)
staticinherited

Determines if the inputted string is convertible to a ReporterName.

Parameters
object_and_value_nameThe string to determine convertibility
Returns
true Inputted string has a "/"
false Inputted string does not have a "/"

Definition at line 35 of file ReporterName.C.

Referenced by WebServerControl::startServer().

36 {
37  return combined_name.rfind("/") != std::string::npos;
38 }

◆ isVectorPostprocessor()

bool ReporterName::isVectorPostprocessor ( ) const
inlineinherited
Returns
True if this ReporterName represents a VectorPostprocessor

Definition at line 98 of file ReporterName.h.

Referenced by ReporterData::getReporterStateHelper(), and ReporterName::specialTypeToName().

ReporterName::SpecialType _special_type
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors.
Definition: ReporterName.h:132

◆ operator std::string()

ReporterName::operator std::string ( ) const
inherited

std::string operator allows this object to behave as a std::sting object

Definition at line 64 of file ReporterName.C.

64 { return getCombinedName(); }
const std::string getCombinedName() const
Return the name of the object and data as object_name/data_name.
Definition: ReporterName.C:53

◆ operator<()

bool ReporterName::operator< ( const ReporterName rhs) const
inherited

Less than operator.

Definition at line 81 of file ReporterName.C.

82 {
83  // Note here that we do not sort by _special_type. This is because
84  // we want to store reporter names as a single name regardless of the type
85  return getCombinedName() < rhs.getCombinedName();
86 }
const std::string getCombinedName() const
Return the name of the object and data as object_name/data_name.
Definition: ReporterName.C:53

◆ operator==() [1/2]

bool ReporterName::operator== ( const ReporterName rhs) const
inherited

Compare with another object or string.

Definition at line 67 of file ReporterName.C.

68 {
69  // Note here that we do not check if _special_type is the same. This is because
70  // we want to store reporter names as a single name regardless of the type
71  return _object_name == rhs._object_name && _value_name == rhs._value_name;
72 }
std::string _value_name
The value name.
Definition: ReporterName.h:137
std::string _object_name
The object name.
Definition: ReporterName.h:135

◆ operator==() [2/2]

bool ReporterName::operator== ( const std::string &  combined_name) const
inherited

Definition at line 75 of file ReporterName.C.

76 {
77  return getCombinedName() == combined_name;
78 }
const std::string getCombinedName() const
Return the name of the object and data as object_name/data_name.
Definition: ReporterName.C:53

◆ setIsPostprocessor()

void ReporterName::setIsPostprocessor ( )
inlineinherited

Sets the special type to a Postprocessor.

See ReporterData::declareReporterValue.

Definition at line 105 of file ReporterName.h.

Referenced by PostprocessorReporterName(), and ReporterStateBase::setIsPostprocessor().

ReporterName::SpecialType _special_type
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors.
Definition: ReporterName.h:132

◆ setIsVectorPostprocessor()

void ReporterName::setIsVectorPostprocessor ( )
inlineinherited

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().

ReporterName::SpecialType _special_type
The "special" type for this Reporter, used for identifying Postprocesors and VectorPostprocessors.
Definition: ReporterName.h:132

◆ specialTypeToName()

std::string ReporterName::specialTypeToName ( ) const
inherited

Converts the special type to a usable name for error reporting.

Definition at line 89 of file ReporterName.C.

Referenced by ReporterData::getReporterStateHelper().

90 {
91  if (isPostprocessor())
92  return "Postprocessor";
94  return "VectorPostprocessor";
95  return "Reporter";
96 }
bool isVectorPostprocessor() const
Definition: ReporterName.h:98
bool isPostprocessor() const
Definition: ReporterName.h:94

Member Data Documentation

◆ REPORTER_RESTARTABLE_DATA_PREFIX

const std::string ReporterName::REPORTER_RESTARTABLE_DATA_PREFIX = "ReporterData"
staticinherited

The prefix for reporter data in the restartable system.

Definition at line 63 of file ReporterName.h.

Referenced by RestartableDataReporter::execute(), and ReporterName::getRestartableName().


The documentation for this class was generated from the following files: