This file is indexed.

/usr/include/Gyoto/GyotoProperty.h is in libgyoto4-dev 1.0.2-2ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
/**
 * \file GyotoProperty.h
 * \brief Introspectable properties 
 */

/*
    Copyright 2014 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 __GyotoProperty_H_
#define __GyotoProperty_H_

#include "GyotoConfig.h"
#include <string>
#include <vector>

namespace Gyoto {
  class Object;
  class Property;
  namespace Metric { class Generic; }
  namespace Astrobj { class Generic; }
  namespace Spectrum { class Generic; }
  namespace Spectrometer { class Generic; }
  class Screen;
  template <class T> class SmartPointer;
}


/// Define a pair of accessors to scalar member (double, long, size_t)
/**
 * Accessors must also be declared in the class declaration, which can
 * be done using #GYOTO_OBJECT_SCALAR_ACCESSORS.
 */
#define GYOTO_PROPERTY_ACCESSORS(class, type, member, method)	\
  void class::method(type v) {member=v;}				\
  type class::method() const {return member;}

/// Define 4 accessors to double scalar member in geometrical units
/**
 * Accessors must also be declared in the class declaration, which can
 * be done using #GYOTO_OBJECT_ACCESSORS_UNIT.
 *
 * \param class class name
 * \param member member holding the value in geometrical unit
 * \param method name for accessors
 * \metric member or expression yielding metric (which defines the
 * geometrical unit)
 */
#define GYOTO_PROPERTY_ACCESSORS_GEOMETRICAL(class, member, method, metric) \
  GYOTO_PROPERTY_ACCESSORS(class, double, member, method)		\
  void class::method(double v, std::string const &u) {			\
    member=Units::ToGeometrical(v, u, metric);				\
  }									\
  double class::method(std::string const &u) const {			\
    return Units::FromGeometrical(member, u, metric);			\
  }

/// Start Property list
/**
 * \param class Class for which we are defining a Property list
 */
#define GYOTO_PROPERTY_START(class) \
  Property const class::properties[] = {

/// Define a new Property of type Bool
/*
 * Declares a static variable named "name". name and namef should not
 * be quoted.
 *
 * \param[in] class name
 * \param[in] name name of property if true;
 * \param[in] namef name of property if false;
 * \param[in] fname name of functions for setting or getting the property
 * \param[in] ancestor pointer to next Property instance
 */
#define GYOTO_PROPERTY_BOOL(class, name, namef, fname)			\
  Gyoto::Property							\
  (#name,								\
   #namef,								\
   (Gyoto::Property::set_bool_t)&class :: fname,			\
   (Gyoto::Property::get_bool_t)&class :: fname),

/// Define a Property of type Double
#define GYOTO_PROPERTY_DOUBLE(class, name, fname)		\
  Gyoto::Property						\
  (#name,							\
   (Gyoto::Property::set_double_t)&class::fname,		\
   (Gyoto::Property::get_double_t)&class::fname),

/// Define a Property of type Long
#define GYOTO_PROPERTY_LONG(class, name, fname)		\
  Gyoto::Property					\
  (#name,						\
   (Gyoto::Property::set_long_t)&class::fname,		\
   (Gyoto::Property::get_long_t)&class::fname),

/// Define a Property of type Long
#define GYOTO_PROPERTY_UNSIGNED_LONG(class, name, fname)	\
  Gyoto::Property						\
  (#name,							\
   (Gyoto::Property::set_unsigned_long_t)&class::fname,		\
   (Gyoto::Property::get_unsigned_long_t)&class::fname),

#if defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
# define GYOTO_PROPERTY_SIZE_T GYOTO_PROPERTY_UNSIGNED_LONG
#else
#define GYOTO_PROPERTY_SIZE_T(class, name, fname)	\
  Gyoto::Property						\
  (#name,							\
   (Gyoto::Property::set_size_t_t)&class::fname,		\
   (Gyoto::Property::get_size_t_t)&class::fname),
#endif

/// Define a Property of type Double supporting unit
#define GYOTO_PROPERTY_DOUBLE_UNIT(class, name, fname) \
  Gyoto::Property						\
  (#name,							\
   (Gyoto::Property::set_double_t)&class::fname,		\
   (Gyoto::Property::get_double_t)&class::fname,		\
   (Gyoto::Property::set_double_unit_t)&class::fname,		\
   (Gyoto::Property::get_double_unit_t)&class::fname),

/// Define a Property of type Filename
#define GYOTO_PROPERTY_FILENAME(class, name, fname)		\
  Gyoto::Property						\
  (#name,							\
   (Gyoto::Property::set_string_t)&class::fname,		\
   (Gyoto::Property::get_string_t)&class::fname,		\
   true),

/// Define a Property of type String
#define GYOTO_PROPERTY_STRING(class, name, fname)			\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_string_t)&class::fname,			\
   (Gyoto::Property::get_string_t)&class::fname,			\
   false),

