libSBML Perl API  libSBML 5.10.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
doc_localparameter_units Class Reference

Detailed Description

LocalParameters in SBML have an attribute ("units") for declaring the units of measurement intended for the parameter's value. No defaults are defined by SBML in the absence of a definition for "units". This method returns a UnitDefinition object based on the units declared for this LocalParameter using its "units" attribute, or it returns NULL if no units have been declared.

Note that unit declarations for LocalParameter objects are specified in terms of the identifier of a unit (e.g., using setUnits()), but this method returns a UnitDefinition object, not a unit identifier. It does this by constructing an appropriate UnitDefinition. For SBML Level 2 models, it will do this even when the value of the "units" attribute is one of the predefined SBML units "substance", "volume", "area", "length" or "time". Callers may find this useful in conjunction with the helper methods provided by the UnitDefinition class for comparing different UnitDefinition objects.