Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYMateriauConstruction.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  *
21  */
22 
23 #ifndef __TY_MATERIAUCONSTRUCTION__
24 #define __TY_MATERIAUCONSTRUCTION__
25 
28 
30 {
33 
34  // Methodes
35 public:
47  virtual ~TYMateriauConstruction();
48 
52  bool operator==(const TYMateriauConstruction& other) const;
54  bool operator!=(const TYMateriauConstruction& other) const;
55 
64  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
65 
66  virtual std::string toString() const;
67 
68  virtual DOM_Element toXML(DOM_Element& domElement);
69  virtual int fromXML(DOM_Element domElement);
70 
74  double getMasseVol() const
75  {
76  return _masseVol;
77  }
81  void setMasseVol(double mv)
82  {
83  _masseVol = mv;
84  }
85 
90  {
91  return _spectreTransm;
92  }
96  const TYSpectre& getSpectreTransm() const
97  {
98  return _spectreTransm;
99  }
103  void setSpectreTransm(const TYSpectre& transm)
104  {
105  _spectreTransm = transm;
107  }
108 
113  {
114  return _spectreAbso;
115  }
119  const TYSpectre& getSpectreAbso() const
120  {
121  return _spectreAbso;
122  }
123 
127  void setSpectreAbso(const TYSpectre& abso)
128  {
129  _spectreAbso = abso;
130  _spectreAbso.setParent(this);
131  }
132 
133 private:
134  static void InitializeSpectralDatas();
136  static TYSpectre _getDefSpectreAbso();
139 
140  // Membres
141 protected:
143  double _masseVol;
148 
150  static TYSpectre* getDefSpectreTrans();
152  static TYSpectre* getDefSpectreAbso();
153 };
154 
155 #endif // __TY_MATERIAUCONSTRUCTION__
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 setParent(TYElement *pParent)
Definition: TYElement.h:692
void setSpectreAbso(const TYSpectre &abso)
static TYSpectre * getDefSpectreAbso()
Spectre de Absortion par defaut.
static TYSpectre * _defSpectreTrans
TYSpectre _spectreTransm
Spectre de transmission.
TYMateriauConstruction & operator=(const TYMateriauConstruction &other)
Operateur =.
TYSpectre _spectreAbso
Spectre d'absorption.
static void InitializeSpectralDatas()
static TYSpectre * _defSpectreAbso
virtual std::string toString() const
bool operator==(const TYMateriauConstruction &other) const
Operateur ==.
static TYSpectre _getDefSpectreTrans()
static TYSpectre _getDefSpectreAbso()
void setSpectreTransm(const TYSpectre &transm)
double _masseVol
Masse Volumique.
static TYSpectre * getDefSpectreTrans()
Spectre de transmission par defaut.
const TYSpectre & getSpectreTransm() const
const TYSpectre & getSpectreAbso() const
bool operator!=(const TYMateriauConstruction &other) const
Operateur !=.
virtual int fromXML(DOM_Element domElement)
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)