scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
|
#include <cstdint>
#include <string>
Go to the source code of this file.
Classes | |
class | scifir::aid |
Class that stores astronomical ids, not as an integer but with an string as identifier. Initialization string example: "(P) universe:milky-way:solar-system:earth". More... | |
Namespaces | |
namespace | scifir |
The namespace scifir contains all scifir-units, excepting the string literals, which are outside. | |
Enumerations | |
enum class | scifir::astronomical_body : int8_t { scifir::NONE , scifir::MILKY_WAY , scifir::ANDROMEDA , scifir::SOLAR_SYSTEM , scifir::SUN , scifir::MOON , scifir::MERCURY , scifir::VENUS , scifir::EARTH , scifir::MARS , scifir::JUPITER , scifir::SATURN , scifir::URANUS , scifir::NEPTUNE , scifir::CERES , scifir::ORCUS , scifir::PLUTO , scifir::HAUMEA , scifir::QUAOAR , scifir::MAKEMAKE , scifir::GONGGONG , scifir::ERIS , scifir::SEDNA , scifir::IO , scifir::EUROPA , scifir::GANYMEDE , scifir::CALLISTO , scifir::MIMAS , scifir::ENCELADUS , scifir::TETHYS , scifir::DIONE , scifir::RHEA , scifir::TITAN , scifir::IAPETUS , scifir::MIRANDA , scifir::ARIEL , scifir::UMBRIEL , scifir::TITANIA , scifir::OBERON , scifir::TRITON , scifir::CHARON , scifir::DYSNOMIA } |
Contains predefined astronomical bodies to be set automatically in the aid class. All of them are important astronomical bodies, unimportant astronomical bodies aren't included. More... | |
Functions | |
string | scifir::to_string (const aid &x) |
Creates a string representation of aid, it's for aid equivalent to the display() function of aid. | |
string | scifir::to_string (const aid::type &x) |
Converts a value of the enum aid::type to its string representation, which can be a single or a pair of letters. The value UNIVERSE returns U. The value GALAXY returns G. The value SOLAR_SYSTEM returns SS. The value PLANET returns P. The value STAR returns ST. The value ASTEROID returns A. The value MOON returns MN. The value METEOR returns MT. The value NONE returns an empty string. | |
aid::type | scifir::create_astronomical_type (const string &astronomical_type_abbreviation) |
Creates an instance of an aid::type with the given string, which is the reverse as the to_string() function of aid::type. | |
bool | operator== (const scifir::aid &x, const scifir::aid &y) |
Returns true if the type and all data are the same between x and y. | |
bool | operator!= (const scifir::aid &x, const scifir::aid &y) |
Returns true if the type or any data is different between x and y. | |
bool | operator== (const scifir::aid &x, const string &init_aid) |
Returns true if x and the aid constructed with init_aid are equal. | |
bool | operator!= (const scifir::aid &x, const string &init_aid) |
Returns true if x and the aid constructed with init_aid are different. | |
bool | operator== (const string &init_aid, const scifir::aid &x) |
Returns true if x and the aid constructed with init_aid are equal. | |
bool | operator!= (const string &init_aid, const scifir::aid &x) |
Returns true if x and the aid constructed with init_aid are different. | |
void | operator+= (string &x, const scifir::aid &y) |
Concatenates the string representation of aid y to the string x. | |
string | operator+ (const string &x, const scifir::aid &y) |
Concatenates x with the string representation of aid y. | |
string | operator+ (const scifir::aid &y, const string &x) |
Concatenates x with the string representation of aid y. | |
ostream & | operator<< (ostream &os, const scifir::aid &x) |
Adds the string representation of the aid x to an output stream os. | |
istream & | operator>> (istream &is, scifir::aid &x) |
Allows that an istream initializes by string an aid x. | |
bool operator!= | ( | const scifir::aid & | x, |
const scifir::aid & | y | ||
) |
bool operator!= | ( | const scifir::aid & | x, |
const string & | init_aid | ||
) |
bool operator!= | ( | const string & | init_aid, |
const scifir::aid & | x | ||
) |
string operator+ | ( | const scifir::aid & | y, |
const string & | x | ||
) |
string operator+ | ( | const string & | x, |
const scifir::aid & | y | ||
) |
void operator+= | ( | string & | x, |
const scifir::aid & | y | ||
) |
ostream & operator<< | ( | ostream & | os, |
const scifir::aid & | x | ||
) |
Adds the string representation of the aid x to an output stream os.
Definition at line 716 of file aid.cpp.
bool operator== | ( | const scifir::aid & | x, |
const scifir::aid & | y | ||
) |
Returns true if the type and all data are the same between x and y.
Definition at line 654 of file aid.cpp.
bool operator== | ( | const scifir::aid & | x, |
const string & | init_aid | ||
) |
Returns true if x and the aid constructed with init_aid are equal.
Definition at line 671 of file aid.cpp.
bool operator== | ( | const string & | init_aid, |
const scifir::aid & | x | ||
) |
Returns true if x and the aid constructed with init_aid are equal.
istream & operator>> | ( | istream & | is, |
scifir::aid & | x | ||
) |
Allows that an istream initializes by string an aid x.
Definition at line 721 of file aid.cpp.