![]() |
TkN 2.1
Toolkit for Nuclei
|
Manages the different units. More...
Manages the different units.
As seen in the tkn::tkmeasure class, tkn offers the possibility to convert some measure into different units
Currently, tkn handles three unit types: Energy, Time en Lenght. Few other units are included in tkn but that cannot be converted
The available energy units are the following: eV, keV, MeV, GeV, TeV
The available time units are the following: as, fs, ps, ns, us, ms, s, min, h, d, y
The available lenght units are the following: am, fm, pm, nm, um, mm, cm, m
In general, units can be converted only in the scale of a same type. One exception is given for the energy to time conversion. For very low lifetimes, it is common to express the width of a level in energy. This conversion is taken into account in tkn.
#include <tkunit.h>
Public Types | |
enum | units_keys { Undef_unit , eV , keV , MeV , GeV , TeV , as , fs , ps , ns , us , ms , s , min , h , d , y , am , fm , pm , nm , um , mm , cm , m } |
units identifiers More... | |
enum | units_type { kUndef_type , kEnergy , kTime , kLenght , kNoConvUnits } |
flags that qualify the unit type More... | |
Public Member Functions | |
tkunit_manager () | |
virtual | ~tkunit_manager ()=default |
units_keys | get_key (const tkstring &_name) |
retuns unit key More... | |
tkstring | get_name (const units_keys &_key) |
retuns unit name More... | |
units_type | get_type (const units_keys &_key) |
retuns unit type More... | |
Static Public Member Functions | |
static tkunit_manager * | the_unit_manager () |
db_manager is a singleton More... | |
Static Public Attributes | |
static std::vector< std::tuple< tkstring, units_type, double > > | funits_properties |
Friends | |
class | tkunit |
enum units_keys |
enum units_type |
tkunit_manager | ( | ) |
Definition at line 94 of file tkunit.cpp.
|
virtualdefault |
|
inline |
|
inline |
|
inline |
|
static |
db_manager is a singleton
Definition at line 105 of file tkunit.cpp.
|
static |