Gyoto
GyotoComplexAstrobj.h
Go to the documentation of this file.
1 
8 /*
9  Copyright 2011 Thibaut Paumard, Frederic Vincent
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 __GyotoComplexAstrobj_H_
29 #define __GyotoComplexAstrobj_H_
30 
31 #include <GyotoAstrobj.h>
32 
33 namespace Gyoto{
34  namespace Astrobj {
35  class Complex;
36  }
37 }
38 
75  friend class Gyoto::SmartPointer<Gyoto::Astrobj::Complex>;
76 
77  // Data :
78  // -----
79  protected:
80 
84  size_t cardinal_;
85 
86  Gyoto::SmartPointer<Gyoto::Astrobj::Generic> * elements_;
87 
88  double step_max_;
89 
90  public:
91  Complex();
92  Complex(const Complex& ) ;
93  virtual Complex* clone() const;
94 
98  virtual ~Complex() ;
99 
100  // Mutators
101  // --------
102  public:
111  void append(Gyoto::SmartPointer<Gyoto::Astrobj::Generic> element);
113  void remove(size_t i);
115  size_t getCardinal() const;
117  void setMetric(SmartPointer<Metric::Generic> gg);
119 
120  public:
121 #ifdef GYOTO_USE_XERCES
122  virtual void fillElement(FactoryMessenger *fmp) const ;
123  virtual void setParameters(FactoryMessenger *fmp);
124 #endif
125 
126  // Outputs
127  // -------
128  public:
129 
146  virtual int Impact(Gyoto::Photon* ph, size_t index,
147  Astrobj::Properties *data=NULL) ;
149 
150 
161  Gyoto::SmartPointer<Gyoto::Astrobj::Generic> operator[](size_t i) ;
163  Gyoto::SmartPointer<Gyoto::Astrobj::Generic> const operator[](size_t i) const;
165 
166  protected:
167 };
168 
169 #endif