libSBML C API  libSBML 5.20.2 C API
Loading...
Searching...
No Matches
UnitKind.h File Reference

Definition of SBML's UnitKind enumeration. More...

Include dependency graph for UnitKind.h:
This graph shows which files directly or indirectly include this file:

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)
 _tTests_t _tfor_t _tlogical_t _tequality_t _tbetween_t _ttwo_t _tgiven_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcode_t _tvalues_t.
 
UnitKind_t UnitKind_forName (const char *name)
 _tConverts_t _ta_t _ttext_t _tstring_t _tnaming_t _ta_t _tkind_t _tof_t _tunit_t _tto_t _tits_t _tcorresponding_t _tlibSBML_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tconstant_t/_tenumeration_t _tvalue_t.
 
int UnitKind_isValidUnitKindString (const char *str, unsigned int level, unsigned int version)
 _tPredicate_t _tfor_t _ttesting_t _twhether_t _ta_t _tgiven_t _tstring_t _tcorresponds_t _tto_t _ta_t _tpredefined_t _tlibSBML_t _tunit_t _tcode_t.
 
const char * UnitKind_toString (UnitKind_t uk)
 _tConverts_t _ta_t _tunit_t _tcode_t _tto_t _ta_t _ttext_t _tstring_t _tequivalent_t.
 

Detailed Description

Definition of SBML's UnitKind enumeration.

Author
Ben Bornstein

Enumeration Type Documentation

◆ UnitKind_t

enum UnitKind_t

Enumeration of predefined SBML base units.

For more information, please refer to the class documentation for Unit_t.

See also
UnitDefinition_t
Unit_t
Enumerator
UNIT_KIND_AMPERE 

Ampere ('A'); SI base unit of electrical current (I)

UNIT_KIND_AVOGADRO 

Avogadro; From the SBML specification, the unit 'dimensionless' multiplied with Avogadro's number

UNIT_KIND_BECQUEREL 

Bequerel ('Bq'); SI derived unit of radioactivity. Equivalent to s-1.

UNIT_KIND_CANDELA 

Candela ('cd'); SI base unit of luminous intensity

UNIT_KIND_CELSIUS 

Celsius ('°C'); unit of measurement for temperature. Can either mean a specific temperature on the Celsius scale, or can indicate a temperature interval. This duality of purpose makes it a poor choice for a unit and is only included for completeness; use UNIT_KIND_KELVIN instead.

UNIT_KIND_COULOMB 

Coulomb ('C'); SI derived unit of electric charge (Q); the charge transported by a constant current of one ampere in one second (A x s; also equivalent to F x V).

UNIT_KIND_DIMENSIONLESS 

Dimensionless; Having no explicit dimensionality, from the SBML specification. Sometimes used for counts of items. Not equivalent to unknown!

UNIT_KIND_FARAD 

Farad ('F'); SI derived unit of electric capacitance. Equivalent to s4 x A2 x m-2 x kg-1

UNIT_KIND_GRAM 

Gram ('g'); SI derived unit of mass. Equivalent to 10-3 kg

UNIT_KIND_GRAY 

Gray ('Gy'); SI derived unit of absorbed dose, specific energy (imparted) and of kerma. Equivalent to one m2 x m-2, or one J x kg-1.

UNIT_KIND_HENRY 

Henry ('H'); SI derived unit of inductance. Equivalent to m2 x kg x s-2 x A-2

UNIT_KIND_HERTZ 

Hertz ('Hz'); SI base unit of frequency; a number of cycles per second of a periodic phenomenon.

UNIT_KIND_ITEM 

Item; From the SBML specification, 'item' is used for expressing such things as 'N items' when 'mole' is not an appropriate unit

UNIT_KIND_JOULE 

Joule ('J'); The SI derived unit of energy. Equivalent to kg x m2 x s-2.

UNIT_KIND_KATAL 

Katal ('kat'); The SI derived unit of catalytic activity. Equivalent to mol x s-1.

UNIT_KIND_KELVIN 

Kelvin ('K'); SI base unit of temperature.

UNIT_KIND_KILOGRAM 

