Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Base.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) 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  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef BASE_H
17 #define BASE_H
18 
19 #include <string>
20 
24 class Base
25 {
26 
27 public:
29  Base()
30  {
31  name = "unkown element";
32  }
34  Base(const Base& other)
35  {
36  name = other.name;
37  }
39  virtual ~Base() {}
41  std::string getName()
42  {
43  return name;
44  }
46  void setName(const std::string& _name)
47  {
48  name = _name;
49  }
50 
51 protected:
52  std::string name;
53 };
54 
55 #endif
Base class of Event, Material, PostFilter, Ray, Repere, Scene, Shape, Simulation, Source.
Definition: Base.h:25
void setName(const std::string &_name)
Set the name of the object.
Definition: Base.h:46
Base()
Default constructor.
Definition: Base.h:29
Base(const Base &other)
Copy constructor.
Definition: Base.h:34
std::string name
Each instantiated object may be named.
Definition: Base.h:52
virtual ~Base()
Destructor.
Definition: Base.h:39
std::string getName()
Get the name of the object.
Definition: Base.h:41