SyDEVS  v0.6.4
Multiscale Simulation and Systems Modeling Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
quantity.h File Reference
#include <sydevs/core/units.h>
#include <cmath>
#include <ostream>

Go to the source code of this file.

Classes

class  sydevs::quantity_base
 A base class for quantities, defining operations that do not depend on the dimension. More...
 
class  sydevs::quantity< U >
 A data type template which represents a dimensioned quantity as a multiple of a precision level, where the dimensions are supplied by a units template parameter and the precision level is specified using a value of type scale. More...
 
class  sydevs::quantity< no_units >
 A speciaulization to facilitate the conversion of dimensionless quantities into floats. More...
 

Namespaces

 sydevs
 

Macros

#define SYDEVS_QUANTITY_H_
 

Typedefs

using sydevs::mass = quantity< grams >
 
using sydevs::distance = quantity< meters >
 
using sydevs::duration = quantity< seconds >
 
using sydevs::electric_current = quantity< amperes >
 
using sydevs::thermodynamic_temperature = quantity< kelvins >
 
using sydevs::amount_of_substance = quantity< moles >
 
using sydevs::luminous_intensity = quantity< candelas >
 

Functions

template<typename U >
constexpr const quantity< U > sydevs::operator* (float64 lhs, quantity< U > rhs)
 
template<typename U >
constexpr const quantity
< decltype(_1/U())> 
sydevs::operator/ (float64 lhs, quantity< U > rhs)
 
constexpr mass sydevs::operator""_yg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_zg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_ag (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_fg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_pg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_ng (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_ug (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_mg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_g (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_kg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Mg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Gg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Tg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Pg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Eg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Zg (unsigned long long multiplier)
 
constexpr mass sydevs::operator""_Yg (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_ym (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_zm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_am (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_fm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_pm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_nm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_um (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_mm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_m (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_km (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Mm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Gm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Tm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Pm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Em (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Zm (unsigned long long multiplier)
 
constexpr distance sydevs::operator""_Ym (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_ys (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_zs (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_as (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_fs (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_ps (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_ns (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_us (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_ms (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_s (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_ks (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Ms (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Gs (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Ts (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Ps (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Es (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Zs (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_Ys (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_min (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_hr (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_day (unsigned long long multiplier)
 
constexpr duration sydevs::operator""_yr (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_yA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_zA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_aA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_fA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_pA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_nA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_uA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_mA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_A (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_kA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_MA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_GA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_TA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_PA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_EA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_ZA (unsigned long long multiplier)
 
constexpr electric_current sydevs::operator""_YA (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_yK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_zK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_aK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_fK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_pK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_nK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_uK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_mK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_K (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_kK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_MK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_GK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_TK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_PK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_EK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_ZK (unsigned long long multiplier)
 
constexpr thermodynamic_temperature sydevs::operator""_YK (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_ymol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_zmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_amol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_fmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_pmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_nmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_umol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_mmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_mol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_kmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Mmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Gmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Tmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Pmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Emol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Zmol (unsigned long long multiplier)
 
constexpr amount_of_substance sydevs::operator""_Ymol (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_ycd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_zcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_acd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_fcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_pcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_ncd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_ucd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_mcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_cd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_kcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Mcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Gcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Tcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Pcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Ecd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Zcd (unsigned long long multiplier)
 
constexpr luminous_intensity sydevs::operator""_Ycd (unsigned long long multiplier)
 
std::ostream & sydevs::operator<< (std::ostream &os, const mass &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const distance &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const duration &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const electric_current &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const thermodynamic_temperature &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const amount_of_substance &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const luminous_intensity &rhs)
 
std::ostream & sydevs::operator<< (std::ostream &os, const quantity< no_units > &rhs)
 
template<typename U >
std::ostream & sydevs::operator<< (std::ostream &os, const quantity< U > &rhs)
 

Variables

constexpr int64 sydevs::quantity_limit = int64(1)*1000*1000*1000*1000*1000
 The maximum precision multiplier, plus 1. More...
 

Macro Definition Documentation

#define SYDEVS_QUANTITY_H_