libSBML C API  5.18.0
SpeciesReferenceGlyph_t Class Reference

Detailed Description

layout A glyph for an SBML species reference.

The SpeciesReferenceGlyph element describes the graphical connection between a SpeciesGlyph_t and a ReactionGlyph_t (which would be an arrow or some curve in most cases). A SpeciesReferenceGlyph_t inherits from GraphicalObject_t, and adds a mandatory attribute 'speciesGlyph' and two optional attributes 'speciesReference' and 'role'. Optionally, the SpeciesReferenceGlyph_t also has a child element 'curve'.

If the curve is specified, it overrides the inherited bounding box.

Public Member Functions

SpeciesReferenceGlyph_tSpeciesReferenceGlyph_clone (const SpeciesReferenceGlyph_t *srg)
 
SpeciesReferenceGlyph_tSpeciesReferenceGlyph_create (void)
 Creates a new SpeciesReferenceGlyph_t structure and returns a pointer to it. More...
 
CubicBezier_tSpeciesReferenceGlyph_createCubicBezier (SpeciesReferenceGlyph_t *srg)
 Creates a new CubicBezier_t structure, adds it to the end of the list of curve segments of the curve and returns a reference to the newly created structure. More...
 
SpeciesReferenceGlyph_tSpeciesReferenceGlyph_createFrom (const SpeciesReferenceGlyph_t *temp)
 Creates a new SpeciesReferenceGlyph_t from a template. More...
 
LineSegment_tSpeciesReferenceGlyph_createLineSegment (SpeciesReferenceGlyph_t *srg)
 Creates a new LineSegment_t structure, adds it to the end of the list of curve segment of the curve and returns a reference to the newly created structure. More...
 
SpeciesReferenceGlyph_tSpeciesReferenceGlyph_createWith (const char *sid, const char *speciesGlyphId, const char *speciesReferenceId, SpeciesReferenceRole_t role)
 Creates a new SpeciesReferenceGlyph_t structure. More...
 
void SpeciesReferenceGlyph_free (SpeciesReferenceGlyph_t *srg)
 Frees the memory for the SpeciesReferenceGlyph_t. More...
 
Curve_tSpeciesReferenceGlyph_getCurve (SpeciesReferenceGlyph_t *srg)
 Gets the Curve_t for the given species reference glyph. More...
 
const char * SpeciesReferenceGlyph_getId (const SpeciesReferenceGlyph_t *srg)
 Returns the id. More...
 
SpeciesReferenceRole_t SpeciesReferenceGlyph_getRole (const SpeciesReferenceGlyph_t *srg)
 Returns the role of the species reference. More...
 
const char * SpeciesReferenceGlyph_getRoleString (const SpeciesReferenceGlyph_t *srg)
 Returns a string representation of the role of the species reference. More...
 
const char * SpeciesReferenceGlyph_getSpeciesGlyphId (const SpeciesReferenceGlyph_t *srg)
 Gets the reference species id for the given species glyph. More...
 
const char * SpeciesReferenceGlyph_getSpeciesReferenceId (const SpeciesReferenceGlyph_t *srg)
 Gets the reference species id for the given species glyph. More...
 
void SpeciesReferenceGlyph_initDefaults (SpeciesReferenceGlyph_t *srg)
 Calls initDefaults on GraphicalObject_t and sets role to SPECIES_ROLE_INVALID. More...
 
int SpeciesReferenceGlyph_isSetCurve (SpeciesReferenceGlyph_t *srg)
 Returns 1 (true) if the Curve_t has one or more LineSegment_t's. More...
 
int SpeciesReferenceGlyph_isSetId (const SpeciesReferenceGlyph_t *srg)
 Returns 1 (true) if the id is set. More...
 
int SpeciesReferenceGlyph_isSetRole (const SpeciesReferenceGlyph_t *srg)
 Returns 1 (true) if the role is not SPECIES_ROLE_INVALID. More...
 
int SpeciesReferenceGlyph_isSetSpeciesGlyphId (const SpeciesReferenceGlyph_t *srg)
 Returns 0 (false) if the reference species reference has not been set for this glyph and 1 (true) otherwise. More...
 
int SpeciesReferenceGlyph_isSetSpeciesReferenceId (const SpeciesReferenceGlyph_t *srg)
 Returns 0 (false) if the reference species reference has not been set for this glyph and 1 (true) otherwise. More...
 
void SpeciesReferenceGlyph_setCurve (SpeciesReferenceGlyph_t *srg, Curve_t *c)
 Sets the curve for the species reference glyph. More...
 
int SpeciesReferenceGlyph_setId (SpeciesReferenceGlyph_t *srg, const char *sid)
 Sets the id. More...
 
void SpeciesReferenceGlyph_setRole (SpeciesReferenceGlyph_t *srg, const char *r)
 Sets the role of the species reference glyph based on the string. More...
 
void SpeciesReferenceGlyph_setSpeciesGlyphId (SpeciesReferenceGlyph_t *srg, const char *id)
 Sets the species glyph reference for the species glyph. More...
 
void SpeciesReferenceGlyph_setSpeciesReferenceId (SpeciesReferenceGlyph_t *srg, const char *id)
 Sets the reference species for the species glyph. More...
 
void SpeciesReferenceGlyph_unsetId (SpeciesReferenceGlyph_t *srg)
 Unsets the id. More...
 

Member Function Documentation

