libSBML C API  5.18.0
Curve_t Class Reference

Detailed Description

layout A curve connecting elements in a diagram.

The Curve_t class describes how to connect elements in a diagram defined with the use of the “layout” package. A curve is fully specified by a mandatory listOfCurveSegments element and is used in four places in the “layout” package:

  • ReactionGlyph_t: Here it describes a curve for the center piece of a reaction.
  • GeneralGlyph_t: Here it describes a curve for the center piece of an additional relationship.

In the text above, the term 'center piece' refers to either the Curve_t element of a ReactionGlyph_t, or its BoundingBox_t.

Public Member Functions

void Curve_addCurveSegment (Curve_t *c, LineSegment_t *ls)
 Adds a LineSegment_t to a Curve_t. More...
 
Curve_tCurve_clone (const Curve_t *c)
 
Curve_tCurve_create ()
 Creates a new curve and returns the pointer to it. More...
 
CubicBezier_tCurve_createCubicBezier (Curve_t *c)
 Creates a new CubicBezier_t and adds it to the end of the list. More...
 
Curve_tCurve_createFrom (const Curve_t *temp)
 Creates a new Curve_t structure from a template. More...
 
LineSegment_tCurve_createLineSegment (Curve_t *c)
 Creates a new LineSegment_t and adds it to the end of the list. More...
 
void Curve_free (Curve_t *c)
 Frees the memory taken by the Curve_t. More...
 
LineSegment_tCurve_getCurveSegment (const Curve_t *c, unsigned int index)
 Returns the line segment with the given index. More...
 
ListOf_tCurve_getListOfCurveSegments (Curve_t *c)
 Returns the ListOf_t structure that holds all the curve segments. More...
 
unsigned int Curve_getNumCurveSegments (const Curve_t *c)
 Returns the number of line segments. More...
 
void Curve_initDefaults (Curve_t *c)
 Does nothing since no defaults are defined for Curve_t. More...
 
LineSegment_tCurve_removeCurveSegment (Curve_t *c, unsigned int index)
 Removes the curve segment with the given index. More...
 

Member Function Documentation

void Curve_addCurveSegment ( Curve_t c,
LineSegment_t ls 
)

Adds a LineSegment_t to a Curve_t.

Parameters
cthe Curve_t structure.
lsthe LineSegment_t structure to add.
Curve_t * Curve_clone ( const Curve_t c)
Returns
a (deep) copy of this Curve_t.
Parameters
cthe Curve_t structure.
Curve_t * Curve_create ( )

Creates a new curve and returns the pointer to it.

CubicBezier_t * Curve_createCubicBezier ( Curve_t c)

Creates a new CubicBezier_t and adds it to the end of the list.

A pointer to the new CubicBezier_t structure is returned.

Parameters
cthe Curve_t structure.
Curve_t * Curve_createFrom ( const Curve_t temp)

Creates a new Curve_t structure from a template.

Parameters
tempthe Curve_t structure to copy.
LineSegment_t * Curve_createLineSegment ( Curve_t c)

Creates a new LineSegment_t and adds it to the end of the list.

A pointer to the new LineSegment_t structure is returned.

Parameters
cthe Curve_t structure.
void Curve_free ( Curve_t c)

Frees the memory taken by the Curve_t.

Parameters
cthe Curve_t structure.
LineSegment_t * Curve_getCurveSegment ( const Curve_t c,
unsigned int  index 
)

Returns the line segment with the given index.

Parameters
cthe Curve_t structure.
indexthe index of the curve segment to return.
ListOf_t * Curve_getListOfCurveSegments ( Curve_t c)

Returns the ListOf_t structure that holds all the curve segments.

Parameters
cthe Curve_t structure.
unsigned int Curve_getNumCurveSegments ( const Curve_t c)

Returns the number of line segments.

Parameters
cthe Curve_t structure.
void Curve_initDefaults ( Curve_t c)

Does nothing since no defaults are defined for Curve_t.

Parameters
cthe Curve_t structure.
LineSegment_t * Curve_removeCurveSegment ( Curve_t c,
unsigned int  index 
)

Removes the curve segment with the given index.

If the index is invalid, nothing is done.

Parameters
cthe Curve_t structure.
indexthe index of the curve segment to remove.