GyotoComplexSpectrometer.h
Go to the documentation of this file.
/*
Copyright 2013-2014, 2016, 2019 Thibaut Paumard
This file is part of Gyoto.
Gyoto is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Gyoto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Gyoto. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GyotoComplexSpectrometer_H_
#define __GyotoComplexSpectrometer_H_
#include <GyotoSpectrometer.h>
namespace Gyoto{
namespace Spectrometer {
class Complex;
}
}
class Gyoto::Spectrometer::Complex
: public Gyoto::Spectrometer::Generic,
public Gyoto::Hook::Listener
{
friend class Gyoto::SmartPointer<Gyoto::Spectrometer::Complex>;
// Data :
// -----
protected:
size_t cardinal_;
Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> * elements_;
public:
GYOTO_OBJECT_THREAD_SAFETY;
Complex();
Complex(const Complex& ) ;
virtual Complex* clone() const;
virtual ~Complex() ;
// Mutators
// --------
public:
void append(Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> element);
void remove(size_t i);
size_t getCardinal() const;
virtual void tell(Gyoto::Hook::Teller *msg);
public:
#ifdef GYOTO_USE_XERCES
virtual void fillElement(FactoryMessenger *fmp) const ;
virtual void setParameters(FactoryMessenger *fmp);
#endif
// Outputs
// -------
public:
Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> & operator[](size_t i) ;
Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> const & operator[](size_t i) const;
static kind_t const Kind;
protected:
};
#endif
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GyotoSpectrometer.h
Spectroscopic capabilities of a Screen.
Gyoto::Hook::Listener
I might listen to a Teller.
Definition GyotoHooks.h:64
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Spectrometer::Complex
Complex spectrometer object.
Definition GyotoComplexSpectrometer.h:69
Gyoto::Spectrometer::Complex::setParameters
virtual void setParameters(FactoryMessenger *fmp)
Main loop in the (templated) subcontractor.
Gyoto::Spectrometer::Complex::fillElement
virtual void fillElement(FactoryMessenger *fmp) const
Fill in the XML entity.
Gyoto::Spectrometer::Complex::elements_
Gyoto::SmartPointer< Gyoto::Spectrometer::Generic > * elements_
Actual array of SmartPointer<Spectrometer::Generic> objects.
Definition GyotoComplexSpectrometer.h:86
Gyoto::Spectrometer::Complex::append
void append(Gyoto::SmartPointer< Gyoto::Spectrometer::Generic > element)
Add element at the end of the array.
Gyoto::Spectrometer::Complex::remove
void remove(size_t i)
Remove i-th element from the array.
Gyoto::Spectrometer::Complex::cardinal_
size_t cardinal_
Number of subspectrometers.
Definition GyotoComplexSpectrometer.h:81
Gyoto::Spectrometer::Complex::clone
virtual Complex * clone() const
Clone an instance.
Gyoto::Spectrometer::Complex::tell
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
Gyoto::Spectrometer::Complex::Complex
Complex()
Default constructor.
Gyoto::Spectrometer::Complex::Kind
static kind_t const Kind
"Complex"
Definition GyotoComplexSpectrometer.h:184
Gyoto::Spectrometer::Complex::getCardinal
size_t getCardinal() const
Get the number of elements in the array.
Gyoto::Spectrometer::Generic
Base class for spectrometers.
Definition GyotoSpectrometer.h:186
Gyoto::Spectrometer
Access to spectrometers.
Definition GyotoComplexSpectrometer.h:34
Gyoto::Spectrometer::kind_t
char const * kind_t
Type for Spectrometer kind.
Definition GyotoSpectrometer.h:85
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44