UnitKind.h File Reference

Detailed Description

Definition of SBML's UnitKind enumeration.

Author:
Ben Bornstein
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)
 Tests for logical equality between two given UNIT_KIND_ code values.
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.
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.
const char * UnitKind_toString (UnitKind_t uk)
 Converts a unit code to a text string equivalent.

Enumeration Type Documentation

enum typedef enum UnitKind_t

Enumeration of predefined SBML base units.

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

See also:
UnitDefinition_t
Unit_t
Enumerator:
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 

Function Documentation

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 false (because each of the above is a distinct enumeration value), but this function returns true.

Parameters:
uk1a UNIT_KIND_ value
uk2a second UNIT_KIND_ value to compare to uk1
Returns:
nonzero (for true) if uk1 is logically equivalent to uk2, zero (for false) otherwise.
Note:
For more information about the libSBML unit codes, please refer to the class documentation for Unit.
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.

Parameters:
namea string, the name of a predefined base unit in SBML
Returns:
Note:
For more information about the libSBML unit codes, please refer to the class documentation for Unit.
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.

Parameters:
stra text string naming a base unit defined by SBML
levelthe Level of SBML
versionthe Version within the Level of SBML
Returns:
nonzero (for true) if string is the name of a valid UNIT_KIND_ value, zero (for false) otherwise.
Note:
For more information about the libSBML unit codes, please refer to the class documentation for Unit.
const char* UnitKind_toString ( UnitKind_t  uk)

Converts a unit code to a text string equivalent.

Parameters:
uk
Returns:
the name corresponding to the given unit code.
Note:
For more information about the libSBML unit codes, please refer to the class documentation for Unit.
Warning:
The string returned is a static data value. The caller does not own the returned string and is therefore not allowed to modify it.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines