libSBML C API  5.18.0
GlobalRenderInformation_t Class Reference

Detailed Description

render Render information stored in a ListOfLayouts_t.

GlobalRenderInformation_t is one of the subclasses of RenderInformationBase_t. A global render information object contains color definitions, gradient definitions and line endings as defined in RenderInformationBase_t. Additionally it has a list of global styles which specifies type and role based render information. This class of objects cannot specify id-based render information because it does not belong to a certain layout but it belongs to all layouts. GlobalRenderInformation_t can be applied to all layouts.

Public Member Functions

int GlobalRenderInformation_addGlobalStyle (GlobalRenderInformation_t *gri, const GlobalStyle_t *gs)
 Adds a copy of the given GlobalStyle_t to this GlobalRenderInformation_t. More...
 
GlobalRenderInformation_tGlobalRenderInformation_clone (const GlobalRenderInformation_t *gri)
 Creates and returns a deep copy of this GlobalRenderInformation_t object. More...
 
GlobalRenderInformation_tGlobalRenderInformation_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new GlobalRenderInformation_t using the given SBML Level, Version and “render” package version. More...
 
GlobalStyle_tGlobalRenderInformation_createGlobalStyle (GlobalRenderInformation_t *gri)
 Creates a new GlobalStyle_t object, adds it to this GlobalRenderInformation_t object and returns the GlobalStyle_t object created. More...
 
void GlobalRenderInformation_free (GlobalRenderInformation_t *gri)
 Frees this GlobalRenderInformation_t object. More...
 
GlobalStyle_tGlobalRenderInformation_getGlobalStyle (GlobalRenderInformation_t *gri, unsigned int n)
 Get a GlobalStyle_t from the GlobalRenderInformation_t. More...
 
ListOf_tGlobalRenderInformation_getListOfGlobalStyles (GlobalRenderInformation_t *gri)
 Returns a ListOf_t * containing GlobalStyle_t objects from this GlobalRenderInformation_t. More...
 
unsigned int GlobalRenderInformation_getNumGlobalStyles (GlobalRenderInformation_t *gri)
 Get the number of GlobalStyle_t objects in this GlobalRenderInformation_t. More...
 
int GlobalRenderInformation_hasRequiredAttributes (const GlobalRenderInformation_t *gri)
 Predicate returning 1 (true) if all the required attributes for this GlobalRenderInformation_t object have been set. More...
 
int GlobalRenderInformation_hasRequiredElements (const GlobalRenderInformation_t *gri)
 Predicate returning 1 (true) if all the required elements for this GlobalRenderInformation_t object have been set. More...
 
GlobalStyle_tGlobalRenderInformation_removeGlobalStyle (GlobalRenderInformation_t *gri, unsigned int n)
 Removes the nth GlobalStyle_t from this GlobalRenderInformation_t and returns a pointer to it. More...
 

Member Function Documentation

int GlobalRenderInformation_addGlobalStyle ( GlobalRenderInformation_t gri,
const GlobalStyle_t gs 
)

Adds a copy of the given GlobalStyle_t to this GlobalRenderInformation_t.

Parameters
grithe GlobalRenderInformation_t structure to which the GlobalStyle_t should be added.
gsthe GlobalStyle_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:
GlobalRenderInformation_t * GlobalRenderInformation_clone ( const GlobalRenderInformation_t gri)

Creates and returns a deep copy of this GlobalRenderInformation_t object.

Parameters
grithe GlobalRenderInformation_t structure.
Returns
a (deep) copy of this GlobalRenderInformation_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.
GlobalRenderInformation_t * GlobalRenderInformation_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

Parameters
levelan unsigned int, the SBML Level to assign to this GlobalRenderInformation_t.
versionan unsigned int, the SBML Version to assign to this GlobalRenderInformation_t.
pkgVersionan unsigned int, the SBML Render Version to assign to this GlobalRenderInformation_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.
GlobalStyle_t * GlobalRenderInformation_createGlobalStyle ( GlobalRenderInformation_t gri)

Creates a new GlobalStyle_t object, adds it to this GlobalRenderInformation_t object and returns the GlobalStyle_t object created.

Parameters
grithe GlobalRenderInformation_t structure to which the GlobalStyle_t should be added.
Returns
a new GlobalStyle_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 GlobalRenderInformation_free ( GlobalRenderInformation_t gri)

Frees this GlobalRenderInformation_t object.

Parameters
grithe GlobalRenderInformation_t structure.
GlobalStyle_t * GlobalRenderInformation_getGlobalStyle ( GlobalRenderInformation_t gri,
unsigned int  n 
)

Get a GlobalStyle_t from the GlobalRenderInformation_t.

Parameters
grithe GlobalRenderInformation_t structure to search.
nan unsigned int representing the index of the GlobalStyle_t to retrieve.
Returns
the nth GlobalStyle_t in the ListOfGlobalStyles_t within this GlobalRenderInformation_t or NULL if no such object exists.
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.
ListOf_t * GlobalRenderInformation_getListOfGlobalStyles ( GlobalRenderInformation_t gri)

Returns a ListOf_t * containing GlobalStyle_t objects from this GlobalRenderInformation_t.

Parameters
grithe GlobalRenderInformation_t structure whose ListOfGlobalStyles_t is sought.
Returns
the ListOfGlobalStyles_t from this GlobalRenderInformation_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
GlobalRenderInformation_addGlobalStyle()
GlobalRenderInformation_createGlobalStyle()
GlobalRenderInformation_getGlobalStyleById()
GlobalRenderInformation_getGlobalStyle()
GlobalRenderInformation_getNumGlobalStyles()
GlobalRenderInformation_removeGlobalStyleById()
GlobalRenderInformation_removeGlobalStyle()
unsigned int GlobalRenderInformation_getNumGlobalStyles ( GlobalRenderInformation_t gri)

Get the number of GlobalStyle_t objects in this GlobalRenderInformation_t.

Parameters
grithe GlobalRenderInformation_t structure to query.
Returns
the number of GlobalStyle_t objects in this GlobalRenderInformation_t.
int GlobalRenderInformation_hasRequiredAttributes ( const GlobalRenderInformation_t gri)

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

Parameters
grithe GlobalRenderInformation_t structure.
Returns
1 (true) to indicate that all the required attributes of this GlobalRenderInformation_t have been set, otherwise 0 (false) is returned.
int GlobalRenderInformation_hasRequiredElements ( const GlobalRenderInformation_t gri)

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

Parameters
grithe GlobalRenderInformation_t structure.
Returns
1 (true) to indicate that all the required elements of this GlobalRenderInformation_t have been set, otherwise 0 (false) is returned.
Note
The required elements for the GlobalRenderInformation_t object are:
GlobalStyle_t * GlobalRenderInformation_removeGlobalStyle ( GlobalRenderInformation_t gri,
unsigned int  n 
)

Removes the nth GlobalStyle_t from this GlobalRenderInformation_t and returns a pointer to it.

Parameters
grithe GlobalRenderInformation_t structure to search.
nan unsigned int representing the index of the GlobalStyle_t to remove.
Returns
a pointer to the nth GlobalStyle_t in this GlobalRenderInformation_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.