/usr/include/Gyoto/GyotoUtils.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 | /**
* \file GyotoUtils.h
* \brief GYOTO utilities
*
* Various utilities
*/
/*
Copyright 2011 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 __GyotoUtils_H_
#define __GyotoUtils_H_
#include "GyotoDefs.h"
#include <string>
namespace Gyoto {
/// Set debug mode
/**
* \param mode 1 to turn on debug mode, 0 to turn it off.
*/
void debug(int mode);
/// Get debug mode
/**
* \return >=1 if debug mode is on, else 0.
*/
int debug();
/// Set verbosity level
/**
* See standard verbosity levels defined in GyotoDefs.h:
*
* - GYOTO_DEFAULT_DEBUG_MODE
* - GYOTO_QUIET_VERBOSITY
* - GYOTO_SEVERE_VERBOSITY
* - GYOTO_WARNING_VERBOSITY
* - GYOTO_DEFAULT_VERBOSITY
* - GYOTO_INFO_VERBOSITY
* - GYOTO_DEBUG_VERBOSITY
*/
void verbose(int mode);
/// Get verbosity level
/**
* See verbose(int mode).
*/
int verbose();
/// Convert lengths (deprecated)
/**
* \deprecated Will be removed once it is not used anymore in Gyoto
* per se. Prefer Gyoto::Units framework.
*
* \param[in,out] x Lengths to convert, in geometrical units on
* input, in specified unit on output.
* \param[in] nelem Size of x array.
* \param[in] mass_sun Black-hole mass in Solar masses.
* \param[in] distance_kpc Distance from observer in kiloparsecs.
* \param[in] unit One of "geometrical", "m", "km", "sun radius",
* "rad", "degree", "arcmin", "arcsec", "mas", "uas".
*/
void convert(double * const x, const std::size_t nelem,
const double mass_sun, const double distance_kpc,
const std::string unit);
/// Interpret C string as double
/**
* Wrapper around std::atof() that also interprets DBL_MIN, DBL_MAX,
* -DBL_MIN and -DBL_MAX.
*
* If str starts with "(-)DBL_M" and is not one of the four special
* values, then an error is thrown.
*
* \param[in] str C string to interpret
* \return double valu represented by str.
*/
double atof(const char * str);
}
#endif
|