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

A ReporterName that represents a VectorPostprocessor. More...

#include <ReporterName.h>

Inheritance diagram for VectorPostprocessorReporterName:
[legend]

Public Member Functions

 VectorPostprocessorReporterName (const VectorPostprocessorName &name, const std::string &vector_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 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 VectorPostprocessor.

Definition at line 143 of file ReporterName.h.

Constructor & Destructor Documentation

◆ VectorPostprocessorReporterName()

VectorPostprocessorReporterName::VectorPostprocessorReporterName ( const VectorPostprocessorName &  name,
const std::string &  vector_name 
)

Definition at line 105 of file ReporterName.C.

107  : ReporterName(name, vector_name)
108 {
110 }
void setIsVectorPostprocessor()
Sets the special type to a VectorPostprocessor.
Definition: ReporterName.h:102

Member Function Documentation

◆ empty()

bool ReporterName::empty ( ) const
inlineinherited

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

Definition at line 107 of file ReporterName.h.

107 { return _object_name.empty() || _value_name.empty(); }
std::string _value_name
The value name.
Definition: ReporterName.h:128
std::string _object_name
The object name.
Definition: ReporterName.h:126

◆ getCombinedName()

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

Return the name of the object and data as object_name/data_name.

Definition at line 47 of file ReporterName.C.

Referenced by ReporterData::getAllRealReporterFullNames(), ReporterData::getAllRealReporterValues(), ReporterName::getRestartableName(), ReporterTransferInterface::hideVariableHelper(), ReporterName::operator<(), operator<<(), and ReporterName::operator==().

48 {
49  return _object_name + "/" + _value_name;
50 }
std::string _value_name
The value name.
Definition: ReporterName.h:128
std::string _object_name
The object name.
Definition: ReporterName.h:126

◆ 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 53 of file ReporterName.C.

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

◆ getValueName()

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

Return the data name for the Reporter value.

Definition at line 41 of file ReporterName.C.

Referenced by AccumulateReporter::declareAccumulateHelper(), ReporterData::getReporterStateHelper(), and Exodus::outputReporters().

42 {
43  return _value_name;
44 }
std::string _value_name
The value name.
Definition: ReporterName.h:128

◆ isPostprocessor()

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

Definition at line 85 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:123

◆ isVectorPostprocessor()

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

Definition at line 89 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:123

◆ 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 58 of file ReporterName.C.

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

◆ operator<()

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

Less than operator.

Definition at line 75 of file ReporterName.C.

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

◆ operator==() [1/2]

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

Compare with another object or string.

Definition at line 61 of file ReporterName.C.

62 {
63  // Note here that we do not check if _special_type is the same. This is because
64  // we want to store reporter names as a single name regardless of the type
65  return _object_name == rhs._object_name && _value_name == rhs._value_name;
66 }
std::string _value_name
The value name.
Definition: ReporterName.h:128
std::string _object_name
The object name.
Definition: ReporterName.h:126

◆ operator==() [2/2]

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

Definition at line 69 of file ReporterName.C.

70 {
71  return getCombinedName() == combined_name;
72 }
const std::string getCombinedName() const
Return the name of the object and data as object_name/data_name.
Definition: ReporterName.C:47

◆ setIsPostprocessor()

void ReporterName::setIsPostprocessor ( )
inlineinherited

Sets the special type to a Postprocessor.

See ReporterData::declareReporterValue.

Definition at line 96 of file ReporterName.h.

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

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

◆ setIsVectorPostprocessor()

void ReporterName::setIsVectorPostprocessor ( )
inlineinherited

Sets the special type to a VectorPostprocessor.

See ReporterData::declareReporterValue.

Definition at line 102 of file ReporterName.h.

Referenced by ReporterStateBase::setIsVectorPostprocessor(), and VectorPostprocessorReporterName().

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

◆ specialTypeToName()

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

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

Definition at line 83 of file ReporterName.C.

Referenced by ReporterData::getReporterStateHelper().

84 {
85  if (isPostprocessor())
86  return "Postprocessor";
88  return "VectorPostprocessor";
89  return "Reporter";
90 }
bool isVectorPostprocessor() const
Definition: ReporterName.h:89
bool isPostprocessor() const
Definition: ReporterName.h:85

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 54 of file ReporterName.h.

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


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