libSBML C API  5.18.0
ReferenceGlyph_t Class Reference

Detailed Description

layout Connection between an object and a glyph.

The ReferenceGlyph_t element describes the graphical connection between an arbitrary GraphicalObject_t (or derived element) and a GeneralGlyph_t (which would be an arrow or some curve in most cases). A ReferenceGlyph_t inherits from GraphicalObject_t. Additionally it has a mandatory attribute 'glyph' and two optional attributes 'reference' and 'role'. Optionally, the ReferenceGlyph_t also has an element 'curve'. The ReferenceGlyph_t should either contain a bounding box or a curve specification. If both are given, the bounding box should be ignored.

Public Member Functions

ReferenceGlyph_tReferenceGlyph_clone (const ReferenceGlyph_t *rg)
 
ReferenceGlyph_tReferenceGlyph_create (void)
 Creates a new ReferenceGlyph_t structure and returns a pointer to it. More...
 
CubicBezier_tReferenceGlyph_createCubicBezier (ReferenceGlyph_t *rg)
 Creates a new CubicBezier_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...
 
ReferenceGlyph_tReferenceGlyph_createFrom (const ReferenceGlyph_t *temp)
 Creates a new ReferenceGlyph_t from a template. More...
 
LineSegment_tReferenceGlyph_createLineSegment (ReferenceGlyph_t *rg)
 Creates a new LineSegment_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...
 
ReferenceGlyph_tReferenceGlyph_createWith (const char *sid, const char *glyphId, const char *referenceId, const char *role)
 Creates a new ReferenceGlyph_t. More...
 
void ReferenceGlyph_free (ReferenceGlyph_t *rg)
 Frees the memory for the ReferenceGlyph_t. More...
 
Curve_tReferenceGlyph_getCurve (ReferenceGlyph_t *rg)
 Gets the Curve_t for the given reference glyph. More...
 
const char * ReferenceGlyph_getGlyphId (const ReferenceGlyph_t *rg)
 Gets the reference id for the given glyph. More...
 
const char * ReferenceGlyph_getId (const ReferenceGlyph_t *rg)
 Returns the id. More...
 
const char * ReferenceGlyph_getReferenceId (const ReferenceGlyph_t *rg)
 Gets the reference id for the given glyph. More...
 
const char * ReferenceGlyph_getRole (const ReferenceGlyph_t *rg)
 Returns the role of the reference. More...
 
void ReferenceGlyph_initDefaults (ReferenceGlyph_t *rg)
 Calls initDefaults on GraphicalObject_t. More...
 
int ReferenceGlyph_isSetCurve (ReferenceGlyph_t *rg)
 Returns true if the Curve_t has one or more LineSegment_t. More...
 
int ReferenceGlyph_isSetGlyphId (const ReferenceGlyph_t *rg)
 Returns 0 (false) if the reference has not been set for this glyph and 1 (true) otherwise. More...
 
int ReferenceGlyph_isSetId (const ReferenceGlyph_t *rg)
 Returns 1 (true) if the id is set. More...
 
int ReferenceGlyph_isSetReferenceId (const ReferenceGlyph_t *rg)
 Returns 0 (false) if the reference reference has not been set for this glyph and 1 (true) otherwise. More...
 
int ReferenceGlyph_isSetRole (const ReferenceGlyph_t *rg)
 Returns true if the role is not empty. More...
 
void ReferenceGlyph_setCurve (ReferenceGlyph_t *rg, Curve_t *c)
 Sets the curve for the reference glyph. More...
 
void ReferenceGlyph_setGlyphId (ReferenceGlyph_t *rg, const char *id)
 Sets the glyph reference for the glyph. More...
 
int ReferenceGlyph_setId (ReferenceGlyph_t *rg, const char *sid)
 Sets the id. More...
 
void ReferenceGlyph_setReferenceId (ReferenceGlyph_t *rg, const char *id)
 Sets the reference for the glyph. More...
 
void ReferenceGlyph_setRole (ReferenceGlyph_t *rg, const char *r)
 Sets the role of the reference glyph based on the string. More...
 
void ReferenceGlyph_unsetId (ReferenceGlyph_t *rg)
 Unsets the id. More...
 

Member Function Documentation

ReferenceGlyph_t * ReferenceGlyph_clone ( const ReferenceGlyph_t rg)
Returns
a (deep) copy of this ReferenceGlyph_t.
Parameters
rgthe ReferenceGlyph_t structure.
ReferenceGlyph_t * ReferenceGlyph_create ( void  )

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