SpeciesReferenceGlyph_t * SpeciesReferenceGlyph_clone ( const SpeciesReferenceGlyph_t srg)
Returns
a (deep) copy of this SpeciesReferenceGlyph_t.
Parameters
srgthe SpeciesReferenceGlyph_t structure.
SpeciesReferenceGlyph_t * SpeciesReferenceGlyph_create ( void  )

Creates a new SpeciesReferenceGlyph_t structure and returns a pointer to it.

CubicBezier_t * SpeciesReferenceGlyph_createCubicBezier ( SpeciesReferenceGlyph_t srg)

Creates a new CubicBezier_t structure, adds it to the end of the list of curve segments of the curve and returns a reference to the newly created structure.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
SpeciesReferenceGlyph_t * SpeciesReferenceGlyph_createFrom ( const SpeciesReferenceGlyph_t temp)

Creates a new SpeciesReferenceGlyph_t from a template.

Parameters
tempthe SpeciesReferenceGlyph_t structure to copy.
LineSegment_t * SpeciesReferenceGlyph_createLineSegment ( SpeciesReferenceGlyph_t srg)

Creates a new LineSegment_t structure, adds it to the end of the list of curve segment of the curve and returns a reference to the newly created structure.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
SpeciesReferenceGlyph_t * SpeciesReferenceGlyph_createWith ( const char *  sid,
const char *  speciesGlyphId,
const char *  speciesReferenceId,
SpeciesReferenceRole_t  role 
)

Creates a new SpeciesReferenceGlyph_t structure.

The id is given as the first argument, the id of the associated species glyph is given as the second argument. The third argument is the id of the associated species reference and the fourth argument is the role.

Parameters
sidthe string to use as the ID of the SpeciesReferenceGlyph_t.
speciesGlyphIdthe string to use as the species glyph.
speciesReferenceIdthe string to use as the species reference.
rolethe role of the created SpeciesReferenceGlyph_t.
void SpeciesReferenceGlyph_free ( SpeciesReferenceGlyph_t srg)

Frees the memory for the SpeciesReferenceGlyph_t.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
Curve_t * SpeciesReferenceGlyph_getCurve ( SpeciesReferenceGlyph_t srg)

Gets the Curve_t for the given species reference glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
const char * SpeciesReferenceGlyph_getId ( const SpeciesReferenceGlyph_t srg)

Returns the id.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
SpeciesReferenceRole_t SpeciesReferenceGlyph_getRole ( const SpeciesReferenceGlyph_t srg)

Returns the role of the species reference.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
const char * SpeciesReferenceGlyph_getRoleString ( const SpeciesReferenceGlyph_t srg)

Returns a string representation of the role of the species reference.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
const char * SpeciesReferenceGlyph_getSpeciesGlyphId ( const SpeciesReferenceGlyph_t srg)

Gets the reference species id for the given species glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
const char * SpeciesReferenceGlyph_getSpeciesReferenceId ( const SpeciesReferenceGlyph_t srg)

Gets the reference species id for the given species glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
void SpeciesReferenceGlyph_initDefaults ( SpeciesReferenceGlyph_t srg)

Calls initDefaults on GraphicalObject_t and sets role to SPECIES_ROLE_INVALID.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
int SpeciesReferenceGlyph_isSetCurve ( SpeciesReferenceGlyph_t srg)

Returns 1 (true) if the Curve_t has one or more LineSegment_t's.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
int SpeciesReferenceGlyph_isSetId ( const SpeciesReferenceGlyph_t srg)

Returns 1 (true) if the id is set.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
int SpeciesReferenceGlyph_isSetRole ( const SpeciesReferenceGlyph_t srg)

Returns 1 (true) if the role is not SPECIES_ROLE_INVALID.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
int SpeciesReferenceGlyph_isSetSpeciesGlyphId ( const SpeciesReferenceGlyph_t srg)

Returns 0 (false) if the reference species reference has not been set for this glyph and 1 (true) otherwise.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
int SpeciesReferenceGlyph_isSetSpeciesReferenceId ( const SpeciesReferenceGlyph_t srg)

Returns 0 (false) if the reference species reference has not been set for this glyph and 1 (true) otherwise.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
void SpeciesReferenceGlyph_setCurve ( SpeciesReferenceGlyph_t srg,
Curve_t c 
)

Sets the curve for the species reference glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
cthe Curve_t to set for the SpeciesReferenceGlyph_t.
int SpeciesReferenceGlyph_setId ( SpeciesReferenceGlyph_t srg,
const char *  sid 
)

Sets the id.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
sidthe string to use as the ID of the SpeciesReferenceGlyph_t.
void SpeciesReferenceGlyph_setRole ( SpeciesReferenceGlyph_t srg,
const char *  r 
)

Sets the role of the species reference glyph based on the string.

The string can be one of:

If it is none of those, the role is set to SPECIES_ROLE_INVALID.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
rthe role to use for the SpeciesReferenceGlyph_t.
void SpeciesReferenceGlyph_setSpeciesGlyphId ( SpeciesReferenceGlyph_t srg,
const char *  id 
)

Sets the species glyph reference for the species glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
idthe string to use as the species glyph.
void SpeciesReferenceGlyph_setSpeciesReferenceId ( SpeciesReferenceGlyph_t srg,
const char *  id 
)

Sets the reference species for the species glyph.

Parameters
srgthe SpeciesReferenceGlyph_t structure.
idthe string to use as the species reference.
void SpeciesReferenceGlyph_unsetId ( SpeciesReferenceGlyph_t srg)

Unsets the id.

Parameters
srgthe SpeciesReferenceGlyph_t structure.