CEPS  24.01
Cardiac ElectroPhysiology Simulator
HoldsGeomObject.hpp
Go to the documentation of this file.
1 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2  This file is part of CEPS.
3 
4  CEPS is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  CEPS is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with CEPS (see file LICENSE at root of project).
16  If not, see <https://www.gnu.org/licenses/>.
17 
18 
19  Copyright 2019-2024 Inria, Universite de Bordeaux
20 
21  Authors, in alphabetical order:
22 
23  Pierre-Elliott BECUE, Florian CARO, Yves COUDIERE(*), Andjela DAVIDOVIC,
24  Charlie DOUANLA-LONTSI, Marc FUENTES, Mehdi JUHOOR, Michael LEGUEBE(*),
25  Pauline MIGERDITICHAN, Valentin PANNETIER(*), Nejib ZEMZEMI.
26  * : currently active authors
27 
28 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
32 #pragma once
33 
35 
36 namespace ceps
37 {
39  template <class _GeomObject>
41  {
42 
43  public:
45  explicit HoldsGeomObject(_GeomObject* object=nullptr, CepsBool owned=false);
46 
48  HoldsGeomObject(const HoldsGeomObject&) = default;
49 
51  HoldsGeomObject(HoldsGeomObject&&) noexcept = default;
52 
54  virtual ~HoldsGeomObject();
55 
58  operator=(const HoldsGeomObject&) = default;
59 
62  operator=(HoldsGeomObject&&) noexcept = default;
63 
65  _GeomObject*
66  getGeomObject() const;
67 
69  _GeomObject*
70  getProperties() const;
71 
73  virtual void
74  setGeomObject(_GeomObject* object, CepsBool owned);
75 
77  void
78  reset();
79 
80 
81  protected:
82 
84  _GeomObject* m_gObject;
85 
86  };
87 
88 } // namespace ceps
89 
90 #include "common/abstract/HoldsGeomObject.tpp"
bool CepsBool
Booleans.
Definition: CepsTypes.hpp:124
For objects that have pointers to either a node or a cell.
CepsBool m_owned
Is the geom object owned by current CPU.
HoldsGeomObject(_GeomObject *object=nullptr, CepsBool owned=false)
Constructor with ID.
HoldsGeomObject(HoldsGeomObject &&) noexcept=default
Copy constructor.
_GeomObject * getProperties() const
Get the properties (in fact it's just the geom object)
virtual void setGeomObject(_GeomObject *object, CepsBool owned)
Set the geom object.
void reset()
Set the geom object pointer to nullptr.
HoldsGeomObject(const HoldsGeomObject &)=default
Copy constructor.
_GeomObject * m_gObject
Ptr to the object.
_GeomObject * getGeomObject() const
Get the geom object.
A namespace for all utility methods.