1#ifndef SCIFIR_UNITS_SPECIAL_UNITS_ZID_HPP_INCLUDED
2#define SCIFIR_UNITS_SPECIAL_UNITS_ZID_HPP_INCLUDED
Class that stores astronomical ids, not as an integer but with an string as identifier....
Class that allows to store information about a zone, including the astronomical object inside which t...
zid::type zone_type
The type of zone. It can be any value of the enum zid::type. The possible values are COUNTRY,...
bool has_unknown_country() const
Returns true if the value of country is the predefined value 'unknown-country'.
void initialize_from_string(const string &init_zid_full)
Internal function. It's used by the string constructor and the string assignment of zid to initialize...
string display() const
Returns a string representation of zid, including the string representation of his aid.
bool has_no_country() const
Returns true if the value of country is the predefined value 'no-country'.
string partial_display() const
Returns a string representation of zid, without the string representation of his aid.
zid & operator=(const zid &x)
Copy assigment. The member-variables are copied from the zid x.
scifir::aid aid
The aid of the astronomical object where the zone is.
zid()
Default constructor. There's no data about any zone, the aid member-variable is also empty.
vector< string > regions
The different administrative regions where the zone is. There can be any number of administrative reg...
string zone
The name of the zone. Personal zones with a personal name are allowed, it's not necessary that the zo...
@ ZONE
A zone. A zone is any surface inside an astronomical object, of any shape. It's not necessary to be a...
@ SETTLEMENT
A settlement.
string country
The country where the zone is. In extraterrestrial planets, it's considered a country any division of...
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
zid::type create_zone_type(const string &zone_type_abbreviation)
Creates an instance of a zid::type with the given string, which is the reverse as the to_string() fun...
bool operator==(const scifir::zid &x, const scifir::zid &y)
Returns true if the type and all data are the same between x and y.
istream & operator>>(istream &is, scifir::zid &x)
Allows that an istream initializes by string a zid x.
ostream & operator<<(ostream &os, const scifir::zid &x)
Adds the string representation of the zid x to an output stream os.
void operator+=(string &x, const scifir::zid &y)
Concatenates the string representation of zid y to the string x.
string operator+(const string &x, const scifir::zid &y)
Concatenates x with the string representation of zid y.
bool operator!=(const scifir::zid &x, const scifir::zid &y)
Returns true if the type or any data is different between x and y.