libSBML C++ API
5.18.0
|
SBML UnitKind enumeration. 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... | |
Variables | |
const char * | UNIT_KIND_STRINGS [] |
SBML UnitKind enumeration.
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 |
const char* UNIT_KIND_STRINGS[] |