https://mooseframework.inl.gov
ExecFlagRegistry.h
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 #pragma once
11 
12 #include "ExecFlagEnum.h"
13 
14 namespace moose
15 {
16 namespace internal
17 {
18 
23 {
24 public:
31  const ExecFlagType & registerFlag(const std::string & name, const bool is_default);
32 
36  const ExecFlagEnum & getFlags() const { return _flags; };
37 
41  const ExecFlagEnum & getDefaultFlags() const { return _default_flags; };
42 
45 
47  ExecFlagRegistry(ExecFlagRegistry const &) = delete;
48  ExecFlagRegistry & operator=(ExecFlagRegistry const &) = delete;
49 
53 
54 private:
55  // Private constructor for singleton pattern
57 
60 
63 };
64 
65 } // internal
66 } // moose
67 
68 #define registerExecFlag(flag) \
69  moose::internal::ExecFlagRegistry::getExecFlagRegistry().registerFlag(flag, false)
70 #define registerDefaultExecFlag(flag) \
71  moose::internal::ExecFlagRegistry::getExecFlagRegistry().registerFlag(flag, true)
std::string name(const ElemQuality q)
A MultiMooseEnum object to hold "execute_on" flags.
Definition: ExecFlagEnum.h:21
Registry for statically defining execute flags with consistent numbering.
static ExecFlagRegistry & getExecFlagRegistry()
Return Singleton instance.
const ExecFlagType & registerFlag(const std::string &name, const bool is_default)
Registers an execute flag.
ExecFlagRegistry & operator=(ExecFlagRegistry const &)=delete
const ExecFlagEnum & getFlags() const
Class for containing MooseEnum item information.
Definition: MooseEnumItem.h:18
const ExecFlagEnum & getDefaultFlags() const
ExecFlagEnum _flags
The registered flags.
ExecFlagEnum _default_flags
The default flags.