https://mooseframework.inl.gov
ReporterState.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "ReporterState.h"
11 
12 #include "MooseObject.h"
13 
14 ReporterStateBase::ReporterStateBase(const ReporterName & name) : _reporter_name(name) {}
15 
16 void
18 {
19  _consumers.emplace(mode, &moose_object);
20 }
21 
22 bool
23 operator<(const std::pair<ReporterMode, const MooseObject *> & a,
24  const std::pair<ReporterMode, const MooseObject *> & b)
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 }
std::string name(const ElemQuality q)
ReporterStateBase(const ReporterName &name)
Definition: ReporterState.C:14
void addConsumer(ReporterMode mode, const MooseObject &moose_object)
Add a consumer for this ReporterState.
Definition: ReporterState.C:17
std::set< std::pair< ReporterMode, const MooseObject * > > _consumers
The consumers for this state; we store the MooseObject for detailed error reporting.
Definition: ReporterState.h:84
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28
MooseEnumItem that automatically creates the ID and doesn&#39;t allow the ID to be assigned.
Definition: ReporterMode.h:44
The Reporter system is comprised of objects that can contain any number of data values.
Definition: ReporterName.h:30