Kilogram ('kg'); SI base unit of mass.

UNIT_KIND_LITER 

Liter ('L'); American spelling of the SI unit 'litre'. Here solely to catch the misspelling; use UNIT_KIND_LITRE instead.

UNIT_KIND_LITRE 

Litre ('L'); non-SI metric system of volume. Equivalent to 103cm3.

UNIT_KIND_LUMEN 

Lumen ('lm'); SI derived unit of luminous flux. Equivalent to cd x sr.

UNIT_KIND_LUX 

Lux ('lx'); SI derived unit of luminous emittance. Equivalent to lm x m-2.

UNIT_KIND_METER 

Meter ('m'); American spelling of the SI unit 'metre'. Here solely to catch the misspelling; use UNIT_KIND_METRE instead.

UNIT_KIND_METRE 

Metre ('m'); SI base unit of length.

UNIT_KIND_MOLE 

Mole ('mol'); SI base unit of amount. Defined as the amount of any substance that contains as many elementary entities as there are atoms in 12 grams of pure Carbon-12, which corresponds to the Avogadro constant. See UNIT_KIND_AVOGADRO.

UNIT_KIND_NEWTON 

Newton ('N'); SI derived unit of force. Equivalent to one kg x m x sec-2.

UNIT_KIND_OHM 

Ohm ('&#8486;'); SI derived unit of electrical resistance. Equivalent to kg x m2 x s-3 x A-2.

UNIT_KIND_PASCAL 

Pascal ('Pa'); SI derived unit of pressure. Equivalent to kg x m-1 x s-2.

UNIT_KIND_RADIAN 

Radian ('rad'); SI derived unit of angular measure. Dimensionless; an angle's measurement in radians is numerically equal to the length of a corresponding arc of a unit circle.

UNIT_KIND_SECOND 

Second ('s'); SI base unit of time.

UNIT_KIND_SIEMENS 

Siemens ('S'); SI derived unit of electric conductance. Equivalent to A2 x s3 x kg-1 x m-2.

UNIT_KIND_SIEVERT 

Sievert ('Sv'); SI derived unit of equivalent radiation dose, effective dose, and committed dose. Equivalent to the UNIT_KIND_GRAY (m2 x m-2), but used to express the biological equivalent dose in human tissue.

UNIT_KIND_STERADIAN 

Steradian ('sr'); SI derived unit of solid angle. An angle's measurement in steradians is numerically equal to the area of the corresponding surface on a unit sphere. Like the radian, it is dimensionless, essentially because a solid angle is the ratio between the area subtended and the square of its distance from the vertex: both the numerator and denominator of this ratio have dimension length2. It is useful, however, to distinguish between dimensionless quantities of different nature, so in practice the symbol "sr" is used to indicate a solid angle..

UNIT_KIND_TESLA 

Tesla ('T'); SI derived unit of magnetic field strength or magnetic flux density. Equivalent to kg x A-1 x s-2.

UNIT_KIND_VOLT 

Volt ('V'); SI derived unit of electric potential. Equivalent to kg x m2 x A-1 x s-3.

UNIT_KIND_WATT 

Watt ('W'); SI derived unit of power. Equivalent to kg x m2 x s-3.

UNIT_KIND_WEBER 

Weber ('Wb'); SI derived unit of magnetic flux. Equivalent to kg x m2 x A-1 x s-2.

UNIT_KIND_INVALID 

An invalid unit. Used by libsbml when the 'unit' attribute of an element does not contain any allowed value.

Function Documentation

◆ UnitKind_equals()

int UnitKind_equals ( UnitKind_t  uk1,
UnitKind_t  uk2 
)

_tTests_t _tfor_t _tlogical_t _tequality_t _tbetween_t _ttwo_t _tgiven_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcode_t _tvalues_t.

