277 else if(x ==
"u" or x ==
"µ")
Class that represents prefixes of the SI system of units. Each prefix sizes 1 byte....
int get_conversion_factor() const
Returns the conversion factor of the prefix given the prefix_type. It uses the SI system of units for...
prefix::type prefix_type
It stores the prefix type currently being used.
prefix()
Default constructor. The prefix_type is set to NONE.
string get_symbol() const
Symbol of the prefix given the prefix_type. The symbol of micro is supported in his Unicode version.
string get_name() const
Name of the prefix given the prefix_type.
prefix & operator=(const prefix &x)
Copy assignment. The prefix_type is copied from the prefix x.
bool operator<(const scifir::prefix &x) const
This operator allows to order the prefixes from the lower to the greather.
type
Represents a prefix of the SI system of units. All the prefixes of the SI system of units are support...
@ ATTO
Prefix of a factor of 10^-18.
@ YOCTO
Prefix of a factor of 10^-24.
@ RONNA
Prefix of a factor of 10^27.
@ NANO
Prefix of a factor of 10^-9.
@ MILLI
Prefix of a factor of 10^-3.
@ NONE
There is no prefix. Then, the dimension is not increased or decreased by some factor.
@ EXA
Prefix of a factor of 10^18.
@ QUETTA
Prefix of a factor of 10^30.
@ KILO
Prefix of a factor of 10^3.
@ MEGA
Prefix of a factor of 10^6.
@ HECTO
Prefix of a factor of 10^2.
@ CENTI
Prefix of a factor of 10^-2.
@ PETA
Prefix of a factor of 10^15.
@ RONTO
Prefix of a factor of 10^-27.
@ DECA
Prefix of a factor of 10^1.
@ ZEPTO
Prefix of a factor of 10^-21.
@ YOTTA
Prefix of a factor of 10^24.
@ FEMTO
Prefix of a factor of 10^-15.
@ DECI
Prefix of a factor of 10^-1.
@ MICRO
Prefix of a factor of 10^-6.
@ GIGA
Prefix of a factor of 10^9.
@ QUECTO
Prefix of a factor of 10^-30.
@ PICO
Prefix of a factor of 10^-12.
@ ZETTA
Prefix of a factor of 10^21.
@ TERA
Prefix of a factor of 10^12.
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
@ NONE
No predefined astronomical body selected.
prefix::type prefix_string(const string &x)
Returns the value of the enum prefix::type associated with the string x given.
prefix closest_prefix(const prefix &actual_prefix, int actual_scale)
Returns the closes prefix related to the scale of the current value. It is used when displaying a sca...
prefix create_prefix_by_factor(int factor)
Creates the prefix of the factor given, which is always between a range.
bool operator!=(const scifir::prefix &x, const scifir::prefix &y)
Comparison operator. Compares if two prefixes are different, that's, if they don't have the same pref...
bool operator<=(const scifir::prefix &x, const scifir::prefix &y)
Checks if prefix x is of a lower or equal factor than prefix y.
bool operator>=(const scifir::prefix &x, const scifir::prefix &y)
Checks if prefix x is of an equal or greather factor than prefix y.
bool operator>(const scifir::prefix &x, const scifir::prefix &y)
Checks if prefix x is of a greather factor than prefix y.
ostream & operator<<(ostream &os, const scifir::prefix &x)
Adds the string representation of the prefix x to an output stream.
bool operator==(const scifir::prefix &x, const scifir::prefix &y)
Comparison operator. Compares if two prefixes are the same, that's, if they have the same prefix::typ...