Gyoto
GyotoComplexSpectrometer.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2013-2014, 2016, 2019 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 
28 #ifndef __GyotoComplexSpectrometer_H_
29 #define __GyotoComplexSpectrometer_H_
30 
31 #include <GyotoSpectrometer.h>
32 
33 namespace Gyoto{
34  namespace Spectrometer {
35  class Complex;
36  }
37 }
38 
69 {
71 
72  // Data :
73  // -----
74  protected:
75 
82 
86  Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> * elements_;
87 
88 
89  public:
92  Complex();
93  Complex(const Complex& ) ;
94 
108  virtual Complex* clone() const;
109 
114  virtual ~Complex() ;
115 
116  // Mutators
117  // --------
118  public:
127  void append(Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> element);
129  void remove(size_t i);
131  size_t getCardinal() const;
133 
134  virtual void tell(Gyoto::Hook::Teller *msg);
135 
136  public:
137 #ifdef GYOTO_USE_XERCES
138 
143  virtual void fillElement(FactoryMessenger *fmp) const ;
144 
153  virtual void setParameters(FactoryMessenger *fmp);
154 #endif
155 
156  // Outputs
157  // -------
158  public:
159 
170  Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> & operator[](size_t i) ;
172  Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> const & operator[](size_t i) const;
174 
185  static kind_t const Kind;
186 
187 
188  protected:
189 };
190 
191 #endif
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
size_t getCardinal() const
Get the number of elements in the array.
Complex spectrometer object.
Definition: GyotoComplexSpectrometer.h:66
virtual void tell(Gyoto::Hook::Teller *msg)
This is how a Teller tells.
#define GYOTO_OBJECT_THREAD_SAFETY
Declare virtual bool isThreadSafe() const.
Definition: GyotoObject.h:99
#define size_t
If not defined in <sys/types.h>.
Definition: GyotoConfig.h:424
Gyoto::SmartPointer< Gyoto::Spectrometer::Generic > * elements_
Actual array of SmartPointer<Spectrometer::Generic> objects.
Definition: GyotoComplexSpectrometer.h:86
char const * kind_t
Type for Spectrometer kind.
Definition: GyotoSpectrometer.h:71
void remove(size_t i)
Remove i-th element from the array.
Spectroscopic capabilities of a Screen.
Namespace for the Gyoto library.
Definition: GyotoAnsi.h:245
Pointers performing reference counting.
Definition: GyotoProperty.h:45
size_t cardinal_
Number of subspectrometers.
Definition: GyotoComplexSpectrometer.h:81
I might listen to a Teller.
Definition: GyotoHooks.h:64
virtual void setParameters(FactoryMessenger *fmp)
Main loop in the (templated) subcontractor.
virtual Complex * clone() const
Clone an instance.
virtual void fillElement(FactoryMessenger *fmp) const
Fill in the XML entity.
static kind_t const Kind
"Complex"
Definition: GyotoComplexSpectrometer.h:185
void append(Gyoto::SmartPointer< Gyoto::Spectrometer::Generic > element)
Add element at the end of the array.
Base class for spectrometers.
Definition: GyotoSpectrometer.h:189