libSBML C API  5.18.0
LocalRenderInformation_t Class Reference

Detailed Description

render Rendering information stored in Layouts.

LocalRenderInformation_t is one of the subclasses of RenderInformationBase_t. A "local rendering information" object contains color definitions, gradient definitions and line endings as defined in RenderInformationBase_t. Additionally it has a list of local styles which specifies type, role and id based render information. Local render information can specify id based render information because it does belong to a certain layout and it can reference ids of object in that layout.

Public Member Functions

int LocalRenderInformation_addLocalStyle (LocalRenderInformation_t *lri, const LocalStyle_t *ls)
 Adds a copy of the given LocalStyle_t to this LocalRenderInformation_t. More...
 
LocalRenderInformation_tLocalRenderInformation_clone (const LocalRenderInformation_t *lri)
 Creates and returns a deep copy of this LocalRenderInformation_t object. More...
 
LocalRenderInformation_tLocalRenderInformation_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new LocalRenderInformation_t using the given SBML Level, Version and “render” package version. More...
 
LocalStyle_tLocalRenderInformation_createLocalStyle (LocalRenderInformation_t *lri)
 Creates a new LocalStyle_t object, adds it to this LocalRenderInformation_t object and returns the LocalStyle_t object created. More...
 
void LocalRenderInformation_free (LocalRenderInformation_t *lri)
 Frees this LocalRenderInformation_t object. More...
 
ListOf_tLocalRenderInformation_getListOfLocalStyles (LocalRenderInformation_t *lri)
 Returns a ListOf_t * containing LocalStyle_t objects from this LocalRenderInformation_t. More...
 
LocalStyle_tLocalRenderInformation_getLocalStyle (LocalRenderInformation_t *lri, unsigned int n)
 Get a LocalStyle_t from the LocalRenderInformation_t. More...
 
unsigned int LocalRenderInformation_getNumLocalStyles (LocalRenderInformation_t *lri)
 Get the number of LocalStyle_t objects in this LocalRenderInformation_t. More...
 
int LocalRenderInformation_hasRequiredAttributes (const LocalRenderInformation_t *lri)
 Predicate returning 1 (true) if all the required attributes for this LocalRenderInformation_t object have been set. More...
 
int LocalRenderInformation_hasRequiredElements (const LocalRenderInformation_t *lri)
 Predicate returning 1 (true) if all the required elements for this LocalRenderInformation_t object have been set. More...
 
LocalStyle_tLocalRenderInformation_removeLocalStyle (LocalRenderInformation_t *lri, unsigned int n)
 Removes the nth LocalStyle_t from this LocalRenderInformation_t and returns a pointer to it. More...
 

Member Function Documentation

int LocalRenderInformation_addLocalStyle ( LocalRenderInformation_t lri,
const LocalStyle_t ls 
)

Adds a copy of the given LocalStyle_t to this LocalRenderInformation_t.

Parameters
lrithe LocalRenderInformation_t structure to which the LocalStyle_t should be added.
lsthe LocalStyle_t object to add.
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:
LocalRenderInformation_t * LocalRenderInformation_clone ( const LocalRenderInformation_t lri)

Creates and returns a deep copy of this LocalRenderInformation_t object.

Parameters
lrithe LocalRenderInformation_t structure.
Returns
a (deep) copy of this LocalRenderInformation_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.
LocalRenderInformation_t * LocalRenderInformation_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

Parameters
levelan unsigned int, the SBML Level to assign to this LocalRenderInformation_t.
versionan unsigned int, the SBML Version to assign to this LocalRenderInformation_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this LocalRenderInformation_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.
LocalStyle_t * LocalRenderInformation_createLocalStyle ( LocalRenderInformation_t lri)

Creates a new LocalStyle_t object, adds it to this LocalRenderInformation_t object and returns the LocalStyle_t object created.

Parameters
lrithe LocalRenderInformation_t structure to which the LocalStyle_t should be added.
Returns
a new LocalStyle_t object instance.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
void LocalRenderInformation_free ( LocalRenderInformation_t lri)

Frees this LocalRenderInformation_t object.

Parameters
lrithe LocalRenderInformation_t structure.
ListOf_t * LocalRenderInformation_getListOfLocalStyles ( LocalRenderInformation_t lri)

Returns a ListOf_t * containing LocalStyle_t objects from this LocalRenderInformation_t.

Parameters
lrithe LocalRenderInformation_t structure whose ListOfLocalStyles_t is sought.
Returns
the ListOfLocalStyles_t from this LocalRenderInformation_t as a ListOf_t *.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
See also
LocalRenderInformation_addLocalStyle()
LocalRenderInformation_createLocalStyle()
LocalRenderInformation_getLocalStyleById()
LocalRenderInformation_getLocalStyle()
LocalRenderInformation_getNumLocalStyles()
LocalRenderInformation_removeLocalStyleById()
LocalRenderInformation_removeLocalStyle()
LocalStyle_t * LocalRenderInformation_getLocalStyle ( LocalRenderInformation_t lri,
unsigned int  n 
)

Get a LocalStyle_t from the LocalRenderInformation_t.

Parameters
lrithe LocalRenderInformation_t structure to search.
nan unsigned int representing the index of the LocalStyle_t to retrieve.
Returns
the nth LocalStyle_t in the ListOfLocalStyles_t within this LocalRenderInformation_t. If the index n is invalid, NULL is returned.
Note
The pointer that is returned by this function is not owned by the caller, but may be queried and modified. Any changes made will be reflected in any resulting SBML document containing the pointer's parent.
unsigned int LocalRenderInformation_getNumLocalStyles ( LocalRenderInformation_t lri)

Get the number of LocalStyle_t objects in this LocalRenderInformation_t.

Parameters
lrithe LocalRenderInformation_t structure to query.
Returns
the number of LocalStyle_t objects in this LocalRenderInformation_t.
int LocalRenderInformation_hasRequiredAttributes ( const LocalRenderInformation_t lri)

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

Parameters
lrithe LocalRenderInformation_t structure.
Returns
1 (true) to indicate that all the required attributes of this LocalRenderInformation_t have been set, otherwise 0 (false) is returned.
int LocalRenderInformation_hasRequiredElements ( const LocalRenderInformation_t lri)

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

Parameters
lrithe LocalRenderInformation_t structure.
Returns
1 (true) to indicate that all the required elements of this LocalRenderInformation_t have been set, otherwise 0 (false) is returned.
Note
The required elements for the LocalRenderInformation_t object are:
LocalStyle_t * LocalRenderInformation_removeLocalStyle ( LocalRenderInformation_t lri,
unsigned int  n 
)

Removes the nth LocalStyle_t from this LocalRenderInformation_t and returns a pointer to it.

Parameters
lrithe LocalRenderInformation_t structure to search.
nan unsigned int representing the index of the LocalStyle_t to remove.
Returns
a pointer to the nth LocalStyle_t in this LocalRenderInformation_t.
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.