libSBML C API  5.18.0
GeneralGlyph_t Class Reference

Detailed Description

layout A glyph for miscellaneous items.

The GeneralGlyph_t is used to facilitate the representation of elements other than Compartment_t, Species_t and Reaction_t and thus can be used for the display of relationships of Rule_t or elements defined by other SBML packages. It closely follows the structure of the ReactionGlyph_t. GeneralGlyph_t is defined to have an optional attribute reference as well as the elements curve, listOfReferenceGlyphs and listOfSubGlyphs.

Public Member Functions

void GeneralGlyph_addReferenceGlyph (GeneralGlyph_t *gg, ReferenceGlyph_t *srg)
 Add a ReferenceGlyph_t object to the list of ReferenceGlyph_t's. More...
 
GeneralGlyph_tGeneralGlyph_clone (const GeneralGlyph_t *gg)
 
GeneralGlyph_tGeneralGlyph_create (void)
 Creates a new GeneralGlyph_t and returns the pointer to it. More...
 
CubicBezier_tGeneralGlyph_createCubicBezier (GeneralGlyph_t *gg)
 Creates a new CubicBezier_t structure, adds it to the end of the list of curve segments and returns a pointer to the newly created structure. More...
 
GeneralGlyph_tGeneralGlyph_createFrom (const GeneralGlyph_t *temp)
 Creates a new GeneralGlyph_t structure from a template. More...
 
LineSegment_tGeneralGlyph_createLineSegment (GeneralGlyph_t *gg)
 Creates a new LineSegment_t structure, adds it to the end of the list of curve segments and returns a pointer to the newly created structure. More...
 
ReferenceGlyph_tGeneralGlyph_createReferenceGlyph (GeneralGlyph_t *gg)
 Creates a new ReferenceGlyph_t structure, adds it to the end of the list of reference glyphs and returns a pointer to the newly created structure. More...
 
GeneralGlyph_tGeneralGlyph_createWith (const char *sid)
 Creates a new GeneralGlyph_t with the given sid. More...
 
GeneralGlyph_tGeneralGlyph_createWithReferenceId (const char *sid, const char *referenceId)
 Creates a new GeneralGlyph_t referencing the given element. More...
 
void GeneralGlyph_free (GeneralGlyph_t *gg)
 Frees the memory taken by the given glyph. More...
 
Curve_tGeneralGlyph_getCurve (GeneralGlyph_t *gg)
 Gets the Curve_t for the given reaction glyph. More...
 
unsigned int GeneralGlyph_getIndexForReferenceGlyph (GeneralGlyph_t *gg, const char *id)
 Returns the index of the reference glyph with the given id. More...
 
ListOf_tGeneralGlyph_getListOfReferenceGlyphs (GeneralGlyph_t *gg)
 Returns the list object that holds all reference glyphs. More...
 
unsigned int GeneralGlyph_getNumReferenceGlyphs (const GeneralGlyph_t *gg)
 Returns the number of ReferenceGlyphs for the GeneralGlyph_t. More...
 
ReferenceGlyph_tGeneralGlyph_getReferenceGlyph (GeneralGlyph_t *gg, unsigned int index)
 Returns the pointer to the ReferenceGlyph_t for the given index. More...
 
const char * GeneralGlyph_getReferenceId (const GeneralGlyph_t *gg)
 Gets the reference id for the given glyph. More...
 
void GeneralGlyph_initDefaults (GeneralGlyph_t *gg)
 Calls initDefaults from GraphicalObject_t. More...
 
int GeneralGlyph_isSetCurve (GeneralGlyph_t *gg)
 Returns true if the Curve_t has one or more LineSegment_t. More...
 
int GeneralGlyph_isSetReferenceId (const GeneralGlyph_t *gg)
 Returns 0 (false) if the reference element has not been set for this glyph and 1 (true) otherwise. More...
 
ReferenceGlyph_tGeneralGlyph_removeReferenceGlyph (GeneralGlyph_t *gg, unsigned int index)
 Remove the reference glyph with the given index. More...
 
ReferenceGlyph_tGeneralGlyph_removeReferenceGlyphWithId (GeneralGlyph_t *gg, const char *id)
 Remove the reference glyph with the given id. More...
 
void GeneralGlyph_setCurve (GeneralGlyph_t *gg, Curve_t *c)
 Sets the curve for the reaction glyph. More...
 
void GeneralGlyph_setReferenceId (GeneralGlyph_t *gg, const char *id)
 Sets the reference for the glyph. More...
 

Member Function Documentation

void GeneralGlyph_addReferenceGlyph ( GeneralGlyph_t gg,
ReferenceGlyph_t srg 
)

Add a ReferenceGlyph_t object to the list of ReferenceGlyph_t's.

Parameters
ggthe GeneralGlyph_t structure.
srgthe ReferenceGlyph_t structure to add.
GeneralGlyph_t * GeneralGlyph_clone ( const GeneralGlyph_t gg)
Returns
a (deep) copy of this GeneralGlyph_t.
Parameters
ggthe GeneralGlyph_t structure.
GeneralGlyph_t * GeneralGlyph_create ( void  )

