Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPoint.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_POINT__
21 #define __TY_POINT__
22 
24 // #include "Tympan/models/business/TYColorInterface.h"
25 
29 // class TYPoint: public TYElement, public TYColorInterface, public OPoint3D
30 class TYPoint : public TYElement, public OPoint3D
31 {
34 
35  // Methodes
36 public:
40  TYPoint(bool PutInInstanceList = false);
44  TYPoint(const TYPoint& other, bool PutInInstanceList = false);
48  TYPoint(const OCoord3D& other, bool PutInInstanceList = false);
52  TYPoint(const OVector3D& other, bool PutInInstanceList = false);
56  TYPoint(double x, double y, double z, bool PutInInstanceList = false);
57 
61  virtual ~TYPoint();
62 
64  TYPoint& operator=(const TYPoint& other);
66  bool operator==(const TYPoint& other) const;
68  bool operator!=(const TYPoint& other) const;
69 
71  bool isEqual(const TYPoint& point) const;
72 
81  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
82 
83  virtual std::string toString() const;
84 
85  virtual DOM_Element toXML(DOM_Element& domElement);
86  virtual int fromXML(DOM_Element domElement);
87 
92  {
93  return dynamic_cast<OPoint3D*>(this);
94  }
95 };
96 
97 #endif // __TY_POINT__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
The 3D coordinate class.
Definition: 3d.h:226
The 3D point class.
Definition: 3d.h:487
The 3D vector class.
Definition: 3d.h:298
virtual ~TYPoint()
Definition: TYPoint.cpp:52
virtual std::string toString() const
Definition: TYPoint.cpp:106
bool operator!=(const TYPoint &other) const
Operateur !=.
Definition: TYPoint.cpp:82
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYPoint.cpp:112
OPoint3D * downcast_opoint()
return TYPoint casted as OPoint3D
Definition: TYPoint.h:91
TYPoint & operator=(const TYPoint &other)
Operateur =.
Definition: TYPoint.cpp:54
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYPoint.cpp:92
bool isEqual(const TYPoint &point) const
Tests equality using only coordiantes.
Definition: TYPoint.cpp:87
bool operator==(const TYPoint &other) const
Operateur ==.
Definition: TYPoint.cpp:65
virtual int fromXML(DOM_Element domElement)
Definition: TYPoint.cpp:131
TYPoint(bool PutInInstanceList=false)
Definition: TYPoint.cpp:30