CubicBezier_t * ReferenceGlyph_createCubicBezier ( ReferenceGlyph_t rg)

Creates a new CubicBezier_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
rgthe ReferenceGlyph_t structure.
ReferenceGlyph_t * ReferenceGlyph_createFrom ( const ReferenceGlyph_t temp)

Creates a new ReferenceGlyph_t from a template.

Parameters
tempthe ReferenceGlyph_t structure to copy.
LineSegment_t * ReferenceGlyph_createLineSegment ( ReferenceGlyph_t rg)

Creates a new LineSegment_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
rgthe ReferenceGlyph_t structure.
ReferenceGlyph_t * ReferenceGlyph_createWith ( const char *  sid,
const char *  glyphId,
const char *  referenceId,
const char *  role 
)

Creates a new ReferenceGlyph_t.

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

Parameters
sidthe string to use as the ID of the SpeciesReferenceGlyph_t.
glyphIdthe string to use as the glyph.
referenceIdthe string to use as the reference.
rolethe role of the created ReferenceGlyph_t.
void ReferenceGlyph_free ( ReferenceGlyph_t rg)

Frees the memory for the ReferenceGlyph_t.

Parameters
rgthe ReferenceGlyph_t structure.
Curve_t * ReferenceGlyph_getCurve ( ReferenceGlyph_t rg)

Gets the Curve_t for the given reference glyph.

Parameters
rgthe ReferenceGlyph_t structure.
const char * ReferenceGlyph_getGlyphId ( const ReferenceGlyph_t rg)

Gets the reference id for the given glyph.

Parameters
rgthe ReferenceGlyph_t structure.
const char * ReferenceGlyph_getId ( const ReferenceGlyph_t rg)

Returns the id.

Parameters
rgthe ReferenceGlyph_t structure.
const char * ReferenceGlyph_getReferenceId ( const ReferenceGlyph_t rg)

Gets the reference id for the given glyph.

Parameters
rgthe ReferenceGlyph_t structure.
const char * ReferenceGlyph_getRole ( const ReferenceGlyph_t rg)

Returns the role of the reference.

Parameters
rgthe ReferenceGlyph_t structure.
void ReferenceGlyph_initDefaults ( ReferenceGlyph_t rg)

Calls initDefaults on GraphicalObject_t.

Parameters
rgthe ReferenceGlyph_t structure.
int ReferenceGlyph_isSetCurve ( ReferenceGlyph_t rg)

Returns true if the Curve_t has one or more LineSegment_t.

Parameters
rgthe ReferenceGlyph_t structure.
int ReferenceGlyph_isSetGlyphId ( const ReferenceGlyph_t rg)

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

Parameters
rgthe ReferenceGlyph_t structure.
int ReferenceGlyph_isSetId ( const ReferenceGlyph_t rg)

Returns 1 (true) if the id is set.

Parameters
rgthe ReferenceGlyph_t structure.
int ReferenceGlyph_isSetReferenceId ( const ReferenceGlyph_t rg)

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

Parameters
rgthe ReferenceGlyph_t structure.
int ReferenceGlyph_isSetRole ( const ReferenceGlyph_t rg)

Returns true if the role is not empty.

Parameters
rgthe ReferenceGlyph_t structure.
void ReferenceGlyph_setCurve ( ReferenceGlyph_t rg,
Curve_t c 
)

Sets the curve for the reference glyph.

Parameters
rgthe ReferenceGlyph_t structure.
cthe Curve_t to set for the ReferenceGlyph_t.
void ReferenceGlyph_setGlyphId ( ReferenceGlyph_t rg,
const char *  id 
)

Sets the glyph reference for the glyph.

Parameters
rgthe ReferenceGlyph_t structure.
idthe string to use as the glyph.
int ReferenceGlyph_setId ( ReferenceGlyph_t rg,
const char *  sid 
)

Sets the id.

Parameters
rgthe ReferenceGlyph_t structure.
sidthe string to use as the ID of the ReferenceGlyph_t.
void ReferenceGlyph_setReferenceId ( ReferenceGlyph_t rg,
const char *  id 
)

Sets the reference for the glyph.

Parameters
rgthe ReferenceGlyph_t structure.
idthe string to use as the reference.
void ReferenceGlyph_setRole ( ReferenceGlyph_t rg,
const char *  r 
)

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

Parameters
rgthe ReferenceGlyph_t structure.
rthe role to use for the ReferenceGlyph_t.
void ReferenceGlyph_unsetId ( ReferenceGlyph_t rg)

Unsets the id.

Parameters
rgthe ReferenceGlyph_t structure.