libSBML C# API  libSBML 5.10.0 C# API
 All Classes Namespaces Files Functions Variables Properties Pages
libsbmlcs.RelAbsVector Class Reference
Inheritance diagram for libsbmlcs.RelAbsVector:
[legend]

Detailed Description

This class represents a pair of numerical values where one value represents an absolute value and the other value is a relative value in percent.

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.

The relative and absolute values to initialize a RelAbsVector 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

virtual void Dispose ()
 
double getAbsoluteValue ()
 Returns the absolute coordinate value. More...
 
double getRelativeValue ()
 Returns the relative coordinate value. More...
 
 RelAbsVector (double a, double r)
 Constructor with two values. More...
 
 RelAbsVector (double a)
 Constructor with two values. More...
 
 RelAbsVector ()
 Constructor with two values. More...
 
 RelAbsVector (string coordString)
 Constructor with a value string. More...
 
void setAbsoluteValue (double abs)
 Sets the absolute coordinate value. More...
 
void setCoordinate (double abs, double rel)
 Sets the relative and absolute value. More...
 
void setCoordinate (double abs)
 Sets the relative and absolute value. More...
 
void setCoordinate (string coordString)
 Sets the coordinatees from the given string. More...
 
void setRelativeValue (double rel)
 Sets the relative coordinate value. More...
 

Protected Attributes

bool swigCMemOwn
 

Constructor & Destructor Documentation

libsbmlcs.RelAbsVector.RelAbsVector ( double  a,
double  r 
)

Constructor with two values.

First value sets the absolute value, second sets the relative value (%).

Parameters
aabsolute value
arelative value in % (50 -> 50%)
libsbmlcs.RelAbsVector.RelAbsVector ( double  a)

Constructor with two values.

First value sets the absolute value, second sets the relative value (%).

Parameters
aabsolute value
arelative value in % (50 -> 50%)
libsbmlcs.RelAbsVector.RelAbsVector ( )

Constructor with two values.

First value sets the absolute value, second sets the relative value (%).

Parameters
aabsolute value
arelative value in % (50 -> 50%)
libsbmlcs.RelAbsVector.RelAbsVector ( string  coordString)

Constructor with a value string.

If the string does not represent a valid value, the relative and the absolute component of the RelAbsVector are set to NaN.

Member Function Documentation

virtual void libsbmlcs.RelAbsVector.Dispose ( )
virtual
double libsbmlcs.RelAbsVector.getAbsoluteValue ( )

Returns the absolute coordinate value.

Returns
absolute value
double libsbmlcs.RelAbsVector.getRelativeValue ( )

Returns the relative coordinate value.

Returns
absolute value
void libsbmlcs.RelAbsVector.setAbsoluteValue ( double  abs)

Sets the absolute coordinate value.

Parameters
absabsolute value to be set
void libsbmlcs.RelAbsVector.setCoordinate ( double  abs,
double  rel 
)

Sets the relative and absolute value.

Parameters
absabsolute value
relrelative value. If the relative value is omitted, it is set to 0.
void libsbmlcs.RelAbsVector.setCoordinate ( double  abs)

Sets the relative and absolute value.

Parameters
absabsolute value
relrelative value. If the relative value is omitted, it is set to 0.
void libsbmlcs.RelAbsVector.setCoordinate ( string  coordString)

Sets the coordinatees from the given string.

If the string does not represent a valid value, the relative and the absolute component of the RelAbsVector are set to NaN.

Parameters
coordStringvalue string
void libsbmlcs.RelAbsVector.setRelativeValue ( double  rel)

Sets the relative coordinate value.

Parameters
relrelative value to be set

Member Data Documentation

bool libsbmlcs.RelAbsVector.swigCMemOwn
protected