Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPointControl.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 __TY_POINTCONTROL__
17 #define __TY_POINTCONTROL__
18 
22 
32 {
36 
37  // Methodes
38 public:
45 
51  TYPointControl(const TYPoint& other);
52 
58  TYPointControl(const TYPointControl& other);
59 
65  virtual ~TYPointControl();
66 
70  TYPointControl& operator=(const TYPoint& other);
72  bool operator==(const TYPointControl& other) const;
74  bool operator!=(const TYPointControl& other) const;
75 
84  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
85 
86  virtual std::string toString() const;
87 
88  virtual DOM_Element toXML(DOM_Element& domElement);
89  virtual int fromXML(DOM_Element domElement);
90 
96  int getObject() const
97  {
98  return _object;
99  }
100 
105  void setObject(int object)
106  {
107  _object = object;
108  }
109 
114  void setHauteur(double hauteur)
115  {
116  _hauteur = hauteur;
117  setIsGeometryModified(true);
118  }
119 
125  double getHauteur() const
126  {
127  return _hauteur;
128  }
129 
134  enum
135  {
139  objectStar
140  };
141 
147  void toSIG();
148  void fromSIG();
149 
158  void setStatusSIG(const bool& statusSIG)
159  {
160  _statusSIG = statusSIG;
161  }
163  {
164  return _statusSIG;
165  }
166  const bool getStatusSIG() const
167  {
168  return _statusSIG;
169  }
170 
175  int getSIGType();
176 
177  virtual LPTYSpectre getSpectre();
178 
182  virtual void setEtat(const TYUUID& id_calc, bool etat);
183  virtual bool etat();
184  virtual bool etat(const TYUUID& id_calc);
185  virtual bool etat(const TYCalcul* pCalc);
186 
188  void copyEtats(TYPointControl* pOther);
189 
191  bool remEtat(TYCalcul* pCalcul);
192 
198  void duplicateEtat(const TYUUID& idCalculRef, const TYUUID& idCalculNew);
199 
201 
202  // Membres
203 protected:
206 
208  int _object;
209 
211  double _hauteur;
212 
215 };
216 
220 typedef std::vector<LPTYPointControl> TYTabLPPointControl;
221 
227 typedef std::vector<LPTYPointControlGeoNode> TYTabLPPointControlGeoNode;
228 
229 #endif // __TY_POINTCONTROL__
QDomElement DOM_Element
Definition: QT2DOM.h:30
class OGenID TYUUID
Definition: TYDefines.h:59
std::map< TYUUID, bool > TYMapIdBool
Tableau associant un booleen a un id (identifiant d'objet)
Definition: TYDefines.h:373
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
TYGeometryNode TYPointControlGeoNode
Noeud geometrique de type TYPointControl.
SmartPtr< TYPointControl > LPTYPointControl
Smart Pointer sur TYPointControl.
std::vector< LPTYPointControl > TYTabLPPointControl
Collection de Smart Pointer sur TYPointControl.
std::vector< LPTYPointControlGeoNode > TYTabLPPointControlGeoNode
Collection de noeuds geometriques de type TYPointControl.
SmartPtr< TYPointControlGeoNode > LPTYPointControlGeoNode
Smart Pointer sur TYPointControlGeoNode.
Calculation program.
Definition: TYCalcul.h:50
virtual void setIsGeometryModified(bool isModified)
Definition: TYElement.cpp:253
Classe de definition d'un point de calcul.C'est une classe derivee a TYPoint avec en plus un spectrep...
Definition: TYPointCalcul.h:33
Classe de definition d'un point de controle.Le point de controle est un point de calcul avec une haut...
void * getCompatibilityVector()
double getHauteur() const
Get de la hauteur de ce point par rapport au sol (a l'altimetrie en fait).
TYPointControl()
Constructeur par defaut. Constructeur par defaut de la classe TYPointControl.
bool remEtat(TYCalcul *pCalcul)
Remove calcul from "etat" map.
void copyEtats(TYPointControl *pOther)
Copie du map calcul-etat.
void duplicateEtat(const TYUUID &idCalculRef, const TYUUID &idCalculNew)
Duplique l'etat defini pour un calcul pour un autre calcul.
void setHauteur(double hauteur)
Set de la hauteur de ce point par rapport au sol (a l'altimetrie en fait).
bool operator==(const TYPointControl &other) const
Operateur ==.
int _object
shape of the point in GUI
int getSIGType()
Retourne le type de SIG.
bool operator!=(const TYPointControl &other) const
Operateur !=.
virtual LPTYSpectre getSpectre()
Get du spectre resultat d'un calcul donne.
TYPointControl & operator=(const TYPointControl &other)
Operateur =.
bool _statusSIG
Etat des coordonnees par rapport au SIG (position dans le repere SIG ou pas)
virtual DOM_Element toXML(DOM_Element &domElement)
void toSIG()
Conversion dans le repere du Systeme d'Information Geographique.
const bool getStatusSIG() const
int getObject() const
Set/Get de l'objet a afficher.
TYMapIdBool _tabEtats
L'etat du point pour un calcul donne.
virtual void setEtat(const TYUUID &id_calc, bool etat)
virtual ~TYPointControl()
Destructeur Destructeur de la classe TYPointControl .
void setObject(int object)
Set/Get de l'objet a afficher.
void setStatusSIG(const bool &statusSIG)
Get/Set du statut des coordonnees par rapport au SIG _statusSIG return value.
double _hauteur
La hauteur du point par rapport a l'altitude.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual std::string toString() const
Copie du map calcul-spectre.
virtual bool etat()
virtual int fromXML(DOM_Element domElement)