/// Define a Property of type vector<double>
#define GYOTO_PROPERTY_VECTOR_DOUBLE(class, name, fname)		\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_vector_double_t)&class::fname,			\
   (Gyoto::Property::get_vector_double_t)&class::fname),

/// Define a Property of type vector<double> with unit support
#define GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT(class, name, fname)		\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_vector_double_t)&class::fname,			\
   (Gyoto::Property::get_vector_double_t)&class::fname,			\
   (Gyoto::Property::set_vector_double_unit_t)&class::fname,		\
   (Gyoto::Property::get_vector_double_unit_t)&class::fname),

/// Define a Property of type vector<unsigned long>
#define GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG(class, name, fname)		\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_vector_unsigned_long_t)&class::fname,		\
   (Gyoto::Property::get_vector_unsigned_long_t)&class::fname),

/// Define a Property of type Gyoto::Metric::Generic
#define GYOTO_PROPERTY_METRIC(class, name, fname)			\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_metric_t)&class::fname,			\
   (Gyoto::Property::get_metric_t)&class::fname),

/// Define a Property of type Gyoto::Screen
#define GYOTO_PROPERTY_SCREEN(class, name, fname)			\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_screen_t)&class::fname,			\
   (Gyoto::Property::get_screen_t)&class::fname),

/// Define a Property of type Gyoto::Astrobj::Generic
#define GYOTO_PROPERTY_ASTROBJ(class, name, fname)			\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_astrobj_t)&class::fname,			\
   (Gyoto::Property::get_astrobj_t)&class::fname),

/// Define a Property of type Gyoto::Spectrum::Generic
#define GYOTO_PROPERTY_SPECTRUM(class, name, fname)			\
  Gyoto::Property							\
    (#name,								\
     (Gyoto::Property::set_spectrum_t)&class::fname,			\
     (Gyoto::Property::get_spectrum_t)&class::fname),

/// Define a Property of type Gyoto::Spectrometer::Generic
#define GYOTO_PROPERTY_SPECTROMETER(class, name, fname)			\
  Gyoto::Property							\
  (#name,								\
   (Gyoto::Property::set_spectrometer_t)&class::fname,			\
   (Gyoto::Property::get_spectrometer_t)&class::fname),

/// Define class::properties and class::getProperties() 
#define GYOTO_PROPERTY_END(class, next)				\
  Property(next)};							\
  Gyoto::Property const * class::getProperties() const {		\
    return class::properties;						\
  }