_tThis_t _tfunction_t _tbehaves_t _texactly_t _tlike_t _tC_t'_ts_t <_tcode_t>==</_tcode_t> _toperator_t, _texcept_t _tfor_t _tthe_t _tfollowing_t _ttwo_t _tcases_t: <_tul_t> <_tli_t>@_tsbmlconstant_t{_tUNIT_KIND_LITER_t, _tUnitKind_t_t} <_tcode_t>==</_tcode_t> @_tsbmlconstant_t{_tUNIT_KIND_LITRE_t, _tUnitKind_t_t} <_tli_t>@_tsbmlconstant_t{_tUNIT_KIND_METER_t, _tUnitKind_t_t} <_tcode_t>==</_tcode_t> @_tsbmlconstant_t{_tUNIT_KIND_METRE_t, _tUnitKind_t_t} </_tul_t>

_tIn_t _tthe_t _ttwo_t _tcases_t _tabove_t, _tC_t _tequality_t _tcomparison_t _twould_t _tyield_t @_tc_t _t0_t (_tfalse_t) (_tbecause_t _teach_t _tof_t _tthe_t _tabove_t _tis_t _ta_t _tdistinct_t _tenumeration_t _tvalue_t), _tbut_t _tthis_t _tfunction_t _treturns_t @_tc_t _ttrue_t.

@_tparam_t _tuk1_t _ta_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tvalue_t. @_tparam_t _tuk2_t _ta_t _tsecond_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tvalue_t _tto_t _tcompare_t _tto_t @_tp_t _tuk1_t.

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t @_tp_t _tuk1_t _tis_t _tlogically_t _tequivalent_t _tto_t @_tp_t _tuk2_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tnote_t _tFor_t _tmore_t _tinformation_t _tabout_t _tthe_t _tlibSBML_t _tunit_t _tcodes_t, _tplease_t _trefer_t _tto_t _tthe_t _tclass_t _tdocumentation_t _tfor_t _tUnit_t.

@_tif_t _tconly_t @_tmemberof_t _tUnit_t_t @_tendif_t

_tTests_t _tfor_t _tlogical_t _tequality_t _tbetween_t _ttwo_t _tgiven_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcode_t _tvalues_t.

◆ UnitKind_forName()

UnitKind_t UnitKind_forName ( const char *  name)

_tConverts_t _ta_t _ttext_t _tstring_t _tnaming_t _ta_t _tkind_t _tof_t _tunit_t _tto_t _tits_t _tcorresponding_t _tlibSBML_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tconstant_t/_tenumeration_t _tvalue_t.

@_tparam_t _tname_t _ta_t _tstring_t, _tthe_t _tname_t _tof_t _ta_t _tpredefined_t _tbase_t _tunit_t _tin_t _tSBML_t.

@_treturn_t @_tif_t _tclike_t _ta_t _tvalue_t _tfrom_t _tUnitKind_t_t _tcorresponding_t _tto_t _tthe_t _tgiven_t _tstring_t @_tp_t _tname_t (_tdetermined_t _tin_t _ta_t _tcase_t-_tinsensitive_t _tmanner_t). @_tendif_t@_tif_t _tpython_t _ta_t _tvalue_t _tthe_t _tset_t _tof_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcodes_t _tdefined_t _tin_t _tclass_t @_tlink_t _tlibsbml_t _tlibsbml_t@_tendlink_t, _tcorresponding_t _tto_t _tthe_t _tstring_t @_tp_t _tname_t (_tdetermined_t _tin_t _ta_t _tcase_t-_tinsensitive_t _tmanner_t).@_tendif_t@_tif_t _tjava_t _ta_t _tvalue_t _tthe_t _tset_t _tof_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcodes_t _tdefined_t _tin_t _tclass_t {@_tlink_t _tlibsbmlConstants_t}, _tcorresponding_t _tto_t _tthe_t _tstring_t @_tp_t _tname_t (_tdetermined_t _tin_t _ta_t _tcase_t-_tinsensitive_t _tmanner_t).@_tendif_t

@_tnote_t _tFor_t _tmore_t _tinformation_t _tabout_t _tthe_t _tlibSBML_t _tunit_t _tcodes_t, _tplease_t _trefer_t _tto_t _tthe_t _tclass_t _tdocumentation_t _tfor_t _tUnit_t.

