Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPointCalcul.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_POINTCALCUL__
21 #define __TY_POINTCALCUL__
22 
26 
32 class TYPointCalcul : public TYPoint
33 {
36 
37  // Methodes
38 public:
44  TYPointCalcul();
45 
51  TYPointCalcul(const TYPoint& other);
52 
58  TYPointCalcul(const TYPointCalcul& other);
59 
65  virtual ~TYPointCalcul();
66 
69 
71  TYPointCalcul& operator=(const TYPoint& other);
72 
74  bool operator==(const TYPointCalcul& other) const;
75 
77  bool operator!=(const TYPointCalcul& other) const;
78 
87  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
88 
90  // void copySpectres(TYPointCalcul* pOther);
91 
92  virtual std::string toString() const;
93 
94  virtual DOM_Element toXML(DOM_Element& domElement);
95 
96  virtual int fromXML(DOM_Element domElement);
97 
102  void setSpectre(const LPTYSpectre spectre)
103  {
104  _spectre = spectre;
105  }
106 
112  {
113  return _spectre;
114  };
115 
116  virtual bool etat()
117  {
118  return _etat;
119  }
120  virtual bool etat(const TYUUID& id_calc)
121  {
122  return _etat;
123  }
124  virtual bool etat(const TYCalcul* pCalc)
125  {
126  return _etat;
127  }
128  virtual void setEtat(const bool& etat)
129  {
130  _etat = etat;
131  };
132 
139  double getValA()
140  {
141  return _spectre->valGlobDBA();
142  }
143 
149  const double getValA() const
150  {
151  return _spectre->valGlobDBA();
152  }
153 
159  double getValLin()
160  {
161  return _spectre->valGlobDBLin();
162  }
163 
169  const double getValLin() const
170  {
171  return _spectre->valGlobDBLin();
172  }
173 
179 
186  {
189  };
190 
191  // Membres
192 protected:
194 
195 private:
196  bool _etat;
197 };
198 
204 typedef std::vector<LPTYPointCalculGeoNode> TYTabPointCalculGeoNode;
205 
206 #endif // __TY_POINTCALCUL__
QDomElement DOM_Element
Definition: QT2DOM.h:30
class OGenID TYUUID
Definition: TYDefines.h:59
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
TYGeometryNode TYPointCalculGeoNode
Noeud geometrique de type TYPointCalcul.
SmartPtr< TYPointCalculGeoNode > LPTYPointCalculGeoNode
Smart Pointer sur TYPointCalculGeoNode.
std::vector< LPTYPointCalculGeoNode > TYTabPointCalculGeoNode
Collection de noeuds geometriques de type TYPointCalcul.
double valGlobDBA() const
Compute the global value dB[A] of a one-third Octave spectrum.
Definition: spectre.cpp:683
double valGlobDBLin() const
Compute the global value dB[Lin] of a one-third Octave spectrum.
Definition: spectre.cpp:671
Calculation program.
Definition: TYCalcul.h:50
Classe de definition d'un point de calcul.C'est une classe derivee a TYPoint avec en plus un spectrep...
Definition: TYPointCalcul.h:33
virtual ~TYPointCalcul()
Destructeur Destructeur de la classe TYPointCalcul.
LPTYSpectre _spectre
const double getValLin() const
Get de la valeur globale Lin au point.
bool operator==(const TYPointCalcul &other) const
Operateur ==.
virtual bool etat(const TYCalcul *pCalc)
const double getValA() const
Get de la valeur globale A au point.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
double getValLin()
Get de la valeur globale Lin au point.
virtual bool etat(const TYUUID &id_calc)
TYPointCalcul & operator=(TYPointCalcul &other)
Operateur =.
virtual void setEtat(const bool &etat)
bool operator!=(const TYPointCalcul &other) const
Operateur !=.
virtual int fromXML(DOM_Element domElement)
PointCalculState
PointCalculState : Les differents etats possible pour un point de calcul. PointCalculState::Actif : L...
TYPointCalcul()
Constructeur par defaut Constructeur par defaut de la classe TYPointCalcul.
virtual std::string toString() const
Copie du map calcul-spectre.
virtual LPTYSpectre getSpectre()
Get du spectre resultat d'un calcul donne.
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool etat()
TYPoint getCoordSIG()
Passage en coordonnees SIG.
void setSpectre(const LPTYSpectre spectre)
Set du spectre resultat d'un calcul donne.
double getValA()
Get de la valeur globale A au point.