Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAttenuateur.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 /*
17  *
18  */
19 
20 #ifndef __TY_ATTENUATEUR__
21 #define __TY_ATTENUATEUR__
22 
24 #include "TYSpectre.h"
25 
29 class TYAttenuateur : public TYElement
30 {
33 
34  // Methodes
35 public:
39  TYAttenuateur();
40 
44  TYAttenuateur(const TYAttenuateur& other);
45 
49  virtual ~TYAttenuateur();
50 
52  TYAttenuateur& operator=(const TYAttenuateur& other);
53 
55  bool operator==(const TYAttenuateur& other) const;
56 
58  bool operator!=(const TYAttenuateur& other) const;
59 
73  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
74 
75  virtual std::string toString() const;
76 
77  virtual DOM_Element toXML(DOM_Element& domElement);
78  virtual int fromXML(DOM_Element domElement);
79 
83  int getType() const
84  {
85  return _type;
86  }
87 
91  void setType(int type)
92  {
93  _type = type;
94  }
95 
100  {
101  return _spectreAtt;
102  }
103 
107  const TYSpectre& getSpectreAtt() const
108  {
109  return _spectreAtt;
110  }
111 
115  void setSpectreAtt(const TYSpectre& att)
116  {
117  _spectreAtt = att;
118  _spectreAtt.setParent(this);
119  }
120 
121  // Membres
122 protected:
124  int _type;
125 
128 };
129 
130 #endif // __TY_ATTENUATEUR__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
void setSpectreAtt(const TYSpectre &att)
bool operator==(const TYAttenuateur &other) const
Operateur ==.
TYAttenuateur & operator=(const TYAttenuateur &other)
Operateur =.
bool operator!=(const TYAttenuateur &other) const
Operateur !=.
void setType(int type)
Definition: TYAttenuateur.h:91
virtual std::string toString() const
const TYSpectre & getSpectreAtt() const
TYSpectre _spectreAtt
Spectre d'attenuation.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual int fromXML(DOM_Element domElement)
int getType() const
Definition: TYAttenuateur.h:83
TYSpectre & getSpectreAtt()
Definition: TYAttenuateur.h:99
virtual DOM_Element toXML(DOM_Element &domElement)
virtual ~TYAttenuateur()
int _type
Type d'attenuateur.
void setParent(TYElement *pParent)
Definition: TYElement.h:692