/// Property that can be set and got using standard methods
/**
 * The Property API makes it easy to declare the parameters that can
 * be set in a class.
 *
 * Developpers who simply write classes (deriving from
 * Astrobj::Generic, , Metric::Generic, Spectrum::Generic) need not
 * know the inners of the Property class and interact with it only
 * using macros to declare the parameters they need to read from XML.
 *
 * To make use of the Property framework, a class
 * must derive from Gyoto::Object and use the #GYOTO_OBJECT in a
 * public section of the class declaration (i.e. in the .h
 * file). Then, in the corresponding .C file, the GYOTO_PROPERTY_*
 * macros are used as follows (note the absence of punctuation after
 * the macros):
 * \code
 * GYOTO_PROPERTY_START(MyClass)
 * GYOTO_PROPERTY_<type>(MyClass, PropertyName, accessor)
 * ...
 * GYOTO_PROPERTY_END(MyClass, ParentClass::properties)
 * \endcode
 *
 * In the above, #GYOTO_PROPERTY_START starts the definition of the
 * static member MyClass::properties. Each GYOTO_PROPERTY_<type> macro
 * declares a new property. #GYOTO_PROPERTY_END ends the definition of
 * the property list, with an optional pointer to the parent's class
 * Property list, and defines the MyClass::getProperties() method.
 *
 * The underlying accessors must always be defined, both to set and to
 * get the property. For the sake of simplicity, only a limited number
 * of data types are allowed:
 *   - double: see #GYOTO_PROPERTY_DOUBLE, #GYOTO_PROPERTY_DOUBLE_UNIT;
 *   - long: see #GYOTO_PROPERTY_LONG;
 *   - unsigned long: see #GYOTO_PROPERTY_UNSIGNED_LONG
 *     (a.k.a. size_t: see #GYOTO_PROPERTY_SIZE_T, this may break on
 *     architectures where size_t is not the same as unsigned long);
 *   - bool: see #GYOTO_PROPERTY_BOOL;
 *   - std::vector<double>: see #GYOTO_PROPERTY_VECTOR_DOUBLE
 *     and #GYOTO_PROPERTY_VECTOR_DOUBLE_UNIT;
 *   - std::vector<unsigned long>:
 *     see #GYOTO_PROPERTY_VECTOR_UNSIGNED_LONG;
 *   - Gyoto::SmartPointers to various base classes: Screen,
 *     Metric::Generic, Astrobj::Generic, Spectrum::Generic and
 *     Spectrometer::Generic. See #GYOTO_PROPERTY_METRIC,
 *     #GYOTO_PROPERTY_SCREEN, #GYOTO_PROPERTY_ASTROBJ,
 *     #GYOTO_PROPERTY_SPECTRUM and #GYOTO_PROPERTY_SPECTROMETER.
 *
 * For the floating point data-types (double and vector<double>), two
 * additional accessors supporting units can be provided. The
 * accessors must have the same name and have specific prototypes, see
 * the various function pointer typedefs, e.g. #set_double_t and
 * #get_double_t.
 *
 * The type used in these accessors may not be the same as the type of
 * the underlying class member. For instance, to read an array, it was
 * chosen to use the std::vector<type> type because it is easy to
 * read such a vector from XML and to thus determine dynamically the
 * number of elements provided. But this type is slow, so it is
 * expected that the class member will rather be a C-style array
 * (double arr[]) or something else entirely. It is not forbidden to
 * have a set of high-level accessors for the Property interface on
 * top of lower-level, more efficient accessors to be used in
 * compiled, static code:
 *
 * \code
 * void MyClass::arrayMember(double const * const tab) {
 *   for (int i=0; i<5; ++i) member_[i]=tab[i];
 * }
 * void MyClass::arrayMemberVector(std::vector<double> const &vect) {
 *   if (vect.size()!=5) throwError("Please provide 5 elements");
 *   for (int i=0; i<5; ++i) member_[i]=vect[i];
 * } 
 * double const *  MyClass::arrayMember() const {return member_;}
 * std::vector<double> MyClass::arrayMemberVector() const {
 *   std::vector<double> v(5, 0.);
 *   for (int i=0; i<5; ++i) v[i]=member_[i];
 *   return v;
 * }
 * \endcode
 *
 * In this example, assuming MyClass is based directly on Object and
 * member_ is the only parameter to read from XML, the Property list
 * may be defined as:
 * \code
 * GYOTO_PROPERTY_START(MyClass)
 * GYOTO_PROPERTY_VECTOR_DOUBLE(MyClass, ArrayMember, arrayMemberVector)
 * GYOTO_PROPERTY_END(MyClass, Object::properties)
 * \endcode
 *
 * Again, nothing more is required to read and write ArrayMember from
 * XML and from Yorick.
 */
