Gyoto
GyotoSpectrum.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011-2012 Thibaut Paumard
10 
11  This file is part of Gyoto.
12 
13  Gyoto is free software: you can redistribute it and/or modify
14  it under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  Gyoto is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
25  */
26 
27 #ifndef __GyotoSpectrum_H_
28 #define __GyotoSpectrum_H_
29 
30 #include <GyotoRegister.h>
31 
32 namespace Gyoto{
33  class FactoryMessenger;
34  namespace Spectrum {
35  class Generic;
38  void Register(std::string, Gyoto::Spectrum::Subcontractor_t*);
40  extern Register::Entry* Register_;
41  void initRegister();
42  }
43 }
44 
45 #include <GyotoSmartPointer.h>
46 #include <string>
55  friend class Gyoto::SmartPointer<Gyoto::Spectrum::Generic>;
56  protected:
57  std::string kind_;
58 
59  public:
60  Generic(const std::string kind);
61  // Spectrum::Generic(const Spectrum::Generic &); ///< Copy constructor. Default is fine.
62  virtual Generic * clone() const;
63 
64  const std::string getKind() const;
65 
66  virtual double operator()(double nu) const =0;
68 
75  virtual double operator()(double nu, double opacity, double ds) const;
77 
78  virtual double integrate(double nu1, double nu2) ;
79  virtual double integrate(double nu1, double nu2,
80  const Spectrum::Generic * opacity, double ds) ;
81 
82 #ifdef GYOTO_USE_XERCES
83 
89  virtual void fillElement(FactoryMessenger *fmp) const ;
91  virtual void setParameter(std::string name, std::string content) ;
93 
94 #endif
95 };
96 
97 
98 #endif