Creates a new GeneralGlyph_t and returns the pointer to it.

CubicBezier_t * GeneralGlyph_createCubicBezier ( GeneralGlyph_t gg)

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

Parameters
ggthe GeneralGlyph_t structure.
GeneralGlyph_t * GeneralGlyph_createFrom ( const GeneralGlyph_t temp)

Creates a new GeneralGlyph_t structure from a template.

Parameters
tempthe GeneralGlyph_t structure to copy.
LineSegment_t * GeneralGlyph_createLineSegment ( GeneralGlyph_t gg)

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

Parameters
ggthe GeneralGlyph_t structure.
ReferenceGlyph_t * GeneralGlyph_createReferenceGlyph ( GeneralGlyph_t gg)

Creates a new ReferenceGlyph_t structure, adds it to the end of the list of reference glyphs and returns a pointer to the newly created structure.

Parameters
ggthe GeneralGlyph_t structure.
GeneralGlyph_t * GeneralGlyph_createWith ( const char *  sid)

Creates a new GeneralGlyph_t with the given sid.

Parameters
sidthe id of the created SpeciesGlyph_t.
GeneralGlyph_t * GeneralGlyph_createWithReferenceId ( const char *  sid,
const char *  referenceId 
)

Creates a new GeneralGlyph_t referencing the given element.

Parameters
sidthe id of the created SpeciesGlyph_t.
referenceIdthe referenceId of the created SpeciesGlyph_t.
void GeneralGlyph_free ( GeneralGlyph_t gg)

Frees the memory taken by the given glyph.

Parameters
ggthe GeneralGlyph_t structure.
Curve_t * GeneralGlyph_getCurve ( GeneralGlyph_t gg)

Gets the Curve_t for the given reaction glyph.

Parameters
ggthe GeneralGlyph_t structure.
unsigned int GeneralGlyph_getIndexForReferenceGlyph ( GeneralGlyph_t gg,
const char *  id 
)

Returns the index of the reference glyph with the given id.

If the reaction glyph does not contain a reference glyph with this id, UINT_MAX from limits.h is returned.

Parameters
ggthe GeneralGlyph_t structure.
idthe id of the ReferenceGlyph_t to search for.
ListOf_t * GeneralGlyph_getListOfReferenceGlyphs ( GeneralGlyph_t gg)

Returns the list object that holds all reference glyphs.

Parameters
ggthe GeneralGlyph_t structure.
unsigned int GeneralGlyph_getNumReferenceGlyphs ( const GeneralGlyph_t gg)

Returns the number of ReferenceGlyphs for the GeneralGlyph_t.

Parameters
ggthe GeneralGlyph_t structure.
ReferenceGlyph_t * GeneralGlyph_getReferenceGlyph ( GeneralGlyph_t gg,
unsigned int  index 
)

Returns the pointer to the ReferenceGlyph_t for the given index.

Parameters
ggthe GeneralGlyph_t structure.
indexthe index of the ReferenceGlyph_t structure to return.
const char * GeneralGlyph_getReferenceId ( const GeneralGlyph_t gg)

Gets the reference id for the given glyph.

Parameters
ggthe GeneralGlyph_t structure.
void GeneralGlyph_initDefaults ( GeneralGlyph_t gg)

Calls initDefaults from GraphicalObject_t.

Parameters
ggthe GeneralGlyph_t structure.
int GeneralGlyph_isSetCurve ( GeneralGlyph_t gg)

Returns true if the Curve_t has one or more LineSegment_t.

Parameters
ggthe GeneralGlyph_t structure.
int GeneralGlyph_isSetReferenceId ( const GeneralGlyph_t gg)

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

Parameters
ggthe GeneralGlyph_t structure.
ReferenceGlyph_t * GeneralGlyph_removeReferenceGlyph ( GeneralGlyph_t gg,
unsigned int  index 
)

Remove the reference glyph with the given index.

A pointer to the structure is returned. If no structure has been removed, NULL is returned.

Parameters
ggthe GeneralGlyph_t structure.
indexthe index of the ReferenceGlyph_t structure to remove.
ReferenceGlyph_t * GeneralGlyph_removeReferenceGlyphWithId ( GeneralGlyph_t gg,
const char *  id 
)

Remove the reference glyph with the given id.

A pointer to the structure is returned. If no structure has been removed, NULL is returned.

Parameters
ggthe GeneralGlyph_t structure.
idthe id of the ReferenceGlyph_t structure to remove.
void GeneralGlyph_setCurve ( GeneralGlyph_t gg,
Curve_t c 
)

Sets the curve for the reaction glyph.

Parameters
ggthe GeneralGlyph_t structure.
cthe Curve_t structure to use.
void GeneralGlyph_setReferenceId ( GeneralGlyph_t gg,
const char *  id 
)

Sets the reference for the glyph.

Parameters
ggthe GeneralGlyph_t structure.
idthe string to use as the referenceId of the GeneralGlyph_t.