class Gyoto::Property
{
 private:

 public:
  /// Possible type of a Property instance
  /**
   * These are all the values that Property::type may take.
   */
  enum type_e {
    /// Type is double
    double_t,
    /// Type is long
    long_t,
    /// Type is unsigned long (a.k.a. size_t)
    unsigned_long_t,
#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
    /// Type is size_t (only if distinct from unsigned long)
    size_t_t,
#endif
    /// Type is bool
    bool_t,
    /// Type is std::string
    string_t,
    /// Type is std::string and holds a file name
    /**
     * In this case, the value may be changed to include relative or
     * absolute path. The prefix "`pwd`/" forces path to be
     * interpreted relative to the current working directory. If the
     * value starts with "/", it is interpreted as an absolute
     * path. Otherwise, when reading from XML, the path is interpreted
     * relative to the XML file.
     */
    filename_t,
    /// Type is std::vector<double>
    vector_double_t,
    /// Type is std::vector<unsigned long>
    vector_unsigned_long_t,
    /// Type is Gyoto::SmartPointer<Gyoto::Metric::Generic>
    metric_t,
    /// Type is Gyoto::SmartPointer<Gyoto::Screen::Generic>
    screen_t,
    /// Type is Gyoto::SmartPointer<Gyoto::Astrobj::Generic>
    astrobj_t,
    /// Type is Gyoto::SmartPointer<Gyoto::Spectrum::Generic>
    spectrum_t,
    /// Type is Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>
    spectrometer_t,
    /// Property is empty
    /**
     * In this case (and only in this case):
     *  1. #Gyoto::Property::operator bool() const return false;
     *  2. Property::parent may be different from NULL and point to
     *     another array of Property instances, that should be
     *     interpreted as appended to this list.
     */
    empty_t};
  /// Name of this instance
  std::string name;
  /// Name if false
  /**
   * Only if #type is #empty_t
   */
  std::string name_false;
  /// Type of this instance
  int type;
  /// Prototype for an accessor to set a double
  typedef void (Object::* set_double_t)(double val);
  /// Prototype for an accessor to get a double
  typedef double (Object::* get_double_t)() const;
  /// Prototype for an accessor to set a double, with unit
  typedef void (Object::* set_double_unit_t)(double val,
					     std::string const &unit);
  /// Prototype for an accessor to get a double, with unit
  typedef double (Object::* get_double_unit_t)(std::string const &unit) const;
  /// Prototype for an accessor to set a long
  typedef void (Object::* set_long_t)(long val);
  /// Prototype for an accessor to get a long
  typedef long (Object::* get_long_t)() const;
  /// Prototype for an accessor to set an unsigned long
  typedef void (Object::* set_unsigned_long_t)(unsigned long val);
  /// Prototype for an accessor to get an unsigned long
  typedef unsigned long (Object::* get_unsigned_long_t)() const;
#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
  /// Prototype for an accessor to set a size_t
  typedef void (Object::* set_size_t_t)(size_t val);
  /// Prototype for an accessor to get a size_t
  typedef size_t (Object::* get_size_t_t)() const;
#endif
  /// Prototype for an accessor to set a bool
  typedef void (Object::* set_bool_t)(bool val);
  /// Prototype for an accessor to get a bool
  typedef bool (Object::* get_bool_t)() const;
  /// Prototype for an accessor to set a string
  typedef void (Object::* set_string_t)(std::string const&);
  /// Prototype for an accessor to get a string
  typedef std::string (Object::* get_string_t)() const;
  /// Prototype for an accessor to set a filename
  typedef void (Object::* set_fname_t)(std::string const&);
  /// Prototype for an accessor to get a filename
  typedef std::string (Object::* get_fname_t)() const;
  /// Prototype for an accessor to set a std::vector<double>
  typedef void (Object::* set_vector_double_t)(std::vector<double> const&);
  /// Prototype for an accessor to get a std::vector<double>
  typedef std::vector<double> (Object::* get_vector_double_t)() const;
  /// Prototype for an accessor to set a std::vector<double>, with unit
  typedef void (Object::* set_vector_double_unit_t)(std::vector<double> const&, std::string const &);
  /// Prototype for an accessor to get a std::vector<double>, with unit
  typedef std::vector<double> (Object::* get_vector_double_unit_t)(std::string const &) const;
  /// Prototype for an accessor to set a std::vector<unsigned long>
  typedef void (Object::* set_vector_unsigned_long_t)(std::vector<unsigned long> const&);
  /// Prototype for an accessor to get a std::vector<unsigned long>
  typedef std::vector<unsigned long> (Object::* get_vector_unsigned_long_t)() const;

