81#ifndef __GyotoConverters_H_
82#define __GyotoConverters_H_
142 ut_system * getSystem();
177 double ToMeters(
double value,
const std::string &unit,
364 double ToHerz(
double value,
const std::string &unit);
379 double FromHerz(
double value,
const std::string &unit);
397 bool areConvertible(
const Unit &unit1,
const Unit &unit2);
405 friend class Gyoto::Units::Converter;
418 Unit(const std::string &unit);
428 Unit(char const * const unit);
445 double To (double val, const Unit &from_unit);
455 double From (double val, const Unit &to_unit);
462 operator std::string() const ;
469 operator ut_unit*() const ;
475 cv_converter * converter_;
479 Converter(const Gyoto::Units::Unit& from,
480 const Gyoto::Units::Unit& to);
486 void reset(const Gyoto::Units::Unit& from,
487 const Gyoto::Units::Unit& to);
503 double operator()(double value) const ;
Reference-counting pointers.
Can be pointed to by a SmartPointer.
Definition: GyotoSmartPointer.h:81
double FromSeconds(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg=NULL)
Convert to arbitrary time unit from seconds.
double ToGeometricalTime(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg)
Convert from arbitrary time unit to geometrical units.
double ToGeometrical(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg)
Convert from arbitrary length unit to geometrical units.
double FromKilograms(double value, const std::string &unit)
Convert to arbitrary mass unit from kilograms.
double FromGeometricalTime(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg)
Convert to arbitrary time unit from geometrical units.
double FromGeometrical(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg)
Convert to arbitrary length unit from geometrical units.
double FromHerz(double value, const std::string &unit)
Convert to arbitrary frequency unit from Herz.
double ToSeconds(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg=NULL)
Convert from arbitrary time unit to seconds.
double ToMeters(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg=NULL)
Convert from arbitrary length unit to meters.
double FromMeters(double value, const std::string &unit, const Gyoto::SmartPointer< Gyoto::Metric::Generic > &gg=NULL)
Convert to arbitrary length unit from meters.
double ToKilograms(double value, const std::string &unit)
Convert from arbitrary mass unit to kilograms.
void Init()
Load and initialize all (non-context-sensitive) units.
double ToHerz(double value, const std::string &unit)
Convert from arbitrary frequency unit to Herz.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43