Gyoto
GyotoPowerLawSpectrum.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011 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 __GyotoPowerLawSpectrum_H_
28 #define __GyotoPowerLawSpectrum_H_
29 #include <GyotoSpectrum.h>
30 
31 namespace Gyoto {
32  namespace Spectrum {
33  class PowerLaw;
34  }
35 }
36 
37 
46  friend class Gyoto::SmartPointer<Gyoto::Spectrum::PowerLaw>;
47  protected:
48  double constant_;
49  double exponent_;
50 
51  public:
52  PowerLaw();
53  PowerLaw(double exponent, double constant=1.);
54  // PowerLaw(const Spectrum &);
55  virtual PowerLaw * clone() const;
56 
57  double getConstant() const;
58  void setConstant(double);
59  double getExponent() const;
60  void setExponent(double);
61 
62  using Gyoto::Spectrum::Generic::operator();
63  virtual double operator()(double nu) const;
65 
66 #ifdef GYOTO_USE_XERCES
67 
73  virtual void fillElement(FactoryMessenger *fmp) const ;
75 #endif
76 };
77 
78 #ifdef GYOTO_USE_XERCES
79 namespace Gyoto {
80  namespace Spectrum {
82  PowerLawSubcontractor(Gyoto::FactoryMessenger* fmp = NULL);
83  void PowerLawInit();
84  }
85 }
86 #endif
87 #endif