28 #ifndef CASA_UNITMAP_H
29 #define CASA_UNITMAP_H
276 static void list(ostream &os);
294 static void listDef(ostream &os);
300 static void listSI(ostream &os);
319 static const map<String, UnitName> &
givePref();
320 static const map<String, UnitName> &
giveDef();
321 static const map<String, UnitName> &
giveSI();
322 static const map<String, UnitName> &
giveCust();
323 static const map<String, UnitName> &
giveUser();
324 static const map<String, UnitVal> &
giveCache();
const uInt N_FITS
Number of FITS units recognised (change the FITSstring and FITSunit lists in the UnitMap.cc when changing this number.
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 addFITS()
Define FITS related unit names.
static const map< String, UnitName > & giveDef()
static map< String, UnitVal > & getMapCache()
Get the static mapCache object.
static void initUMPrefix(UMaps &)
Bits and pieces of initUM() to get compilation speed improved.
static Unit fromFITS(const Unit &un)
Translate a FITS unit to the proper units.
static const String & getStringFITS(uInt which)
Get the belonging unit to a FITS unit.
static const map< String, UnitName > & givePref()
Return the different maps.
describes any valid unit as a factor and a dimenion of SI units
static void clearCache()
Clear out the cache.
static void putUser(const String &s, const UnitVal &val)
Define a user defined standard unit.
UnitMap & operator=(const UnitMap &other)
Copy assignment (not implemented)
contains all simple known physical units
static void initUMCust3(UMaps &)
static Bool getNameFITS(const UnitName *&name, uInt which)
Get the name of a FITS unit.
static void initUMCust1(UMaps &)
static UMaps & getMaps()
Get the static UMaps struct.
static void initUMCust2(UMaps &)
static const map< String, UnitVal > & giveCache()
Define a struct containing the static data members.
map< String, UnitName > mapPref
Decimal prefix list.
static Bool getPref(const String &s, UnitName &name, UMaps *maps=0)
Check if a unit name is known, and return its value if True.
bool Bool
Define the standard types used by Casacore.
static const map< String, UnitName > & giveUser()
static const map< String, UnitName > & giveCust()
static void removeUser(const String &name)
Remove a user unit.
map< String, UnitName > mapUser
User defined unit list.
Bool doneFITS
FITS unit list inclusion.
map< String, UnitName > mapCust
Customary list.
static void initUMSI2(UMaps &)
map< String, UnitName > mapDef
Defining SI unit list.
String: the storage and methods of handling collections of characters.
static void initUMSI1(UMaps &)
static std::mutex fitsMutex
static Bool getCache(const String &s, UnitVal &val)
Get a cached definition.
static Unit toFITS(const Unit &un)
Translate to a FITS unit.
static const map< String, UnitName > & giveSI()
static void clearFITS()
Clear FITS related units from user list.
static Bool getUnit(const String &s, UnitName &name, UMaps *maps=0)
Get a standard unit definition (search order: User, Customary, SI)
map< String, UnitName > mapSI
SI unit list.
UnitMap()
Default constructor of maps.