Project
Loading...
Searching...
No Matches
datatypes.h File Reference

Defines the dimensionless, the SI base, and the derived SI datatypes, e.g. SI::length. More...

#include <SI/internal.h>

Go to the source code of this file.

Namespaces

namespace  SI

Macros

#define DATATYPE(_name, _lengthExp, _massExp, _timeExp, _temperatureExp, _currentExp, _substanceExp, _intensityExp)

Typedefs

typedef double SI::dimensionless
 to hold a quantity without any unit, e.g. 42

Functions

 SI::DATATYPE (length, 1, 0, 0, 0, 0, 0, 0)
 SI::DATATYPE (mass, 0, 1, 0, 0, 0, 0, 0)
 SI::DATATYPE (time, 0, 0, 1, 0, 0, 0, 0)
 SI::DATATYPE (temperature, 0, 0, 0, 1, 0, 0, 0)
 SI::DATATYPE (electric_current, 0, 0, 0, 0, 1, 0, 0)
 SI::DATATYPE (amount_of_substance, 0, 0, 0, 0, 0, 1, 0)
 SI::DATATYPE (luminous_intensity, 0, 0, 0, 0, 0, 0, 1)
 SI::DATATYPE (area, 2, 0, 0, 0, 0, 0, 0)
 SI::DATATYPE (volume, 3, 0, 0, 0, 0, 0, 0)
 SI::DATATYPE (velocity, 1, 0,-1, 0, 0, 0, 0)
 SI::DATATYPE (acceleration, 1, 0,-2, 0, 0, 0, 0)
 SI::DATATYPE (jerk, 1, 0,-3, 0, 0, 0, 0)
 SI::DATATYPE (force, 1, 1,-2, 0, 0, 0, 0)
 SI::DATATYPE (energy, 2, 1,-2, 0, 0, 0, 0)
 SI::DATATYPE (impulse, 1, 1,-1, 0, 0, 0, 0)
 SI::DATATYPE (torque, 2, 1,-2, 0, 0, 0, 0)
 SI::DATATYPE (pressure, -1, 1,-2, 0, 0, 0, 0)
 SI::DATATYPE (power, 2, 1,-3, 0, 0, 0, 0)
 SI::DATATYPE (power_intensity, 0, 1,-3, 0, 0, 0, 0)
 SI::DATATYPE (density, -3, 1, 0, 0, 0, 0, 0)
 SI::DATATYPE (electric_potential, 2, 1,-3, 0,-1, 0, 0)
 SI::DATATYPE (electric_charge, 0, 0, 1, 0, 1, 0, 0)
 SI::DATATYPE (mass_per_area, -2, 1, 0, 0, 0, 0, 0)
 SI::DATATYPE (mass_per_power, -2, 0, 3, 0, 0, 0, 0)
 SI::DATATYPE (angular_speed, 0, 0,-1, 0, 1, 0, 0)
 SI::DATATYPE (specific_energy, 2, 0,-2, 0, 0, 0, 0)
 SI::DATATYPE (energy_per_mol, 2, 1,-2, 0, 0, 1, 0)
 SI::DATATYPE (volume_per_time_squared, 3, 0,-2, 0, 0, 0, 0)
 SI::DATATYPE (per_length, -1, 0, 0, 0, 0, 0, 0)
 SI::DATATYPE (per_area, -2, 0, 0, 0, 0, 0, 0)
 SI::DATATYPE (frequency, 0, 0,-1, 0, 0, 0, 0)
 SI::DATATYPE (per_amount_of_substance, 0, 0, 0, 0,-1, 0, 0)

Detailed Description

Defines the dimensionless, the SI base, and the derived SI datatypes, e.g. SI::length.

Macro Definition Documentation

◆ DATATYPE

#define DATATYPE ( _name,
_lengthExp,
_massExp,
_timeExp,
_temperatureExp,
_currentExp,
_substanceExp,
_intensityExp )
Value:
namespace detail { using _name ## _dimension = dimension<_lengthExp, _massExp, _timeExp, _temperatureExp, \
_currentExp, _substanceExp, _intensityExp>; } \
template <class T> using _name ## _t = detail::quantity<detail:: _name ## _dimension, T>; \
using _name = _name ## _t<SIdouble>; \
using _name ## 2 = _name ## _t<detail::vec2<SIdouble>>; \
using _name ## 3 = _name ## _t<detail::vec3<SIdouble>>