libSBML C++ API
5.20.2
|
Definition of SBML's UnitKind enumeration. More...
Enumerations | |
enum | UnitKind_t { UNIT_KIND_AMPERE , UNIT_KIND_AVOGADRO , UNIT_KIND_BECQUEREL , UNIT_KIND_CANDELA , UNIT_KIND_CELSIUS , UNIT_KIND_COULOMB , UNIT_KIND_DIMENSIONLESS , UNIT_KIND_FARAD , UNIT_KIND_GRAM , UNIT_KIND_GRAY , UNIT_KIND_HENRY , UNIT_KIND_HERTZ , UNIT_KIND_ITEM , UNIT_KIND_JOULE , UNIT_KIND_KATAL , UNIT_KIND_KELVIN , UNIT_KIND_KILOGRAM , UNIT_KIND_LITER , UNIT_KIND_LITRE , UNIT_KIND_LUMEN , UNIT_KIND_LUX , UNIT_KIND_METER , UNIT_KIND_METRE , UNIT_KIND_MOLE , UNIT_KIND_NEWTON , UNIT_KIND_OHM , UNIT_KIND_PASCAL , UNIT_KIND_RADIAN , UNIT_KIND_SECOND , UNIT_KIND_SIEMENS , UNIT_KIND_SIEVERT , UNIT_KIND_STERADIAN , UNIT_KIND_TESLA , UNIT_KIND_VOLT , UNIT_KIND_WATT , UNIT_KIND_WEBER , UNIT_KIND_INVALID } |
Enumeration of predefined SBML base units. More... | |
Functions | |
int | UnitKind_equals (UnitKind_t uk1, UnitKind_t uk2) |
Tests for logical equality between two given UNIT_KIND_ code values. More... | |
UnitKind_t | UnitKind_forName (const char *name) |
Converts a text string naming a kind of unit to its corresponding libSBML UNIT_KIND_ constant/enumeration value. More... | |
int | UnitKind_isValidUnitKindString (const char *str, unsigned int level, unsigned int version) |
Predicate for testing whether a given string corresponds to a predefined libSBML unit code. More... | |
const char * | UnitKind_toString (UnitKind_t uk) |
Converts a unit code to a text string equivalent. More... | |
Definition of SBML's UnitKind enumeration.
enum UnitKind_t |
Enumeration of predefined SBML base units.
For more information, please refer to the class documentation for Unit.
int UnitKind_equals | ( | UnitKind_t | uk1, |
UnitKind_t | uk2 | ||
) |
Tests for logical equality between two given UNIT_KIND_
code values.
This function behaves exactly like C's ==
operator, except for the following two cases:
In the two cases above, C equality comparison would yield 0
(false) (because each of the above is a distinct enumeration value), but this function returns true
.
uk1 | a UNIT_KIND_ value. |
uk2 | a second UNIT_KIND_ value to compare to uk1 . |
1
(true) if uk1
is logically equivalent to uk2
, 0
(false) otherwise.UnitKind_t UnitKind_forName | ( | const char * | name | ) |
Converts a text string naming a kind of unit to its corresponding libSBML UNIT_KIND_
constant/enumeration value.
name | a string, the name of a predefined base unit in SBML. |
name
(determined in a case-insensitive manner).int UnitKind_isValidUnitKindString | ( | const char * | str, |
unsigned int | level, | ||
unsigned int | version | ||
) |
Predicate for testing whether a given string corresponds to a predefined libSBML unit code.
str | a text string naming a base unit defined by SBML. |
level | the Level of SBML. |
version | the Version within the Level of SBML. |
UNIT_KIND_
value, 0
(false) otherwise.const char* UnitKind_toString | ( | UnitKind_t | uk | ) |
Converts a unit code to a text string equivalent.
uk | a value from the UnitKind_t enumeration |