1#ifndef SCIFIR_UNITS_SPECIAL_UNITS_AID_HPP_INCLUDED
2#define SCIFIR_UNITS_SPECIAL_UNITS_AID_HPP_INCLUDED
11 enum class astronomical_body : int8_t {
NONE,
MILKY_WAY,
ANDROMEDA,
SOLAR_SYSTEM,
SUN,
MOON,
MERCURY,
VENUS,
EARTH,
MARS,
JUPITER,
SATURN,
URANUS,
NEPTUNE,
CERES,
ORCUS,
PLUTO,
HAUMEA,
QUAOAR,
MAKEMAKE,
GONGGONG,
ERIS,
SEDNA,
IO,
EUROPA,
GANYMEDE,
CALLISTO,
MIMAS,
ENCELADUS,
TETHYS,
DIONE,
RHEA,
TITAN,
IAPETUS,
MIRANDA,
ARIEL,
UMBRIEL,
TITANIA,
OBERON,
TRITON,
CHARON,
DYSNOMIA};
22 explicit aid(
const aid::type& new_astronomical_type,
const string& new_astro1,
const string& new_astro2 =
"",
const string& new_astro3 =
"",
const string& new_astro4 =
"");
23 explicit aid(
const string& init_aid);
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.
istream & operator>>(istream &is, scifir::aid &x)
Allows that an istream initializes by string an aid x.
void operator+=(string &x, const scifir::aid &y)
Concatenates the string representation of aid y to the string x.
bool operator!=(const scifir::aid &x, const scifir::aid &y)
Returns true if the type or any data is different between x and y.
ostream & operator<<(ostream &os, const scifir::aid &x)
Adds the string representation of the aid x to an output stream os.
string operator+(const string &x, const scifir::aid &y)
Concatenates x with the string representation of aid y.
Class that stores astronomical ids, not as an integer but with an string as identifier....
bool has_unknown_asteroid() const
Returns true if the asteroid has the special value "unknown-asteroid".
string universe
The universe of the astronomical body. The predefined value no-universe means that there's no univers...
void initialize_from_string(const string &init_aid)
Internal function. Initializes the member-variables with an initialization string of aid.
bool has_unknown_solar_system() const
Returns true if the solar system has the special value "unknown-solar-system".
bool has_unknown_star() const
Returns true if the star has the special value "unknown-star".
string galaxy
The galaxy of the astronomical body. The predefined value no-galaxy means that the astronomical objec...
aid::type astronomical_type
The type of the astronomical body, which can be any value of the enum aid::type.
bool has_no_solar_system() const
string solar_system
The solar system of the astronomical body. The predefined value no-solar-system means that the astron...
bool has_unknown_planet() const
Returns true if the planet has the special value "unknown-planet".
bool has_unknown_galaxy() const
Returns true if the galaxy has the special value "unknown-galaxy".
string display() const
Returns a string representation of aid.
aid & operator=(const aid &x)
Copy assignment. The member-variables are copied from the aid x.
bool has_unknown_universe() const
Returns true if the universe has the special value "unknown-universe".
aid()
Default constructor. The astronomical type is NONE, the other member-variables are empty strings.
bool has_unknown_moon() const
Returns true if the moon has the special value "unknown-moon".
bool has_no_galaxy() const
type
Type of astronomical body.
@ NONE
No astronomical body.
@ MOON
A moon. A moon is a natural satellite of a planet. His string representation is MN.
@ ASTEROID
An asteroid. An asteroid is an astronomical object that orbits another astronomical object....
@ METEOR
A meteor. His string representation is MT.
@ GALAXY
A galaxy. His string representation is G.
@ SOLAR_SYSTEM
A solar system. A solar system is composed of planets orbiting a star. His string representation is S...
@ UNIVERSE
A universe. His string representation is U.
@ STAR
A star. His string representation is ST.
@ PLANET
A planet. A planet is an astronomical object with atmosphere. His string representation is P.
bool has_no_universe() const
string astronomical_body
The name of the astronomical body. The predefined value unknown-planet means that it's not known the ...
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
astronomical_body
Contains predefined astronomical bodies to be set automatically in the aid class. All of them are imp...
@ IAPETUS
The moon of Saturn Iapetus.
@ DYSNOMIA
The moon of Eris Dysnomia.
@ ENCELADUS
The moon of Saturn Enceladus.
@ MILKY_WAY
The Milky Way galaxy.
@ MIMAS
The moon of Saturn Mimas.
@ CERES
The dwarf planet Ceres.
@ OBERON
The moon of Uranus Oberon.
@ RHEA
The moon of Saturn Rhea.
@ ANDROMEDA
The Andromeda galaxy, 2.5 million light years from Earth.
@ GANYMEDE
The moon of Jupiter Ganymede.
@ EUROPA
The moon of Jupiter Europa.
@ TITANIA
The moon of Uranus Titania.
@ SATURN
The planet Saturn.
@ HAUMEA
The dwarf planet Haumea.
@ MIRANDA
The moon of Uranus Miranda.
@ UMBRIEL
The moon of Uranus Umbriel.
@ QUAOAR
The dwarf planet Quaoar.
@ URANUS
The planet Uranus.
@ TITAN
The moon of Saturn Titan.
@ ERIS
The dwarf planet Eris.
@ GONGGONG
The possible dwarf planet Gonggong.
@ SUN
The Sun, the sun of the solar system of the Earth.
@ TRITON
The moon of Neptune Triton.
@ ARIEL
The moon of Uranus Ariel.
@ JUPITER
The planet Jupiter.
@ NEPTUNE
The planet Neptune.
@ SEDNA
The minor body Sedna.
@ CALLISTO
The moon of Jupiter Callisto.
@ MERCURY
The planet Mercury.
@ TETHYS
The moon of Saturn Tethys.
@ NONE
No predefined astronomical body selected.
@ DIONE
The moon of Saturn Dione.
@ CHARON
The moon of Pluto Charon.
@ PLUTO
The dwarf planet Pluto.
@ MAKEMAKE
The dwarf planet Makemake.
@ MOON
The Moon of the Earth.
@ IO
The moon of Jupiter Io.
@ ORCUS
The possible dwarf planet Orcus.
@ SOLAR_SYSTEM
The Solar System of the Earth.
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
aid::type 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() fu...