  /// Prototype for an accessor to set a Gyoto::SmartPointer<Gyoto::Metric::Generic>
  typedef void (Object::* set_metric_t)
    (Gyoto::SmartPointer<Gyoto::Metric::Generic>);
  /// Prototype for an accessor to get a Gyoto::SmartPointer<Gyoto::Metric::Generic>
  typedef Gyoto::SmartPointer<Gyoto::Metric::Generic>
    (Object::* get_metric_t)() const;

  /// Prototype for an accessor to set a Gyoto::SmartPointer<Gyoto::Screen>
  typedef void (Object::* set_screen_t)
    (Gyoto::SmartPointer<Gyoto::Screen>);
  /// Prototype for an accessor to get a Gyoto::SmartPointer<Gyoto::Screen>
  typedef Gyoto::SmartPointer<Gyoto::Screen>
    (Object::* get_screen_t)() const;

  /// Prototype for an accessor to set a Gyoto::SmartPointer<Gyoto::Astrobj::Generic>
  typedef void (Object::* set_astrobj_t)
    (Gyoto::SmartPointer<Gyoto::Astrobj::Generic>);
  /// Prototype for an accessor to get a Gyoto::SmartPointer<Gyoto::Astrobj::Generic>
  typedef Gyoto::SmartPointer<Gyoto::Astrobj::Generic>
    (Object::* get_astrobj_t)() const;

  /// Prototype for an accessor to set a Gyoto::SmartPointer<Gyoto::Spectrum::Generic>
  typedef void (Object::* set_spectrum_t)
    (Gyoto::SmartPointer<Gyoto::Spectrum::Generic>);
  /// Prototype for an accessor to get a Gyoto::SmartPointer<Gyoto::Spectrum::Generic>
  typedef Gyoto::SmartPointer<Gyoto::Spectrum::Generic>
    (Object::* get_spectrum_t)() const;

  /// Prototype for an accessor to set a Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>
  typedef void (Object::* set_spectrometer_t)
    (Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>);
  /// Prototype for an accessor to get a Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>
  typedef Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>
    (Object::* get_spectrometer_t)() const;

  /// Union holding an accessor to set any type
  /**
   * Right type is stored in #type
   */
  union setter_t {
    set_double_t set_double;
    set_long_t set_long;
    set_unsigned_long_t set_unsigned_long;
#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
    set_size_t_t set_size_t;
#endif
    set_bool_t set_bool;
    set_string_t set_string;
    set_vector_double_t set_vdouble;
    set_vector_unsigned_long_t set_vulong;
    set_metric_t set_metric;
    set_screen_t set_screen;
    set_astrobj_t set_astrobj;
    set_spectrum_t set_spectrum;
    set_spectrometer_t set_spectrometer;
  };
  /// Union holding an accessor to get any type
  /**
   * Right type is stored in #type
   */
  union getter_t {
    get_double_t get_double;
    get_long_t get_long;
    get_unsigned_long_t get_unsigned_long;
#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
    get_size_t_t get_size_t;
#endif
    get_bool_t get_bool;
    get_string_t get_string;
    get_vector_double_t get_vdouble;
    get_vector_unsigned_long_t get_vulong;
    get_metric_t get_metric;
    get_screen_t get_screen;
    get_astrobj_t get_astrobj;
    get_spectrum_t get_spectrum;
    get_spectrometer_t get_spectrometer;
  };
  /// Union holding an accessor to set double or vector<double> with unit
  /**
   * Right type is stored in #type
   */
  union setter_unit_t {
    set_double_unit_t set_double;
    set_vector_double_unit_t set_vdouble;
  };
  /// Union holding an accessor to get double or vector<double> with unit
  union getter_unit_t {
    get_double_unit_t get_double;
    get_vector_double_unit_t get_vdouble;
  };

