Go to the documentation of this file.
28 #ifndef CASA_UNITMAP_H
29 #define CASA_UNITMAP_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/BasicSL/Constants.h>
35 #include <casacore/casa/stdmap.h>
36 #include <casacore/casa/BasicSL/String.h>
37 #include <casacore/casa/Quanta/UnitDim.h>
38 #include <casacore/casa/Quanta/UnitVal.h>
39 #include <casacore/casa/Quanta/UnitName.h>
40 #include <casacore/casa/OS/Mutex.h>
319 static const map<String, UnitName> &
giveDef();
320 static const map<String, UnitName> &
giveSI();
UnitMap & operator=(const UnitMap &other)
Copy assignment (not implemented)
static void removeUser(const UnitName &name)
static void putUser(const String &s, const UnitVal &val)
Define a user defined standard unit.
static map< String, UnitVal > & getMapCache()
Get the static mapCache object.
static void putUser(const String &s, const UnitVal &val, const String &name)
static void listCache(ostream &os)
List all units in cache.
static const map< String, UnitName > & giveDef()
static void initUMCust1(UMaps &)
static Bool getNameFITS(const UnitName *&name, uInt which)
Get the name of a FITS unit.
static Unit fromFITS(const Unit &un)
Translate a FITS unit to the proper units.
static void listDef(ostream &os)
List all defining units.
static Bool getUnit(const String &s, UnitName &name, UMaps *maps=0)
Get a standard unit definition (search order: User, Customary, SI)
static void addFITS()
Define FITS related unit names.
static Bool getPref(const String &s, UnitName &name, UMaps *maps=0)
Check if a unit name is known, and return its value if True
static const map< String, UnitVal > & giveCache()
static void clearFITS()
Clear FITS related units from user list.
static void initUMSI2(UMaps &)
static void initUMSI1(UMaps &)
map< String, UnitName > mapCust
Customary list.
static const map< String, UnitName > & givePref()
Return the different maps.
static void putUser(const UnitName &name)
static void listSI(ostream &os)
List all SI units.
static void listPref(ostream &os)
List all prefixes.
map< String, UnitName > mapDef
Defining SI unit list.
static const map< String, UnitName > & giveUser()
static void listUser(ostream &os)
List all user defined units.
Define a struct containing the static data members.
this file contains all the compiler specific defines
map< String, UnitName > mapSI
SI unit list.
UnitMap(const UnitMap &other)
Copy constructor (not implemented)
static void list(ostream &os)
List some part of the standard unit lists on cout or stream
static void initUMCust2(UMaps &)
static void initUMPrefix(UMaps &)
Bits and pieces of initUM() to get compilation speed improved.
UnitMap()
Default constructor of maps.
static const map< String, UnitName > & giveCust()
static void removeUser(const String &name)
Remove a user unit.
static void listCust(ostream &os)
List all customary units.
static const map< String, UnitName > & giveSI()
map< String, UnitName > mapUser
User defined unit list.
static void putCache(const String &s, const UnitVal &val)
Save a definition of a full unit name in the cache (the cache will be cleared if getting too large (2...
static void clearCache()
Clear out the cache.
Bool doneFITS
FITS unit list inclusion.
static const String & getStringFITS(uInt which)
Get the belonging unit to a FITS unit.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
static UMaps & getMaps()
Get the static UMaps struct.
static Unit toFITS(const Unit &un)
Translate to a FITS unit.
static Bool getCache(const String &s, UnitVal &val)
Get a cached definition.
static void initUMCust3(UMaps &)
map< String, UnitName > mapPref
Decimal prefix list.
const uInt N_FITS
Number of FITS units recognised (change the FITSstring and FITSunit lists in the UnitMap....