https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PublicRestartable.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// MOOSE includes
13#include "Restartable.h"
14
21{
22public:
37 const std::string & name,
38 const std::string & system_name,
39 THREAD_ID tid,
40 const bool read_only = false,
41 const RestartableDataMapName & metaname = "")
42 : Restartable(moose_app, name, system_name, tid, read_only, metaname)
43 {
44 }
45
57 template <typename T, typename... Args>
58 T & declareRestartableData(const std::string & data_name, Args &&... args)
59 {
60 return Restartable::declareRestartableData<T>(data_name, std::forward<Args>(args)...);
61 }
62
73 template <typename T, typename... Args>
74 const T & getRestartableData(const std::string & data_name) const
75 {
76 return Restartable::getRestartableData<T>(data_name);
77 }
78};
const double T
std::string RestartableDataMapName
unsigned int THREAD_ID
const std::string name
Definition Setup.h:21
A class which creates public interface functions for declaring and getting restartable data.
T & declareRestartableData(const std::string &data_name, Args &&... args)
Declare a piece of data as "restartable" and initialize it.
PublicRestartable(MooseApp &moose_app, const std::string &name, const std::string &system_name, THREAD_ID tid, const bool read_only=false, const RestartableDataMapName &metaname="")
This class constructor is used for non-Moose-based objects like interfaces.
const T & getRestartableData(const std::string &data_name) const
Declare a piece of data as "restartable" and initialize it Similar to declareRestartableData but retu...