GyotoValue.h
Go to the documentation of this file.
/*
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 __GyotoValue_H_
#define __GyotoValue_H_
#include "GyotoConfig.h"
#include "GyotoSmartPointer.h"
#include <string>
#include <vector>
namespace Gyoto {
class Value;
namespace Metric {class Generic;}
namespace Astrobj {class Generic;}
namespace Spectrum {class Generic;}
namespace Spectrometer {class Generic;}
class Screen;
}
class Gyoto::Value {
public:
Value();
~Value();
Value& operator=(Value const&);
int type;
private:
double Double;
public:
Value(double);
operator double() const;
private:
bool Bool;
public:
Value(bool);
operator bool() const;
private:
long Long;
public:
Value(long);
operator long() const;
private:
unsigned long ULong;
public:
Value(unsigned long);
operator unsigned long() const;
private:
size_t SizeT;
public:
#if !defined(GYOTO_SIZE__T_IS_UNSIGNED_LONG)
Value(size_t);
operator size_t() const;
#endif
private:
std::string String;
public:
Value(std::string);
operator std::string() const;
private:
std::vector<double> VDouble;
public:
Value(std::vector<double>);
operator std::vector<double>() const;
private:
std::vector<unsigned long> VULong;
public:
Value(std::vector<unsigned long>);
operator std::vector<unsigned long>() const;
private:
Gyoto::SmartPointer<Gyoto::Metric::Generic> Metric;
public:
Value(Gyoto::SmartPointer<Gyoto::Metric::Generic>);
operator Gyoto::SmartPointer<Gyoto::Metric::Generic>() const;
private:
Gyoto::SmartPointer<Gyoto::Astrobj::Generic> Astrobj;
public:
Value(Gyoto::SmartPointer<Gyoto::Astrobj::Generic>);
operator Gyoto::SmartPointer<Gyoto::Astrobj::Generic>() const;
private:
Gyoto::SmartPointer<Gyoto::Spectrum::Generic> Spectrum;
public:
Value(Gyoto::SmartPointer<Gyoto::Spectrum::Generic>);
operator Gyoto::SmartPointer<Gyoto::Spectrum::Generic>() const;
private:
Gyoto::SmartPointer<Gyoto::Spectrometer::Generic> Spectrometer;
public:
Value(Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>);
operator Gyoto::SmartPointer<Gyoto::Spectrometer::Generic>() const;
private:
Gyoto::SmartPointer<Gyoto::Screen> Screen;
public:
Value(Gyoto::SmartPointer<Gyoto::Screen>);
operator Gyoto::SmartPointer<Gyoto::Screen>() const;
};
#endif
GyotoConfig.h
Compile-time configuration.
size_t
#define size_t
If not defined in <sys/types.h>.
Definition GyotoConfig.h:390
GyotoSmartPointer.h
Reference-counting pointers.
Gyoto::Astrobj::Generic
Base class for astronomical object.
Definition GyotoAstrobj.h:200
Gyoto::Metric::Generic
Base class for metrics.
Definition GyotoMetric.h:162
Gyoto::Screen
The camera with which the Astrobj is observed.
Definition GyotoScreen.h:176
Gyoto::SmartPointer
Pointers performing reference counting.
Definition GyotoSmartPointer.h:135
Gyoto::Spectrometer::Generic
Base class for spectrometers.
Definition GyotoSpectrometer.h:186
Gyoto::Spectrum::Generic
Spectrum emitted by an Astrobj.
Definition GyotoSpectrum.h:137
Gyoto::Value
Container for the value of a Property.
Definition GyotoValue.h:60
Gyoto::Value::type
int type
Type of this instance.
Definition GyotoValue.h:72
Gyoto::Value::Value
Value(long)
Construct/cast from long.
Gyoto::Value::Spectrometer
Gyoto::SmartPointer< Gyoto::Spectrometer::Generic > Spectrometer
A Spectrometer object.
Definition GyotoValue.h:177
Gyoto::Value::Value
Value(Gyoto::SmartPointer< Gyoto::Metric::Generic >)
Cast from Metric object.
Gyoto::Value::Value
Value(std::string)
Construct/cast from string.
Gyoto::Value::Spectrum
Gyoto::SmartPointer< Gyoto::Spectrum::Generic > Spectrum
A Spectrum object.
Definition GyotoValue.h:168
Gyoto::Value::Value
Value(unsigned long)
Construct/cast from unsigned long.
Gyoto::Value::SizeT
size_t SizeT
A size_t (only if distinct from unsigned long).
Definition GyotoValue.h:112
Gyoto::Value::Value
Value()
Constructor.
Gyoto::Value::Value
Value(double)
Construct/cast from double.
Gyoto::Value::Value
Value(Gyoto::SmartPointer< Gyoto::Screen >)
Cast from Screen.
Gyoto::Value::Metric
Gyoto::SmartPointer< Gyoto::Metric::Generic > Metric
A Metric object.
Definition GyotoValue.h:150
Gyoto::Value::Double
double Double
A double value.
Definition GyotoValue.h:76
Gyoto::Value::Screen
Gyoto::SmartPointer< Gyoto::Screen > Screen
A Screen object.
Definition GyotoValue.h:186
Gyoto::Value::String
std::string String
A string value.
Definition GyotoValue.h:123
Gyoto::Value::operator=
Value & operator=(Value const &)
Assignement operator.
Gyoto::Value::Value
Value(bool)
Construct/cast from boolean.
Gyoto::Value::Value
Value(std::vector< double >)
Construct/cast from vector of doubles.
Gyoto::Value::Value
Value(Gyoto::SmartPointer< Gyoto::Spectrum::Generic >)
Cast from Spectrum.
Gyoto::Value::Value
Value(Gyoto::SmartPointer< Gyoto::Spectrometer::Generic >)
Cast from Spectrometer.
Gyoto::Value::Astrobj
Gyoto::SmartPointer< Gyoto::Astrobj::Generic > Astrobj
An Astrobj Object.
Definition GyotoValue.h:159
Gyoto::Value::Value
Value(std::vector< unsigned long >)
Construct/cast from vector of unsigned long values.
Gyoto::Value::Long
long Long
A long value.
Definition GyotoValue.h:94
Gyoto::Value::~Value
~Value()
Destructor.
Gyoto::Value::Value
Value(Gyoto::SmartPointer< Gyoto::Astrobj::Generic >)
Cast from Astrobj.
Gyoto::Value::VULong
std::vector< unsigned long > VULong
A vector of unsigned long values.
Definition GyotoValue.h:141
Gyoto::Value::VDouble
std::vector< double > VDouble
A vector of double values.
Definition GyotoValue.h:132
Gyoto::Value::ULong
unsigned long ULong
An unsigned long (a.k.a. size_t).
Definition GyotoValue.h:103
Gyoto::Value::Bool
bool Bool
A boolean value.
Definition GyotoValue.h:85
Gyoto::Astrobj
Access to astronomical objects.
Definition GyotoAstrobj.h:49
Gyoto::Metric
Access to metrics.
Definition GyotoAstrobj.h:47
Gyoto::Spectrometer
Access to spectrometers.
Definition GyotoComplexSpectrometer.h:34
Gyoto::Spectrum
Spectrum of a simple object (e.g. a Gyoto::Astrobj::Star).
Definition GyotoBlackBodySpectrum.h:35
Gyoto
Namespace for the Gyoto library.
Definition GyotoAstrobj.h:44