libSBML C# API  5.18.0
libsbmlcs.RelAbsVector Class Reference
Inheritance diagram for libsbmlcs.RelAbsVector:
[legend]

Detailed Description

render Vectors with an absolute value and a relative value.

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 RelAbsVector 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 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

new RelAbsVector clone ()
 Creates and returns a deep copy of this RelAbsVector object. More...
 
virtual void Dispose ()
 
bool empty ()
 
void erase ()
 resets this element by setting the two coordinates to 0.0 More...
 
double getAbsoluteValue ()
 Returns the absolute coordinate value. More...
 
string getCoordinate ()
 Returns the coordinate value. More...
 
double getRelativeValue ()
 Returns the relative coordinate value. More...
 
bool isSetAbsoluteValue ()
 Predicate returning true if this RelAbsVector's 'abs' attribute is set. More...
 
bool isSetCoordinate ()
 Predicate returning true if this RelAbsVector's coordinate attribute is set. More...
 
bool isSetRelativeValue ()
 Predicate returning true if this RelAbsVector's 'rel' attribute is set. 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...
 
 RelAbsVector (RelAbsVector orig)
 Copy constructor for RelAbsVector. More...
 
int setAbsoluteValue (double abs)
 Sets the absolute coordinate value. More...
 
int setCoordinate (double abs, double rel)
 Sets the relative and absolute value. More...
 
int setCoordinate (double abs)
 Sets the relative and absolute value. More...
 
int setCoordinate (string coordString)
 Sets the coordinates from the given string. More...
 
int setRelativeValue (double rel)
 Sets the relative coordinate value. More...
 
string toString ()
 
int unsetAbsoluteValue ()
 Unsets the value of the 'abs' attribute of this RelAbsVector. More...
 
int unsetCoordinate ()
 Unsets the value of the 'rel' attribute of this RelAbsVector. More...
 
int unsetRelativeValue ()
 Unsets the value of the relative coordinate attribute of this RelAbsVector. 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
rrelative 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
rrelative 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
rrelative 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.

Parameters
coordStringvalue as a string
libsbmlcs.RelAbsVector.RelAbsVector ( RelAbsVector  orig)

Copy constructor for RelAbsVector.

Parameters
origthe RelAbsVector instance to copy.

Member Function Documentation

new RelAbsVector libsbmlcs.RelAbsVector.clone ( )

Creates and returns a deep copy of this RelAbsVector object.

Returns
a (deep) copy of this RelAbsVector object.
virtual void libsbmlcs.RelAbsVector.Dispose ( )
virtual
bool libsbmlcs.RelAbsVector.empty ( )
Returns
an indication whether this element has been set (i.e., no zero entries for either relative or absolute coordinate)
void libsbmlcs.RelAbsVector.erase ( )

resets this element by setting the two coordinates to 0.0

double libsbmlcs.RelAbsVector.getAbsoluteValue ( )

Returns the absolute coordinate value.

Returns
absolute value
string libsbmlcs.RelAbsVector.getCoordinate ( )

Returns the coordinate value.

Returns
absolute value
double libsbmlcs.RelAbsVector.getRelativeValue ( )

Returns the relative coordinate value.

Returns
absolute value
bool libsbmlcs.RelAbsVector.isSetAbsoluteValue ( )

Predicate returning true if this RelAbsVector's 'abs' attribute is set.

Returns
true if this RelAbsVector's 'abs' attribute has been set, otherwise false is returned.
bool libsbmlcs.RelAbsVector.isSetCoordinate ( )

Predicate returning true if this RelAbsVector's coordinate attribute is set.

Returns
true if this RelAbsVector's coordinate attribute has been set, otherwise false is returned.
bool libsbmlcs.RelAbsVector.isSetRelativeValue ( )

Predicate returning true if this RelAbsVector's 'rel' attribute is set.

Returns
true if this RelAbsVector's 'rel' attribute has been set, otherwise false is returned.
int libsbmlcs.RelAbsVector.setAbsoluteValue ( double  abs)

Sets the absolute coordinate value.

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

Parameters
absdouble value of the 'abs' attribute to be set.
int libsbmlcs.RelAbsVector.setCoordinate ( double  abs,
double  rel 
)

Sets the relative and absolute value.

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

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

Sets the relative and absolute value.

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

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

Sets the coordinates 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.

Calling this function with either cooredinate having a value of '0.0' or 'NaN' is equivalent to unsetting the value.

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

Sets the relative coordinate value.

Calling this function with an argument of 0.0 or NaN is equivalent to unsetting the value.

Parameters
reldouble value of the 'rel' attribute to be set.
string libsbmlcs.RelAbsVector.toString ( )
Returns
a string representation of this object
int libsbmlcs.RelAbsVector.unsetAbsoluteValue ( )

Unsets the value of the 'abs' attribute of this RelAbsVector.

Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:
int libsbmlcs.RelAbsVector.unsetCoordinate ( )

Unsets the value of the 'rel' attribute of this RelAbsVector.

Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:
int libsbmlcs.RelAbsVector.unsetRelativeValue ( )

Unsets the value of the relative coordinate attribute of this RelAbsVector.

Returns
integer value indicating success/failure of the function. This particular function only does one thing irrespective of user input or object state, and thus will only return a single value:

Member Data Documentation

bool libsbmlcs.RelAbsVector.swigCMemOwn
protected