|
libSBML C API
5.18.0
|
For many elements in the render extension, it is necessary to specify coordinates not in terms of absolute values, but rather in terms of relative values or even a combination of absolute and relative values. Such a pair of values where one represents an absolute value and the other represents a relative value can be expressed by a RelAbsVector_t. The RelAbsVector_t class represents a pair of numerical values where one value represents an absolute value and the other value is a relative value in percent.
The relative and absolute values to initialize a RelAbsVector_t object can either be given as numerical datatypes (double) or as a valid value string. A value string is a combination of an absolute value and a relative value and the absolute value if given has to come first. So valid value strings would be: "5.0e3+20%", or "100%" or "4".
Public Member Functions | |
| RelAbsVector_t * | RelAbsVector_clone (const RelAbsVector_t *rav) |
| Creates and returns a deep copy of this RelAbsVector_t object. More... | |
| RelAbsVector_t * | RelAbsVector_create (double abs, double rel) |
| Creates a new RelAbsVector_t . More... | |
| void | RelAbsVector_free (RelAbsVector_t *rav) |
| Frees this RelAbsVector_t object. More... | |
| double | RelAbsVector_getAbsoluteValue (const RelAbsVector_t *rav) |
| Returns the value of the "abs" attribute of this RelAbsVector_t. More... | |
| double | RelAbsVector_getRelativeValue (const RelAbsVector_t *rav) |
| Returns the value of the "rel" attribute of this RelAbsVector_t. More... | |
| int | RelAbsVector_isSetAbsoluteValue (const RelAbsVector_t *rav) |
Predicate returning 1 (true) if this RelAbsVector_t's "abs" attribute is set. More... | |
| int | RelAbsVector_isSetRelativeValue (const RelAbsVector_t *rav) |
Predicate returning 1 (true) if this RelAbsVector_t's "rel" attribute is set. More... | |
| int | RelAbsVector_setAbsoluteValue (RelAbsVector_t *rav, double abs) |
| Sets the value of the "abs" attribute of this RelAbsVector_t. More... | |
| int | RelAbsVector_setRelativeValue (RelAbsVector_t *rav, double rel) |
| Sets the value of the "rel" attribute of this RelAbsVector_t. More... | |
| int | RelAbsVector_unsetAbsoluteValue (RelAbsVector_t *rav) |
| Unsets the value of the "abs" attribute of this RelAbsVector_t. More... | |
| int | RelAbsVector_unsetRelativeValue (RelAbsVector_t *rav) |
| Unsets the value of the "rel" attribute of this RelAbsVector_t. More... | |
| RelAbsVector_t * RelAbsVector_clone | ( | const RelAbsVector_t * | rav | ) |
Creates and returns a deep copy of this RelAbsVector_t object.
| rav | the RelAbsVector_t structure. |
| RelAbsVector_t * RelAbsVector_create | ( | double | abs, |
| double | rel | ||
| ) |
Creates a new RelAbsVector_t .
| abs | a double, the absolute value to assign to this RelAbsVector_t. |
| rel | a double, the relative value to assign to this RelAbsVector_t. |
| void RelAbsVector_free | ( | RelAbsVector_t * | rav | ) |
Frees this RelAbsVector_t object.
| rav | the RelAbsVector_t structure. |
| double RelAbsVector_getAbsoluteValue | ( | const RelAbsVector_t * | rav | ) |
Returns the value of the "abs" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure whose abs is sought. |
| double RelAbsVector_getRelativeValue | ( | const RelAbsVector_t * | rav | ) |
Returns the value of the "rel" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure whose rel is sought. |
| int RelAbsVector_isSetAbsoluteValue | ( | const RelAbsVector_t * | rav | ) |
Predicate returning 1 (true) if this RelAbsVector_t's "abs" attribute is set.
| rav | the RelAbsVector_t structure. |
1 (true) if this RelAbsVector_t's "abs" attribute has been set, otherwise 0 (false) is returned. | int RelAbsVector_isSetRelativeValue | ( | const RelAbsVector_t * | rav | ) |
Predicate returning 1 (true) if this RelAbsVector_t's "rel" attribute is set.
| rav | the RelAbsVector_t structure. |
1 (true) if this RelAbsVector_t's "rel" attribute has been set, otherwise 0 (false) is returned. | int RelAbsVector_setAbsoluteValue | ( | RelAbsVector_t * | rav, |
| double | abs | ||
| ) |
Sets the value of the "abs" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure. |
| abs | double value of the "abs" attribute to be set. |
| int RelAbsVector_setRelativeValue | ( | RelAbsVector_t * | rav, |
| double | rel | ||
| ) |
Sets the value of the "rel" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure. |
| rel | double value of the "rel" attribute to be set. |
| int RelAbsVector_unsetAbsoluteValue | ( | RelAbsVector_t * | rav | ) |
Unsets the value of the "abs" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure. |
| int RelAbsVector_unsetRelativeValue | ( | RelAbsVector_t * | rav | ) |
Unsets the value of the "rel" attribute of this RelAbsVector_t.
| rav | the RelAbsVector_t structure. |