Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Base.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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