Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSource.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_SOURCE__
21 #define __TY_SOURCE__
22 
24 
26 typedef std::map<int, LPTYSpectre> TYMapRegimeSpectre;
27 
31 class TYSource : public TYElement
32 {
35 
36  // Methodes
37 public:
41  TYSource();
45  TYSource(const TYSource& other);
49  virtual ~TYSource();
50 
52  TYSource& operator=(const TYSource& other);
54  bool operator==(const TYSource& other) const;
56  bool operator!=(const TYSource& other) const;
57 
66  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
67 
68  virtual std::string toString() const;
69 
70  virtual DOM_Element toXML(DOM_Element& domElement);
71  virtual int fromXML(DOM_Element domElement);
72 
76  virtual TYSpectre* getSpectre(int regime = -1) const
77  {
78  return _pSpectre._pObj;
79  }
80 
84  virtual TYSpectre* getCurrentSpectre() const
85  {
86  return _pSpectre._pObj;
87  }
88 
89  virtual void setSpectre(LPTYSpectre pSpectre)
90  {
91  _pSpectre = pSpectre;
92  }
93 
94  // Membres
95 protected:
97 };
98 
99 #endif // __TY_SOURCE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
std::map< int, LPTYSpectre > TYMapRegimeSpectre
Tableau associatif Regime/Spectre.
Definition: TYSource.h:26
T * _pObj
The real pointer, must derived IRefCount.
Definition: smartptr.h:307
virtual int fromXML(DOM_Element domElement)
Definition: TYSource.cpp:97
TYSource()
Definition: TYSource.cpp:25
virtual std::string toString() const
Definition: TYSource.cpp:85
virtual ~TYSource()
Definition: TYSource.cpp:38
TYSource & operator=(const TYSource &other)
Operateur =.
Definition: TYSource.cpp:40
virtual void setSpectre(LPTYSpectre pSpectre)
Definition: TYSource.h:89
virtual TYSpectre * getCurrentSpectre() const
Definition: TYSource.h:84
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYSource.cpp:71
virtual TYSpectre * getSpectre(int regime=-1) const
Definition: TYSource.h:76
bool operator!=(const TYSource &other) const
Operateur !=.
Definition: TYSource.cpp:66
LPTYSpectre _pSpectre
Definition: TYSource.h:96
bool operator==(const TYSource &other) const
Operateur ==.
Definition: TYSource.cpp:50
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYSource.cpp:90