https://mooseframework.inl.gov
Functions
ReporterState.C File Reference

Go to the source code of this file.

Functions

bool operator< (const std::pair< ReporterMode, const MooseObject *> &a, const std::pair< ReporterMode, const MooseObject *> &b)
 Custom sort for ReporterState::_consumers so that they are sorted by object type, object name, and then mode, which makes for pretty output. More...
 

Function Documentation

◆ operator<()

bool operator< ( const std::pair< ReporterMode, const MooseObject *> &  a,
const std::pair< ReporterMode, const MooseObject *> &  b 
)

Custom sort for ReporterState::_consumers so that they are sorted by object type, object name, and then mode, which makes for pretty output.

Definition at line 23 of file ReporterState.C.

25 {
26  // Sort by object type, object name, and then mode
27  return a.second->type() < b.second->type() ||
28  (a.second->type() == b.second->type() && a.second->name() < b.second->name()) ||
29  (a.second->type() == b.second->type() && a.second->name() == b.second->name() &&
30  a.first < b.first);
31 }