BaseFields.h
Go to the documentation of this file.
1 // This file is part of the MercuryDPM project (https://www.mercurydpm.org).
2 // Copyright (c), The MercuryDPM Developers Team. All rights reserved.
3 // License: BSD 3-Clause License; see the LICENSE file in the root directory.
4 
5 #ifndef BaseFields_H
6 #define BaseFields_H
7 
8 #include "CG/BaseCG.h"
9 #include "CG/CGHandler.h"
10 #include "BaseHandler.h"
11 #include "DPMBase.h"
12 
13 namespace CGFields
14 {
15 
22 {
23 public:
24 
25  void setCG(BaseCG* cg) { cg_=cg; }
27  {
28  logger.assert_debug(cg_, "BaseFields: BaseCG pointer is not set, please use setCG() before calling getCG()");
29  return cg_;
30  }
31 
32 protected:
33 
37  BaseCG* cg_ = nullptr;
38 };
39 
40 }
41 
42 #endif
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
Base class of all CG objects, needed to store the various CG objects in the CGHandler.
Definition: BaseCG.h:36
A Base class for the fields.
Definition: BaseFields.h:22
BaseCG * getCG()
Definition: BaseFields.h:26
BaseCG * cg_
Stores a pointer to the baseCG instance to get e.g. the handler and time information.
Definition: BaseFields.h:37
void setCG(BaseCG *cg)
Definition: BaseFields.h:25
Definition: BaseFields.h:14