@_tif_t _tconly_t @_tmemberof_t _tUnit_t_t @_tendif_t

_tConverts_t _ta_t _ttext_t _tstring_t _tnaming_t _ta_t _tkind_t _tof_t _tunit_t _tto_t _tits_t _tcorresponding_t _tlibSBML_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tconstant_t/_tenumeration_t _tvalue_t.

◆ UnitKind_isValidUnitKindString()

int UnitKind_isValidUnitKindString ( const char *  str,
unsigned int  level,
unsigned int  version 
)

_tPredicate_t _tfor_t _ttesting_t _twhether_t _ta_t _tgiven_t _tstring_t _tcorresponds_t _tto_t _ta_t _tpredefined_t _tlibSBML_t _tunit_t _tcode_t.

@_tparam_t _tstr_t _ta_t _ttext_t _tstring_t _tnaming_t _ta_t _tbase_t _tunit_t _tdefined_t _tby_t _tSBML_t. @_tparam_t _tlevel_t _tthe_t _tLevel_t _tof_t _tSBML_t. @_tparam_t _tversion_t _tthe_t _tVersion_t _twithin_t _tthe_t _tLevel_t _tof_t _tSBML_t.

@_treturn_t _t1_t (_ttrue_t) _tif_t _tstring_t _tis_t _tthe_t _tname_t _tof_t _ta_t _tvalid_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tvalue_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tnote_t _tFor_t _tmore_t _tinformation_t _tabout_t _tthe_t _tlibSBML_t _tunit_t _tcodes_t, _tplease_t _trefer_t _tto_t _tthe_t _tclass_t _tdocumentation_t _tfor_t _tUnit_t.

@_tif_t _tconly_t @_tmemberof_t _tUnit_t_t @_tendif_t

_tPredicate_t _tfor_t _ttesting_t _twhether_t _ta_t _tgiven_t _tstring_t _tcorresponds_t _tto_t _ta_t _tpredefined_t _tlibSBML_t _tunit_t _tcode_t.

◆ UnitKind_toString()

const char * UnitKind_toString ( UnitKind_t  uk)

_tConverts_t _ta_t _tunit_t _tcode_t _tto_t _ta_t _ttext_t _tstring_t _tequivalent_t.

@_tparam_t _tuk_t @_tif_t _tclike_t _ta_t _tvalue_t _tfrom_t _tthe_t _tUnitKind_t_t _tenumeration_t @_tendif_t@_tif_t _tpython_t _ta_t _tvalue_t _tfrom_t _tthe_t _tset_t _tof_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcodes_t _tdefined_t _tin_t _tthe_t _tclass_t @_tlink_t _tlibsbml_t _tlibsbml_t@_tendlink_t @_tendif_t@_tif_t _tjava_t _ta_t _tvalue_t _tfrom_t _tthe_t _tset_t _tof_t <_tcode_t>_tUNIT_KIND__t</_tcode_t> _tcodes_t _tdefined_t _tin_t _tthe_t _tclass_t {@_tlink_t _tlibsbmlConstants_t} @_tendif_t

@_treturn_t _tthe_t _tname_t _tcorresponding_t _tto_t _tthe_t _tgiven_t _tunit_t _tcode_t.

@_tnote_t _tFor_t _tmore_t _tinformation_t _tabout_t _tthe_t _tlibSBML_t _tunit_t _tcodes_t, _tplease_t _trefer_t _tto_t _tthe_t _tclass_t _tdocumentation_t _tfor_t _tUnit_t.

@_twarning_t _tThe_t _tstring_t _treturned_t _tis_t _ta_t _tstatic_t _tdata_t _tvalue_t. _tThe_t _tcaller_t _tdoes_t _tnot_t _town_t _tthe_t _treturned_t _tstring_t _tand_t _tis_t _ttherefore_t _tnot_t _tallowed_t _tto_t _tmodify_t _tit_t.

@_tif_t _tconly_t @_tmemberof_t _tUnit_t_t @_tendif_t

_tConverts_t _ta_t _tunit_t _tcode_t _tto_t _ta_t _ttext_t _tstring_t _tequivalent_t.