  /// Pointer to the setter method
  /**
   * Right type is stored in #type
   */
  setter_t setter;
  /// Pointer to the getter method
  /**
   * Right type is stored in #type
   */
  getter_t getter;
  /// Pointer to the setter (with unit) method
  /**
   * Right type is stored in #type
   */
  setter_unit_t setter_unit;
  /// Pointer to the getter (with unit) method
  /**
   * Right type is stored in #type
   */
  getter_unit_t getter_unit;

  /// True if #Gyoto::Property::type is not #Gyoto::Property::empty_t
  operator bool() const ;

  /// If #type is #empty_t, link to another Property list
  Property const * const  parent;
  
  /// Constructor for #type==#empty_t
  Property(Property const * const ancestor);

  /// Constructor for #type==#long_t
  Property(std::string name,
	   set_long_t set_long,
	   get_long_t get_long);

  /// Constructor for #type==#unsigned_long_t
  Property(std::string name,
	   set_unsigned_long_t set_unsigned_long,
	   get_unsigned_long_t get_unsigned_long);

#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
  /// Constructor for #type==#size_t_t
  Property(std::string name,
	   set_size_t_t set_size_t,
	   get_size_t_t get_size_t);
#endif

  /// Constructor for #type==#double_t, without unit support
  Property(std::string name,
	   set_double_t set_double,
	   get_double_t get_double);

  /// Constructor for #type==#double_t, with unit support
  Property(std::string name,
	   set_double_t set_double,
	   get_double_t get_double,
	   set_double_unit_t set_double_unit,
	   get_double_unit_t get_double_unit);

  /// Constructor for #type==#bool_t
  Property(std::string name,
	   std::string name_false,
	   set_bool_t set_bool,
	   get_bool_t get_bool);

  /// Constructor for #type==#string_t or #filename_t
  /**
   * \param name name of the Property
   * \param set_string pointer to the setter accessor
   * \param get_string pointer to the getter accessor
   * \param is_filename true means #type=#filename_t
   */
  Property(std::string name,
	   set_string_t set_string,
	   get_string_t get_string,
	   bool is_filename);

  /// Constructor for #type==#vector_double_t, without unit support
  Property(std::string name,
	   set_vector_double_t set_vdouble,
	   get_vector_double_t get_vdouble);

  /// Constructor for #type==#vector_double_t, with unit support
  Property(std::string name,
	   set_vector_double_t set_vdouble,
	   get_vector_double_t get_vdouble,
	   set_vector_double_unit_t set_vdouble_unit,
	   get_vector_double_unit_t get_vdouble_unit);

  /// Constructor for #type==#vector_unsigned_long_t
  Property(std::string name,
	   set_vector_unsigned_long_t set_vulong,
	   get_vector_unsigned_long_t get_vulong);

  /// Constructor for #type==#metric_t
  Property(std::string name,
	   set_metric_t set_metric,
	   get_metric_t get_metric);

  /// Constructor for #type==#screen_t
  Property(std::string name,
	   set_screen_t set_screen,
	   get_screen_t get_screen);

  /// Constructor for #type==#astrobj_t
  Property(std::string name,
	   set_astrobj_t set_astrobj,
	   get_astrobj_t get_astrobj);

  /// Constructor for #type==#spectrum_t
  Property(std::string name,
	   set_spectrum_t set_spectrum,
	   get_spectrum_t get_spectrum);

  /// Constructor for #type==#spectrometer_t
  Property(std::string name,
	   set_spectrometer_t set_spectrometer,
	   get_spectrometer_t get_spectrometer);

};

#endif