#include <iostream>
#include "qunitP.h"
#include "qunit_if.h"
double Qar_pow | ( | double | x, | |
double | y | |||
) |
char* qunit_findNext | ( | ) |
struct QunitSIConversion* QunitAccumulateSIConversion | ( | struct QunitSIConversion * | SIc | ) | [read] |
Accumulate base unit counts in SIConversion from list of unit entries, and remove any unit entries with exponent zero from list.
struct QunitUnitEntry* QunitAccumulateUnitEntry | ( | struct QunitUnitEntry * | , | |
struct QunitUnitEntry * | ||||
) | [read] |
qunit structure accumulating routines
If new_entry is an SI_unit, look for an existing entry for this unit and accumulate the exponent if found, then free the new_entry. If new_entry is an SI_unit with no existing entry, or if it is a text entry, append it to the existing list (and don't free it!)
void QunitAddUnit | ( | struct QunitSIConversion * | SI_c, | |
char * | unit, | |||
float | power | |||
) |
struct QunitSIConversion* QunitCreateSIConvDescrip | ( | ) | [read] |
qunit structure creation, destruction and output routines
struct QunitUnitEntry* QunitCreateUnitEntry | ( | ) | [read] |
void QunitDestroySIConvDescrip | ( | struct QunitSIConversion * | SI_conversion_ptr | ) |
void QunitDestroyUnitEntry | ( | struct QunitUnitEntry * | unit_entry_ptr | ) |
char* QunitGetBaseSI | ( | const char * | input_str | ) |
prototypes
char* QunitGetPowerSI | ( | char * | input_str, | |
float | p | |||
) |
char* QunitGetTidySI | ( | char * | input_str | ) |
int QunitHasUnits | ( | char * | input_str | ) |
void QunitInitialiseCatalogue | ( | ) |
qunit catalogue routines
Inits catalogue of recognized SI units and their properties
struct QunitUnitDescription* QunitLookupCatalogueDescription | ( | const char * | test_string | ) | [read] |
Lookup a unit in the catalogue by symbol or name and
return a pointer to its description, or NULL if not found.
First try for an exact case-sensitive match of unit symbol
If symbol was not matched, try for case-insensitive name match. Names are stored lowercase as per SI standard, so can do this by testing for an exact match of a lowercase copy of test_string.
void QunitPrintCatalogueDescription | ( | const struct QunitUnitDescription * | descrip | ) |
Print qunit catalogue description of an SI unit
int QunitSIConvParse | ( | struct QunitSIConversion * | ) |
parsing routine
void QunitStrCatPowerTidy | ( | char * | str_buf, | |
struct QunitSIConversion * | SIc, | |||
double | p | |||
) |
void QunitStrCatSIConversionBase | ( | char * | str_buf, | |
struct QunitSIConversion * | SIc | |||
) |
void QunitStrCatSIConversionTidy | ( | char * | str_buf, | |
struct QunitSIConversion * | SIc | |||
) |
void QunitStrCatUnitEntry | ( | char * | str_buf, | |
struct QunitUnitEntry * | ue | |||
) |
int _qunit_catalogue_initialised = 0 [static] |
qunit_unit_description_t qunit_catalogue[QUNIT_CATALOGUE_ENTRIES] [static] |
char qunit_line_buf[132] [static] |
char* qunit_line_buf_ptr [static] |