libSBML C API  5.18.0
LineEnding_t Class Reference

Detailed Description

render Decoration element for the start and/or end of curves.

LineEndings in the SBML Level 3 Render package are used to apply certain decorations to the end of curves. Since many curves in layout diagrams use the same decoration for the beginnings and start of a line, it would be highly redundant to encode those decorations with each line. Therefore, LineEnding_t objects can be defined which are then applied to the beginning or the ends of several curve objects.

A LineEnding_t contains an id by which it can be referenced from curve styles, it contains a visual representation of the decoration in the form of a render extension Group_t object and it has some attributes that define the viewport and how the LineEnding_t is to be applied to a curve.

A LineEnding_t object is only valid if it has an id, a viewport that has an area which is not 0 and a valid group object.

Public Member Functions

LineEnding_tLineEnding_clone (const LineEnding_t *le)
 Creates and returns a deep copy of this LineEnding_t object. More...
 
LineEnding_tLineEnding_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new LineEnding_t using the given SBML Level, Version and “render” package version. More...
 
BoundingBox_tLineEnding_createBoundingBox (LineEnding_t *le)
 Creates a new BoundingBox_t object, adds it to this LineEnding_t object and returns the BoundingBox_t object created. More...
 
RenderGroup_tLineEnding_createGroup (LineEnding_t *le)
 Creates a new RenderGroup_t object, adds it to this LineEnding_t object and returns the RenderGroup_t object created. More...
 
void LineEnding_free (LineEnding_t *le)
 Frees this LineEnding_t object. More...
 
const BoundingBox_tLineEnding_getBoundingBox (const LineEnding_t *le)
 Returns the value of the "boundingBox" element of this LineEnding_t. More...
 
int LineEnding_getEnableRotationalMapping (const LineEnding_t *le)
 Returns the value of the "enableRotationalMapping" attribute of this LineEnding_t. More...
 
const RenderGroup_tLineEnding_getGroup (const LineEnding_t *le)
 Returns the value of the "group" element of this LineEnding_t. More...
 
char * LineEnding_getId (const LineEnding_t *le)
 Returns the value of the "id" attribute of this LineEnding_t. More...
 
int LineEnding_hasRequiredAttributes (const LineEnding_t *le)
 Predicate returning 1 (true) if all the required attributes for this LineEnding_t object have been set. More...
 
int LineEnding_hasRequiredElements (const LineEnding_t *le)
 Predicate returning 1 (true) if all the required elements for this LineEnding_t object have been set. More...
 
int LineEnding_isSetBoundingBox (const LineEnding_t *le)
 Predicate returning 1 (true) if this LineEnding_t's "boundingBox" element is set. More...
 
int LineEnding_isSetEnableRotationalMapping (const LineEnding_t *le)
 Predicate returning 1 (true) if this LineEnding_t's "enableRotationalMapping" attribute is set. More...
 
int LineEnding_isSetGroup (const LineEnding_t *le)
 Predicate returning 1 (true) if this LineEnding_t's "group" element is set. More...
 
int LineEnding_isSetId (const LineEnding_t *le)
 Predicate returning 1 (true) if this LineEnding_t's "id" attribute is set. More...
 
int LineEnding_setBoundingBox (LineEnding_t *le, const BoundingBox_t *boundingBox)
 Sets the value of the "boundingBox" element of this LineEnding_t. More...
 
int LineEnding_setEnableRotationalMapping (LineEnding_t *le, int enableRotationalMapping)
 Sets the value of the "enableRotationalMapping" attribute of this LineEnding_t. More...
 
int LineEnding_setGroup (LineEnding_t *le, const RenderGroup_t *group)
 Sets the value of the "group" element of this LineEnding_t. More...
 
int LineEnding_setId (LineEnding_t *le, const char *id)
 Sets the value of the "id" attribute of this LineEnding_t. More...
 
int LineEnding_unsetBoundingBox (LineEnding_t *le)
 Unsets the value of the "boundingBox" element of this LineEnding_t. More...
 
int LineEnding_unsetEnableRotationalMapping (LineEnding_t *le)
 Unsets the value of the "enableRotationalMapping" attribute of this LineEnding_t. More...
 
int LineEnding_unsetGroup (LineEnding_t *le)
 Unsets the value of the "group" element of this LineEnding_t. More...
 
int LineEnding_unsetId (LineEnding_t *le)
 Unsets the value of the "id" attribute of this LineEnding_t. More...
 

Member Function Documentation

LineEnding_t * LineEnding_clone ( const LineEnding_t le)

Creates and returns a deep copy of this LineEnding_t object.

Parameters
lethe LineEnding_t structure.
Returns
a (deep) copy of this LineEnding_t object.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
LineEnding_t * LineEnding_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new LineEnding_t using the given SBML Level, Version and “render” package version.

Parameters
levelan unsigned int, the SBML Level to assign to this LineEnding_t.
versionan unsigned int, the SBML Version to assign to this LineEnding_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this LineEnding_t.
Note
Attempting to add an object to an SBMLDocument_t having a different combination of SBML Level, Version and XML namespaces than the object itself will result in an error at the time a caller attempts to make the addition. A parent object must have compatible Level, Version and XML namespaces. (Strictly speaking, a parent may also have more XML namespaces than a child, but the reverse is not permitted.) The restriction is necessary to ensure that an SBML model has a consistent overall structure. This requires callers to manage their objects carefully, but the benefit is increased flexibility in how models can be created by permitting callers to create objects bottom-up if desired. In situations where objects are not yet attached to parents (e.g., SBMLDocument_t), knowledge of the intented SBML Level and Version help libSBML determine such things as whether it is valid to assign a particular value to an attribute. For packages, this means that the parent object to which this package element is being added must have been created with the package namespace, or that the package namespace was added to it, even if that parent is not a package object itself.
Warning
The pointer that is returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the element will not be reflected in any resulting SBML document unless the element is added to an SBML Document. Even in this case, the element's deletion is still the responsibility of the caller with two exceptions: if it is used as the "disownedItem" in the ListOf_appendAndOwn() or ListOf_insertAndOwn() functions. All other functions in libsbml add a copy of the element, and do not transfer ownership of the pointer.
BoundingBox_t * LineEnding_createBoundingBox ( LineEnding_t le)

