Implementations of Unit and ListOfUnits.

Functions | |
| int | Unit_areEquivalent (Unit_t *unit1, Unit_t *unit2) |
| int | Unit_areIdentical (Unit_t *unit1, Unit_t *unit2) |
| Unit_t * | Unit_clone (const Unit_t *u) |
| Creates a deep copy of the given Unit_t structure. | |
| UnitDefinition_t * | Unit_convertToSI (Unit_t *unit) |
| Unit_t * | Unit_create (unsigned int level, unsigned int version) |
Creates a new Unit_t structure using the given SBML level and version values. | |
| Unit_t * | Unit_createWithNS (SBMLNamespaces_t *sbmlns) |
| Creates a new Unit_t structure using the given SBMLNamespaces_t structure. | |
| void | Unit_free (Unit_t *u) |
| Frees the given Unit_t structure. | |
| int | Unit_getExponent (const Unit_t *u) |
Returns the value of the "exponent" attribute of the given Unit_t structure u. | |
| double | Unit_getExponentAsDouble (const Unit_t *u) |
Returns the value of the "exponent" attribute of the given Unit_t structure u. | |
| UnitKind_t | Unit_getKind (const Unit_t *u) |
Returns the "kind" attribute value of the given unit u. | |
| double | Unit_getMultiplier (const Unit_t *u) |
Returns the value of the "multiplier" attribute of the given Unit_t structure u. | |
| const XMLNamespaces_t * | Unit_getNamespaces (Unit_t *u) |
| Returns a list of XMLNamespaces_t associated with this Unit_t structure. | |
| double | Unit_getOffset (const Unit_t *u) |
Returns the value of the "offset" attribute of the given Unit_t structure u. | |
| int | Unit_getScale (const Unit_t *u) |
Returns the value of the "scale" attribute of the given Unit_t structure u. | |
| int | Unit_hasRequiredAttributes (Unit_t *u) |
Predicate returning true or false depending on whether all the required attributes for this Unit object have been set. | |
| void | Unit_initDefaults (Unit_t *u) |
| Initializes the attributes of this Unit (except for "kind") to their defaults values. | |
| int | Unit_isAmpere (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind ampere. | |
| int | Unit_isBecquerel (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind becquerel. | |
| int | Unit_isBuiltIn (const char *name, unsigned int level) |
| Predicate to test whether a given string is the name of a built-in SBML unit. | |
| int | Unit_isCandela (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind candela. | |
| int | Unit_isCelsius (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind Celsius. | |
| int | Unit_isCoulomb (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind coulomb. | |
| int | Unit_isDimensionless (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind dimensionless. | |
| int | Unit_isFarad (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind farad. | |
| int | Unit_isGram (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind gram. | |
| int | Unit_isGray (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind gray. | |
| int | Unit_isHenry (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind henry. | |
| int | Unit_isHertz (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind hertz. | |
| int | Unit_isItem (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind item. | |
| int | Unit_isJoule (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind joule. | |
| int | Unit_isKatal (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind katal. | |
| int | Unit_isKelvin (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind kelvin. | |
| int | Unit_isKilogram (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind kilogram. | |
| int | Unit_isLitre (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind litre or liter. | |
| int | Unit_isLumen (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind lumen. | |
| int | Unit_isLux (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind lux. | |
| int | Unit_isMetre (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind metre or meter. | |
| int | Unit_isMole (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind mole. | |
| int | Unit_isNewton (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind newton. | |
| int | Unit_isOhm (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind ohm. | |
| int | Unit_isPascal (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind pascal. | |
| int | Unit_isRadian (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind radian. | |
| int | Unit_isSecond (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind second. | |
| int | Unit_isSetExponent (const Unit_t *u) |
Predicate to test whether the "exponent" attribute of the given Unit_t structure u is set. | |
| int | Unit_isSetKind (const Unit_t *u) |
Predicate to test whether the "kind" attribute of the given Unit_t structure u is set. | |
| int | Unit_isSetMultiplier (const Unit_t *u) |
Predicate to test whether the "multiplier" attribute of the given Unit_t structure u is set. | |
| int | Unit_isSetScale (const Unit_t *u) |
Predicate to test whether the "scale" attribute of the given Unit_t structure u is set. | |
| int | Unit_isSiemens (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind siemens. | |
| int | Unit_isSievert (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind sievert. | |
| int | Unit_isSteradian (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind steradian. | |
| int | Unit_isTesla (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind tesla. | |
| int | Unit_isVolt (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind volt. | |
| int | Unit_isWatt (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind watt. | |
| int | Unit_isWeber (const Unit_t *u) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind weber. | |
| void | Unit_merge (Unit_t *unit1, Unit_t *unit2) |
| int | Unit_removeScale (Unit_t *unit) |
| int | Unit_setExponent (Unit_t *u, int value) |
Sets the "exponent" attribute value of the given Unit_t structure u. | |
| int | Unit_setExponentAsDouble (Unit_t *u, double value) |
Sets the "exponent" attribute value of the given Unit_t structure u. | |
| int | Unit_setKind (Unit_t *u, UnitKind_t kind) |
Sets the kind of the given Unit_t structure u to the given UnitKind_t value. | |
| int | Unit_setMultiplier (Unit_t *u, double value) |
Sets the "multiplier" attribute value of the given Unit_t structure u. | |
| int | Unit_setOffset (Unit_t *u, double value) |
Sets the "offset" attribute value of the given Unit_t structure u. | |
| int | Unit_setScale (Unit_t *u, int value) |
Sets the "scale" attribute value of the given Unit_t structure u. | |
| int Unit_areEquivalent | ( | Unit_t * | unit1, |
| Unit_t * | unit2 | ||
| ) |
| int Unit_areIdentical | ( | Unit_t * | unit1, |
| Unit_t * | unit2 | ||
| ) |
| Unit_t* Unit_clone | ( | const Unit_t * | u | ) |
Creates a deep copy of the given Unit_t structure.
| u | the Unit_t structure to be copied |
| UnitDefinition_t* Unit_convertToSI | ( | Unit_t * | unit | ) |
| Unit_t* Unit_create | ( | unsigned int | level, |
| unsigned int | version | ||
| ) |
Creates a new Unit_t structure using the given SBML level and version values.
| level | an unsigned int, the SBML Level to assign to this Unit |
| version | an unsigned int, the SBML Version to assign to this Unit |
level and version for the document override those used to create the Unit. Despite this, the ability to supply the values at creation time is an important aid to creating valid SBML. Knowledge of the intended SBML Level and Version determine whether it is valid to assign a particular value to an attribute, or whether it is valid to add an object to an existing SBMLDocument. | Unit_t* Unit_createWithNS | ( | SBMLNamespaces_t * | sbmlns | ) |
Creates a new Unit_t structure using the given SBMLNamespaces_t structure.
| sbmlns | SBMLNamespaces, a pointer to an SBMLNamespaces structure to assign to this Unit |
sbmlns namespaces for the document override those used to create the Unit. Despite this, the ability to supply the values at creation time is an important aid to creating valid SBML. Knowledge of the intended SBML Level and Version determine whether it is valid to assign a particular value to an attribute, or whether it is valid to add an object to an existing SBMLDocument. | void Unit_free | ( | Unit_t * | u | ) |
Frees the given Unit_t structure.
| u | the Unit_t structure to be freed. |
| int Unit_getExponent | ( | const Unit_t * | u | ) |
Returns the value of the "exponent" attribute of the given Unit_t structure u.
| u | a Unit_t structure |
| double Unit_getExponentAsDouble | ( | const Unit_t * | u | ) |
Returns the value of the "exponent" attribute of the given Unit_t structure u.
| u | a Unit_t structure |
| UnitKind_t Unit_getKind | ( | const Unit_t * | u | ) |
Returns the "kind" attribute value of the given unit u.
| double Unit_getMultiplier | ( | const Unit_t * | u | ) |
Returns the value of the "multiplier" attribute of the given Unit_t structure u.
| u | a Unit_t structure |
| const XMLNamespaces_t* Unit_getNamespaces | ( | Unit_t * | u | ) |
Returns a list of XMLNamespaces_t associated with this Unit_t structure.
| u | the Unit_t structure |
| double Unit_getOffset | ( | const Unit_t * | u | ) |
Returns the value of the "offset" attribute of the given Unit_t structure u.
| u | a Unit_t structure |
| int Unit_getScale | ( | const Unit_t * | u | ) |
Returns the value of the "scale" attribute of the given Unit_t structure u.
| u | a Unit_t structure |
| int Unit_hasRequiredAttributes | ( | Unit_t * | u | ) |
Predicate returning true or false depending on whether all the required attributes for this Unit object have been set.
| void Unit_initDefaults | ( | Unit_t * | u | ) |
Initializes the attributes of this Unit (except for "kind") to their defaults values.
The default values are as follows:
| int Unit_isAmpere | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind ampere.
| u | the Unit_t structure to query |
"ampere", zero (0) otherwise. | int Unit_isBecquerel | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind becquerel.
| u | the Unit_t structure to query |
"becquerel", zero (0) otherwise. | int Unit_isBuiltIn | ( | const char * | name, |
| unsigned int | level | ||
| ) |
Predicate to test whether a given string is the name of a built-in SBML unit.
| name | a string to be tested against the built-in unit names |
name is one of the five SBML built-in Unit names ("substance", "volume, @c "area", @c "length"
or @c "time"), zero (0) otherwise"length" and "area" were added in Level 2 Version 1 | int Unit_isCandela | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind candela.
| u | the Unit_t structure to query |
"candela", zero (0) otherwise. | int Unit_isCelsius | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind Celsius.
| u | the Unit_t structure to query |
"Celsius", zero (0) otherwise.Celsius was removed from the list of predefined units in SBML Level 2 Version 3 at the same time that the "offset" attribute was removed from Unit definitions. LibSBML functions such as this one related to Celsius are retained for compatibility with earlier versions of SBML Level 2, but their use is strongly discouraged. | int Unit_isCoulomb | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind coulomb.
| u | the Unit_t structure to query |
"coulomb", zero (0) otherwise. | int Unit_isDimensionless | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind dimensionless.
| u | the Unit_t structure to query |
"dimensionless", zero (0) otherwise. | int Unit_isFarad | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind farad.
| u | the Unit_t structure to query |
"farad", zero (0) otherwise. | int Unit_isGram | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind gram.
| u | the Unit_t structure to query |
"gram", zero (0) otherwise. | int Unit_isGray | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind gray.
| u | the Unit_t structure to query |
"gray", zero (0) otherwise. | int Unit_isHenry | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind henry.
| u | the Unit_t structure to query |
"henry", zero (0) otherwise. | int Unit_isHertz | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind hertz.
| u | the Unit_t structure to query |
"hertz", zero (0) otherwise. | int Unit_isItem | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind item.
| u | the Unit_t structure to query |
"item", zero (0) otherwise. | int Unit_isJoule | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind joule.
| u | the Unit_t structure to query |
"joule", zero (0) otherwise. | int Unit_isKatal | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind katal.
| u | the Unit_t structure to query |
"katal", zero (0) otherwise. | int Unit_isKelvin | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind kelvin.
| u | the Unit_t structure to query |
"kelvin", zero (0) otherwise. | int Unit_isKilogram | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind kilogram.
| u | the Unit_t structure to query |
"kilogram", zero (0) otherwise. | int Unit_isLitre | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind litre or liter.
| u | the Unit_t structure to query |
"litre" or "liter", zero (0) otherwise. | int Unit_isLumen | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind lumen.
| u | the Unit_t structure to query |
"lumen", zero (0) otherwise. | int Unit_isLux | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind lux.
| u | the Unit_t structure to query |
"lux", zero (0) otherwise. | int Unit_isMetre | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind metre or meter.
| u | the Unit_t structure to query |
"metre" or "meter", zero (0) otherwise. | int Unit_isMole | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind mole.
| u | the Unit_t structure to query |
"mole", zero (0) otherwise. | int Unit_isNewton | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind newton.
| u | the Unit_t structure to query |
"newton", zero (0) otherwise. | int Unit_isOhm | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind ohm.
| u | the Unit_t structure to query |
"ohm", zero (0) otherwise. | int Unit_isPascal | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind pascal.
| u | the Unit_t structure to query |
"pascal", zero (0) otherwise. | int Unit_isRadian | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind radian.
| u | the Unit_t structure to query |
"radian", zero (0) otherwise. | int Unit_isSecond | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind second.
| u | the Unit_t structure to query |
"second", zero (0) otherwise. | int Unit_isSetExponent | ( | const Unit_t * | u | ) |
Predicate to test whether the "exponent" attribute of the given Unit_t structure u is set.
| u | the Unit_t structure to query |
| int Unit_isSetKind | ( | const Unit_t * | u | ) |
Predicate to test whether the "kind" attribute of the given Unit_t structure u is set.
| u | the Unit_t structure to query |
| int Unit_isSetMultiplier | ( | const Unit_t * | u | ) |
Predicate to test whether the "multiplier" attribute of the given Unit_t structure u is set.
| u | the Unit_t structure to query |
| int Unit_isSetScale | ( | const Unit_t * | u | ) |
Predicate to test whether the "scale" attribute of the given Unit_t structure u is set.
| u | the Unit_t structure to query |
| int Unit_isSiemens | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind siemens.
| u | the Unit_t structure to query |
"siemens", zero (0) otherwise. | int Unit_isSievert | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind sievert.
| u | the Unit_t structure to query |
"sievert", zero (0) otherwise. | int Unit_isSteradian | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind steradian.
| u | the Unit_t structure to query |
"steradian", zero (0) otherwise. | int Unit_isTesla | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind tesla.
| u | the Unit_t structure to query |
"tesla", zero (0) otherwise. | int Unit_isVolt | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind volt.
| u | the Unit_t structure to query |
"volt", zero (0) otherwise. | int Unit_isWatt | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind watt.
| u | the Unit_t structure to query |
"watt", zero (0) otherwise. | int Unit_isWeber | ( | const Unit_t * | u | ) |
Predicate for testing whether the given Unit_t structure represents a unit of the kind weber.
| u | the Unit_t structure to query |
"weber", zero (0) otherwise. | void Unit_merge | ( | Unit_t * | unit1, |
| Unit_t * | unit2 | ||
| ) |
| int Unit_removeScale | ( | Unit_t * | unit | ) |
| int Unit_setExponent | ( | Unit_t * | u, |
| int | value | ||
| ) |
Sets the "exponent" attribute value of the given Unit_t structure u.
| u | the Unit_t structure whose value is to be set |
| value | the integer to which the attribute "exponent" should be set |
| int Unit_setExponentAsDouble | ( | Unit_t * | u, |
| double | value | ||
| ) |
Sets the "exponent" attribute value of the given Unit_t structure u.
| u | the Unit_t structure whose value is to be set |
| value | the double to which the attribute "exponent" should be set |
| int Unit_setKind | ( | Unit_t * | u, |
| UnitKind_t | kind | ||
| ) |
Sets the kind of the given Unit_t structure u to the given UnitKind_t value.
| u | the Unit_t structure whose value is to be set |
| kind | a value from the UnitKind_t enumeration |
| int Unit_setMultiplier | ( | Unit_t * | u, |
| double | value | ||
| ) |
Sets the "multiplier" attribute value of the given Unit_t structure u.
| u | the Unit_t structure whose value is to be set |
| value | the integer to which the attribute "multiplier" should be set |
| int Unit_setOffset | ( | Unit_t * | u, |
| double | value | ||
| ) |
Sets the "offset" attribute value of the given Unit_t structure u.
| u | the Unit_t structure whose value is to be set |
| value | the integer to which the attribute "offset" should be set |
| int Unit_setScale | ( | Unit_t * | u, |
| int | value | ||
| ) |
Sets the "scale" attribute value of the given Unit_t structure u.
| u | the Unit_t structure whose value is to be set |
| value | the integer to which the attribute "scale" should be set |