27 #ifndef __GyotoSpectrum_H_
28 #define __GyotoSpectrum_H_
34 class FactoryMessenger;
62 (FactoryMessenger* fmp) {
64 #ifdef GYOTO_USE_XERCES
65 sp -> setParameters(fmp);
131 Generic(const std::string kind);
137 const std::string
kind() const;
139 virtual double operator()(double nu) const =0;
148 virtual double operator()(double nu, double opacity, double ds) const;
159 virtual double
integrate(double nu1, double nu2) ;
172 virtual double
integrate(double nu1, double nu2,
173 const Spectrum::Generic * opacity, double ds) ;
180 #ifdef GYOTO_USE_XERCES
187 virtual void
fillElement(FactoryMessenger *fmp) const ;
const std::string kind() const
Get spectrum kind.
Pointers performing reference counting.
Definition: GyotoSmartPointer.h:51
void Register(std::string kind, Gyoto::Spectrum::Subcontractor_t *scp)
Make a Spectrum kind known to the Factory.
Reference-counting pointers.
Gyoto::SmartPointer< Gyoto::Spectrum::Generic > Subcontractor_t(Gyoto::FactoryMessenger *fmp)
A function to build instances of a specific Spectrum::Generic sub-class.
Definition: GyotoSpectrum.h:51
virtual void setParameter(std::string name, std::string content, std::string unit)
Set any parameter by its name.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:42
virtual void fillElement(FactoryMessenger *fmp) const
called from Factory
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:79
std::string kind_
e.g. constants, blackbody...
Definition: GyotoSpectrum.h:128
Register::Entry * Register_
The Spectrum register.
Spectrum emitted by an Astrobj.
Definition: GyotoSpectrum.h:125
void initRegister()
Empty the Spectrum register.
virtual Generic * clone() const
Cloner.
SmartPointer< Spectrum::Generic > Subcontractor(FactoryMessenger *fmp)
Subcontractor template.
Definition: GyotoSpectrum.h:62
virtual void setParameters(FactoryMessenger *fmp)
Main loop in Subcontractor_t function.
virtual double integrate(double nu1, double nu2)
Integrate optically thick I_nu.
Gyoto::Spectrum::Subcontractor_t * getSubcontractor(std::string name, int errmode=0)
Query the Spectrum register.
Entry in a register (or a full register)
Definition: GyotoRegister.h:92