Creates a new BoundingBox_t object, adds it to this LineEnding_t object and returns the BoundingBox_t object created.

Parameters
lethe LineEnding_t structure to which the BoundingBox_t should be added.
Returns
a new BoundingBox_t object instance.
RenderGroup_t * LineEnding_createGroup ( LineEnding_t le)

Creates a new RenderGroup_t object, adds it to this LineEnding_t object and returns the RenderGroup_t object created.

Parameters
lethe LineEnding_t structure to which the RenderGroup_t should be added.
Returns
a new RenderGroup_t object instance.
void LineEnding_free ( LineEnding_t le)

Frees this LineEnding_t object.

Parameters
lethe LineEnding_t structure.
const BoundingBox_t * LineEnding_getBoundingBox ( const LineEnding_t le)

Returns the value of the "boundingBox" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure whose boundingBox is sought.
Returns
the value of the "boundingBox" element of this LineEnding_t as a BoundingBox_t.
int LineEnding_getEnableRotationalMapping ( const LineEnding_t le)

Returns the value of the "enableRotationalMapping" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure whose enableRotationalMapping is sought.
Returns
the value of the "enableRotationalMapping" attribute of this LineEnding_t as a boolean.
const RenderGroup_t * LineEnding_getGroup ( const LineEnding_t le)

Returns the value of the "group" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure whose group is sought.
Returns
the value of the "group" element of this LineEnding_t as a RenderGroup_t.
char * LineEnding_getId ( const LineEnding_t le)

Returns the value of the "id" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure whose id is sought.
Returns
the value of the "id" attribute of this LineEnding_t as a pointer to a string.
Warning
The string returned by this function is owned by the caller, who is responsible for deleting it. Any changes made to the string will not be reflected in any resulting SBML document unless the string is added to an SBML Document. Even in this case, the string should be deleted, as adding a string to an SBML Document adds a copy of the string, and does not transfer ownership of that string.
int LineEnding_hasRequiredAttributes ( const LineEnding_t le)

Predicate returning 1 (true) if all the required attributes for this LineEnding_t object have been set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) to indicate that all the required attributes of this LineEnding_t have been set, otherwise 0 (false) is returned.
Note
The required attributes for the LineEnding_t object are:
  • "id"
int LineEnding_hasRequiredElements ( const LineEnding_t le)

Predicate returning 1 (true) if all the required elements for this LineEnding_t object have been set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) to indicate that all the required elements of this LineEnding_t have been set, otherwise 0 (false) is returned.
Note
The required elements for the LineEnding_t object are:
int LineEnding_isSetBoundingBox ( const LineEnding_t le)

Predicate returning 1 (true) if this LineEnding_t's "boundingBox" element is set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) if this LineEnding_t's "boundingBox" element has been set, otherwise 0 (false) is returned.
int LineEnding_isSetEnableRotationalMapping ( const LineEnding_t le)

Predicate returning 1 (true) if this LineEnding_t's "enableRotationalMapping" attribute is set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) if this LineEnding_t's "enableRotationalMapping" attribute has been set, otherwise 0 (false) is returned.
int LineEnding_isSetGroup ( const LineEnding_t le)

Predicate returning 1 (true) if this LineEnding_t's "group" element is set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) if this LineEnding_t's "group" element has been set, otherwise 0 (false) is returned.
int LineEnding_isSetId ( const LineEnding_t le)

Predicate returning 1 (true) if this LineEnding_t's "id" attribute is set.

Parameters
lethe LineEnding_t structure.
Returns
1 (true) if this LineEnding_t's "id" attribute has been set, otherwise 0 (false) is returned.
int LineEnding_setBoundingBox ( LineEnding_t le,
const BoundingBox_t boundingBox 
)

Sets the value of the "boundingBox" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
boundingBoxBoundingBox_t value of the "boundingBox" element to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_setEnableRotationalMapping ( LineEnding_t le,
int  enableRotationalMapping 
)

Sets the value of the "enableRotationalMapping" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
enableRotationalMappingint value of the "enableRotationalMapping" attribute to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_setGroup ( LineEnding_t le,
const RenderGroup_t group 
)

Sets the value of the "group" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
groupRenderGroup_t value of the "group" element to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_setId ( LineEnding_t le,
const char *  id 
)

Sets the value of the "id" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
idconst char * value of the "id" attribute to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: Calling this function with id = NULL or an empty string is equivalent to calling LineEnding_unsetId().
int LineEnding_unsetBoundingBox ( LineEnding_t le)

Unsets the value of the "boundingBox" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_unsetEnableRotationalMapping ( LineEnding_t le)

Unsets the value of the "enableRotationalMapping" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_unsetGroup ( LineEnding_t le)

Unsets the value of the "group" element of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int LineEnding_unsetId ( LineEnding_t le)

Unsets the value of the "id" attribute of this LineEnding_t.

Parameters
lethe LineEnding_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: