1#ifndef SCIFIR_UNITS_UNITS_BASE_UNITS_HPP_INCLUDED
2#define SCIFIR_UNITS_UNITS_BASE_UNITS_HPP_INCLUDED
6#include "../meca_number/percentage.hpp"
38 explicit operator std::chrono::seconds()
const;
59 template<
typename T1,
typename T2>
62 chrono::seconds
d = chrono::duration_cast<chrono::seconds>(x);
68 template<
typename T1,
typename T2>
71 chrono::seconds
d = chrono::duration_cast<chrono::seconds>(x);
77 using scalar_unit::operator =;
78 using scalar_unit::operator+=;
79 using scalar_unit::operator-=;
position
Represents the position of the dimension, which can be at the numerator or at the denominator....
@ NUMERATOR
The dimension is at the numerator.
type
Represents a dimension of the SI system of units. All the dimensions of the SI system of units are su...
Class that allows to handle percentages and do calculations with it easy. It supports normal percenta...
type
Represents a prefix of the SI system of units. All the prefixes of the SI system of units are support...
Class that allows to create scalar units, which are composed of a value (as a float) and dimensions....
void operator+=(scalar_unit x)
Addition operator, it adds a scalar_unit class to another, by converting their dimensions to be equal...
void operator-=(scalar_unit x)
Substraction operator, it substracts a scalar_unit class to another, by converting their dimensions t...
static const vector< dimension > real_dimensions
scifir::time_duration & operator+=(chrono::duration< T1, T2 > x)
string display_hours() const
string get_finish_date() const
string display_minutes() const
string display_seconds() const
string display_weeks() const
string display_months() const
string display_days() const
static const string dimensions_match
string display_as_time() const
scifir::time_duration & operator-=(chrono::duration< T1, T2 > x)
string display_years() const
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
int get_number_of_particles() const
mole(const percentage &new_percentage, const mole &new_mole)
mass(const percentage &new_percentage, const mass &new_mass)
#define SCALAR_UNIT_HPP(name)
#define SCALAR_UNIT_HPP_BEGIN(name)