TkN 2.6
Toolkit for Nuclei
Loading...
Searching...
No Matches
tkunit_manager Class Reference

Manages the different units. More...

#include <physics/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
 
tkstring get_name (const units_keys &_key)
 retuns unit name
 
units_type get_type (const units_keys &_key)
 retuns unit type
 

Static Public Member Functions

static tkunit_managerthe_unit_manager ()
 db_manager is a singleton
 

Static Public Attributes

static std::vector< std::tuple< tkstring, units_type, double > > funits_properties
 

Friends

class tkunit
 

Detailed Description

Manages the different units.

See the measures and units user guide.

Definition at line 31 of file tkunit.h.

Member Enumeration Documentation

◆ units_keys

enum units_keys

units identifiers

Enumerator
Undef_unit 
eV 
keV 
MeV 
GeV 
TeV 
as 
fs 
ps 
ns 
us 
ms 
min 
am 
fm 
pm 
nm 
um 
mm 
cm 

Definition at line 46 of file tkunit.h.

◆ units_type

enum units_type

flags that qualify the unit type

Enumerator
kUndef_type 
kEnergy 
kTime 
kLenght 
kNoConvUnits 

Definition at line 38 of file tkunit.h.

Constructor & Destructor Documentation

◆ tkunit_manager()

Definition at line 71 of file tkunit.cpp.

◆ ~tkunit_manager()

virtual ~tkunit_manager ( )
virtualdefault

Member Function Documentation

◆ get_key()

units_keys get_key ( const tkstring & _name)
inline

retuns unit key

Definition at line 79 of file tkunit.h.

◆ get_name()

tkstring get_name ( const units_keys & _key)
inline

retuns unit name

Definition at line 73 of file tkunit.h.

◆ get_type()

units_type get_type ( const units_keys & _key)
inline

retuns unit type

Definition at line 95 of file tkunit.h.

◆ the_unit_manager()

tkunit_manager * the_unit_manager ( )
static

db_manager is a singleton

Definition at line 82 of file tkunit.cpp.

Friends And Related Symbol Documentation

◆ tkunit

friend class tkunit
friend

Definition at line 33 of file tkunit.h.

Member Data Documentation

◆ funits_properties

std::vector< std::tuple< tkstring, tkunit_manager::units_type, double > > funits_properties
static

Definition at line 52 of file tkunit.h.


The documentation for this class was generated from the following files: