libSBML C API
5.18.0
|
The Layout_t class stores layout information for some or all elements of the SBML model as well as additional objects that need not be connected to the model. The Layout_t has two attributes: id and name. Additionally, a Dimensions_t element specifies the size of the layout. The actual layout elements are contained in several lists, namely: a ListOfCompartmentGlyphs_t, a ListOfSpeciesGlyphs_t, a ListOfReactionGlyphs_t, a ListOfTextGlyphs_t, and a ListOfAdditionalGraphicalObjects. Each of these lists can only occur once, and, if present, are not allowed to be empty.
Public Member Functions | |
void | Layout_addAdditionalGraphicalObject (Layout_t *l, GraphicalObject_t *go) |
Adds a new copy of go to the list of additional graphical objects. More... | |
void | Layout_addCompartmentGlyph (Layout_t *l, CompartmentGlyph_t *cg) |
Adds a new copy of cg to the list of compartment glyphs. More... | |
void | Layout_addReactionGlyph (Layout_t *l, ReactionGlyph_t *rg) |
Adds a new copy of rg to the list of reaction glyphs. More... | |
void | Layout_addSpeciesGlyph (Layout_t *l, SpeciesGlyph_t *sg) |
Adds a new copy of sg to the list of species glyphs. More... | |
void | Layout_addTextGlyph (Layout_t *l, TextGlyph_t *tg) |
Adds a new copy of tg to the list of text glyphs. More... | |
Layout_t * | Layout_clone (const Layout_t *l) |
Layout_t * | Layout_create (void) |
Creates a new Layout_t with the default SBML level, version, and package version, and returns a pointer to it. More... | |
GraphicalObject_t * | Layout_createAdditionalGraphicalObject (Layout_t *l) |
Creates a GraphicalObject_t structure, adds it to the end of the additional graphical objects list and returns a pointer to the newly created structure. More... | |
CompartmentGlyph_t * | Layout_createCompartmentGlyph (Layout_t *l) |
Creates a ComparmentGlyph_t structure, adds it to the end of the compartment glyphs list and returns a pointer to the newly created structure. More... | |
Layout_t * | Layout_createFrom (const Layout_t *temp) |
Creates a clone of temp , or an empty Layout_t structure if temp is NULL . More... | |
GeneralGlyph_t * | Layout_createGeneralGlyph (Layout_t *l) |
Creates a GeneralGlyph_t structure, adds it to the end of the additional objects list and returns a pointer to the newly created structure. More... | |
ReactionGlyph_t * | Layout_createReactionGlyph (Layout_t *l) |
Creates a ReactionGlyph_t structure, adds it to the end of the reaction glyphs list and returns a pointer to the newly created structure. More... | |
SpeciesGlyph_t * | Layout_createSpeciesGlyph (Layout_t *l) |
Creates a SpeciesGlyph_t structure, adds it to the end of the species glyphs list and returns a pointer to the newly created structure. More... | |
TextGlyph_t * | Layout_createTextGlyph (Layout_t *l) |
Creates a TextGlyph_t structure, adds it to the end of the text glyphs list and returns a pointer to the newly created structure. More... | |
Layout_t * | Layout_createWith (const char *sid) |
Creates a new Layout_t with the default SBML level, version, and package version, and with the given id and returns a pointer to it. More... | |
Layout_t * | Layout_createWithDimensions (const char *sid, const Dimensions_t *dimensions) |
Creates a new Layout_t with the default SBML level, version, and package version, and with the given Dimensions_t and returns a pointer to it. More... | |
Layout_t * | Layout_createWithSize (const char *sid, double width, double height, double depth) |
Creates a new Layout_t with the default SBML level, version, and package version, and with the given width, height and depth and returns a pointer to it. More... | |
void | Layout_free (Layout_t *l) |
Frees the memory for the given layout. More... | |
GraphicalObject_t * | Layout_getAdditionalGraphicalObject (Layout_t *l, unsigned int index) |
Returns a pointer to the AdditionalGraphicalObject_t with the given index. More... | |
CompartmentGlyph_t * | Layout_getCompartmentGlyph (Layout_t *l, unsigned int index) |
Returns a pointer to the CompartmentGlyph_t with the given index. More... | |
Dimensions_t * | Layout_getDimensions (Layout_t *l) |
Returns a Dimensions_t pointer from the layout. More... | |
const char * | Layout_getId (const Layout_t *l) |
Returns the id. More... | |
ListOf_t * | Layout_getListOfAdditionalGraphicalObjects (Layout_t *l) |
Returns a pointer to the list of additional GraphicalObjects. More... | |
ListOf_t * | Layout_getListOfCompartmentGlyphs (Layout_t *l) |
Returns a pointer to the list of CompartmentGlyph_t's. More... | |
ListOf_t * | Layout_getListOfReactionGlyphs (Layout_t *l) |
Returns a pointer to the list of ReactionGlyphs. More... | |
ListOf_t * | Layout_getListOfSpeciesGlyphs (Layout_t *l) |
Returns a pointer to the list of SpeciesGlyphs. More... | |
ListOf_t * | Layout_getListOfTextGlyphs (Layout_t *l) |
Returns a pointer to the list of TextGlyphs. More... | |
unsigned int | Layout_getNumAdditionalGraphicalObjects (const Layout_t *l) |
Returns the number of additional GraphicalObjects. More... | |
unsigned int | Layout_getNumCompartmentGlyphs (const Layout_t *l) |
Returns the number of CompartmentGlyphs. More... | |
unsigned int | Layout_getNumReactionGlyphs (const Layout_t *l) |
Returns the number of ReactionGlyphs. More... | |
unsigned int | Layout_getNumSpeciesGlyphs (const Layout_t *l) |
Returns the number of SpeciesGlyphs. More... | |
unsigned int | Layout_getNumTextGlyphs (const Layout_t *l) |
Returns the number of TextGlyphs. More... | |
ReactionGlyph_t * | Layout_getReactionGlyph (Layout_t *l, unsigned int index) |
Returns a pointer to the ReactionGlyph_t with the given index. More... | |
SpeciesGlyph_t * | Layout_getSpeciesGlyph (Layout_t *l, unsigned int index) |
Returns a pointer to the SpeciesGlyph_t with the given index. More... | |
TextGlyph_t * | Layout_getTextGlyph (Layout_t *l, unsigned int index) |
Returns a pointer to the GraphicalObject_t with the given index. More... | |
void | Layout_initDefaults (Layout_t *l) |
Does nothing since no defaults are defined for Layout_t. More... | |
int | Layout_isSetId (const Layout_t *l) |
Returns 1 (true) if the id is set. More... | |
GraphicalObject_t * | Layout_removeAdditionalGraphicalObject (Layout_t *l, unsigned int index) |
Removes the graphical object with the given index. More... | |
GraphicalObject_t * | Layout_removeAdditionalGraphicalObjectWithId (Layout_t *l, const char *id) |
Removes the graphical object with the given id . More... | |
CompartmentGlyph_t * | Layout_removeCompartmentGlyph (Layout_t *l, unsigned int index) |
Removes the compartment glyph with the given index. More... | |
CompartmentGlyph_t * | Layout_removeCompartmentGlyphWithId (Layout_t *l, const char *id) |
Removes the compartment glyph with the given id . More... | |
ReactionGlyph_t * | Layout_removeReactionGlyph (Layout_t *l, unsigned int index) |
Removes the reaction glyph with the given index. More... | |
ReactionGlyph_t * | Layout_removeReactionGlyphWithId (Layout_t *l, const char *id) |
Removes the reaction glyph with the given id . More... | |
SpeciesGlyph_t * | Layout_removeSpeciesGlyph (Layout_t *l, unsigned int index) |
Removes the species glyph with the given index. More... | |
SpeciesGlyph_t * | Layout_removeSpeciesGlyphWithId (Layout_t *l, const char *id) |
Removes the species glyph with the given id . More... | |
SpeciesReferenceGlyph_t * | Layout_removeSpeciesReferenceGlyphWithId (Layout_t *l, const char *id) |
Removes the species reference glyph with the given id . More... | |
TextGlyph_t * | Layout_removeTextGlyph (Layout_t *l, unsigned int index) |
Removes the text glyph with the given index. More... | |
TextGlyph_t * | Layout_removeTextGlyphWithId (Layout_t *l, const char *id) |
Removes the text glyph with the given id . More... | |
void | Layout_setDimensions (Layout_t *l, const Dimensions_t *dimensions) |
Sets the dimensions of the given Layout_t structure to a copy of dimensions . More... | |
int | Layout_setId (Layout_t *l, const char *sid) |
Sets the id. More... | |
void | Layout_unsetId (Layout_t *l) |
Unsets the id. More... | |
void Layout_addAdditionalGraphicalObject | ( | Layout_t * | l, |
GraphicalObject_t * | go | ||
) |
Adds a new copy of go
to the list of additional graphical objects.
l | the Layout_t structure. |
go | the GraphicalObject_t to add to the Layout_t structure. |
void Layout_addCompartmentGlyph | ( | Layout_t * | l, |
CompartmentGlyph_t * | cg | ||
) |
Adds a new copy of cg
to the list of compartment glyphs.
l | the Layout_t structure. |
cg | the CompartmentGlyph_t to add to the Layout_t structure. |
void Layout_addReactionGlyph | ( | Layout_t * | l, |
ReactionGlyph_t * | rg | ||
) |
Adds a new copy of rg
to the list of reaction glyphs.
l | the Layout_t structure. |
rg | the ReactionGlyph_t to add to the Layout_t structure. |
void Layout_addSpeciesGlyph | ( | Layout_t * | l, |
SpeciesGlyph_t * | sg | ||
) |
Adds a new copy of sg
to the list of species glyphs.
l | the Layout_t structure. |
sg | the SpeciesGlyph_t to add to the Layout_t structure. |
void Layout_addTextGlyph | ( | Layout_t * | l, |
TextGlyph_t * | tg | ||
) |
Adds a new copy of tg
to the list of text glyphs.
l | the Layout_t structure. |
tg | the TextGlyph_t to add to the Layout_t structure. |
l | the Layout_t structure. |
Layout_t * Layout_create | ( | void | ) |
Creates a new Layout_t with the default SBML level, version, and package version, and returns a pointer to it.
GraphicalObject_t * Layout_createAdditionalGraphicalObject | ( | Layout_t * | l | ) |
Creates a GraphicalObject_t structure, adds it to the end of the additional graphical objects list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
CompartmentGlyph_t * Layout_createCompartmentGlyph | ( | Layout_t * | l | ) |
Creates a ComparmentGlyph_t structure, adds it to the end of the compartment glyphs list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
Creates a clone of temp
, or an empty Layout_t structure if temp
is NULL
.
temp | the Layout_t structure to copy. |
GeneralGlyph_t * Layout_createGeneralGlyph | ( | Layout_t * | l | ) |
Creates a GeneralGlyph_t structure, adds it to the end of the additional objects list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
ReactionGlyph_t * Layout_createReactionGlyph | ( | Layout_t * | l | ) |
Creates a ReactionGlyph_t structure, adds it to the end of the reaction glyphs list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
SpeciesGlyph_t * Layout_createSpeciesGlyph | ( | Layout_t * | l | ) |
Creates a SpeciesGlyph_t structure, adds it to the end of the species glyphs list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
TextGlyph_t * Layout_createTextGlyph | ( | Layout_t * | l | ) |
Creates a TextGlyph_t structure, adds it to the end of the text glyphs list and returns a pointer to the newly created structure.
l | the Layout_t structure. |
Layout_t * Layout_createWith | ( | const char * | sid | ) |
Layout_t * Layout_createWithDimensions | ( | const char * | sid, |
const Dimensions_t * | dimensions | ||
) |
Creates a new Layout_t with the default SBML level, version, and package version, and with the given Dimensions_t and returns a pointer to it.
Layout_t * Layout_createWithSize | ( | const char * | sid, |
double | width, | ||
double | height, | ||
double | depth | ||
) |
void Layout_free | ( | Layout_t * | l | ) |
Frees the memory for the given layout.
l | the Layout_t structure. |
GraphicalObject_t * Layout_getAdditionalGraphicalObject | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Returns a pointer to the AdditionalGraphicalObject_t with the given index.
l | the Layout_t structure. |
index | the index of the desired GraphicalObject_t. |
CompartmentGlyph_t * Layout_getCompartmentGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Returns a pointer to the CompartmentGlyph_t with the given index.
l | the Layout_t structure. |
index | the index of the desired CompartmentGlyph_t. |
Dimensions_t * Layout_getDimensions | ( | Layout_t * | l | ) |
Returns a Dimensions_t pointer from the layout.
l | the Layout_t structure. |
const char * Layout_getId | ( | const Layout_t * | l | ) |
Returns the id.
l | the Layout_t structure. |
Returns a pointer to the list of additional GraphicalObjects.
l | the Layout_t structure. |
Returns a pointer to the list of CompartmentGlyph_t's.
l | the Layout_t structure. |
Returns a pointer to the list of ReactionGlyphs.
l | the Layout_t structure. |
Returns a pointer to the list of SpeciesGlyphs.
l | the Layout_t structure. |
Returns a pointer to the list of TextGlyphs.
l | the Layout_t structure. |
unsigned int Layout_getNumAdditionalGraphicalObjects | ( | const Layout_t * | l | ) |
Returns the number of additional GraphicalObjects.
l | the Layout_t structure. |
unsigned int Layout_getNumCompartmentGlyphs | ( | const Layout_t * | l | ) |
Returns the number of CompartmentGlyphs.
l | the Layout_t structure. |
unsigned int Layout_getNumReactionGlyphs | ( | const Layout_t * | l | ) |
Returns the number of ReactionGlyphs.
l | the Layout_t structure. |
unsigned int Layout_getNumSpeciesGlyphs | ( | const Layout_t * | l | ) |
Returns the number of SpeciesGlyphs.
l | the Layout_t structure. |
unsigned int Layout_getNumTextGlyphs | ( | const Layout_t * | l | ) |
Returns the number of TextGlyphs.
l | the Layout_t structure. |
ReactionGlyph_t * Layout_getReactionGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Returns a pointer to the ReactionGlyph_t with the given index.
l | the Layout_t structure. |
index | the index of the desired ReactionGlyph_t. |
SpeciesGlyph_t * Layout_getSpeciesGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Returns a pointer to the SpeciesGlyph_t with the given index.
l | the Layout_t structure. |
index | the index of the desired SpeciesGlyph_t. |
TextGlyph_t * Layout_getTextGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Returns a pointer to the GraphicalObject_t with the given index.
l | the Layout_t structure. |
index | the index of the desired TextGlyph_t. |
void Layout_initDefaults | ( | Layout_t * | l | ) |
int Layout_isSetId | ( | const Layout_t * | l | ) |
Returns 1
(true) if the id is set.
l | the Layout_t structure. |
GraphicalObject_t * Layout_removeAdditionalGraphicalObject | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Removes the graphical object with the given index.
If the index is invalid, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
index | the index of the GraphicalObject_t to remove. |
GraphicalObject_t * Layout_removeAdditionalGraphicalObjectWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the graphical object with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the GraphicalObject_t to remove. |
CompartmentGlyph_t * Layout_removeCompartmentGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Removes the compartment glyph with the given index.
If the index is invalid, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
index | the index of the CompartmentGlyph_t to remove. |
CompartmentGlyph_t * Layout_removeCompartmentGlyphWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the compartment glyph with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the CompartmentGlyph_t to remove. |
ReactionGlyph_t * Layout_removeReactionGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Removes the reaction glyph with the given index.
If the index is invalid, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
index | the index of the ReactionGlyph_t to remove. |
ReactionGlyph_t * Layout_removeReactionGlyphWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the reaction glyph with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the ReactionGlyph_t to remove. |
SpeciesGlyph_t * Layout_removeSpeciesGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Removes the species glyph with the given index.
If the index is invalid, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
index | the index of the SpeciesGlyph_t to remove. |
SpeciesGlyph_t * Layout_removeSpeciesGlyphWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the species glyph with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the SpeciesGlyph_t to remove. |
SpeciesReferenceGlyph_t * Layout_removeSpeciesReferenceGlyphWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the species reference glyph with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the SpeciesReferenceGlyph_t to remove. |
TextGlyph_t * Layout_removeTextGlyph | ( | Layout_t * | l, |
unsigned int | index | ||
) |
Removes the text glyph with the given index.
If the index is invalid, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
index | the index of the TextGlyph_t to remove. |
TextGlyph_t * Layout_removeTextGlyphWithId | ( | Layout_t * | l, |
const char * | id | ||
) |
Removes the text glyph with the given id
.
If the id is not found, nothing is removed, and NULL
is returned.
l | the Layout_t structure. |
id | the id of the TextGlyph_t to remove. |
void Layout_setDimensions | ( | Layout_t * | l, |
const Dimensions_t * | dimensions | ||
) |
int Layout_setId | ( | Layout_t * | l, |
const char * | sid | ||
) |