libSBML C API  libSBML 5.8.0 C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ListOf.h File Reference

Detailed Description

Author
Wraps List and inherits from SBase
SBML Team sbml-.nosp@m.team.nosp@m.@calt.nosp@m.ech..nosp@m.edu
Include dependency graph for ListOf.h:
This graph shows which files directly or indirectly include this file:

Functions

int ListOf_append (ListOf_t *lo, const SBase_t *item)
 Adds a copy of item to the end of this ListOf items. More...
 
int ListOf_appendAndOwn (ListOf_t *lo, SBase_t *item)
 Adds the given item to the end of this ListOf items. More...
 
int ListOf_appendFrom (ListOf_t *lo, ListOf_t *list)
 Adds clones of the given items from the second list to the end of this ListOf items. More...
 
void ListOf_clear (ListOf_t *lo, int doDelete)
 Removes all items in this ListOf object. More...
 
ListOf_t * ListOf_clone (const ListOf_t *lo)
 
ListOf_t * ListOf_create (unsigned int level, unsigned int version)
 Creates a new ListOf. More...
 
void ListOf_free (ListOf_t *lo)
 Frees the given ListOf and its constituent items. More...
 
SBase_t * ListOf_get (ListOf_t *lo, unsigned int n)
 Returns the nth item in this ListOf items. More...
 
int ListOf_getItemTypeCode (const ListOf_t *lo)
 
int ListOf_insert (ListOf_t *lo, int location, const SBase_t *item)
 inserts a copy of item to this ListOf items at the given position. More...
 
int ListOf_insertAndOwn (ListOf_t *lo, int location, SBase_t *item)
 inserts the item to this ListOf items at the given position. More...
 
SBase_t * ListOf_remove (ListOf_t *lo, unsigned int n)
 Removes the nth item from this ListOf items and returns a pointer to it. More...
 
unsigned int ListOf_size (const ListOf_t *lo)
 Returns the number of items in this ListOf items. More...
 

Function Documentation

int ListOf_append ( ListOf_t *  lo,
const SBase_t *  item 
)

Adds a copy of item to the end of this ListOf items.

int ListOf_appendAndOwn ( ListOf_t *  lo,
SBase_t *  item 
)

Adds the given item to the end of this ListOf items.

int ListOf_appendFrom ( ListOf_t *  lo,
ListOf_t *  list 
)

Adds clones of the given items from the second list to the end of this ListOf items.

void ListOf_clear ( ListOf_t *  lo,
int  doDelete 
)

Removes all items in this ListOf object.

ListOf_t* ListOf_clone ( const ListOf_t *  lo)
Returns
a (deep) copy of this ListOf items.
ListOf_t* ListOf_create ( unsigned int  level,
unsigned int  version 
)

Creates a new ListOf.

Returns
a pointer to created ListOf.
void ListOf_free ( ListOf_t *  lo)

Frees the given ListOf and its constituent items.

This function assumes each item in the list is derived from SBase.

SBase_t* ListOf_get ( ListOf_t *  lo,
unsigned int  n 
)

Returns the nth item in this ListOf items.

int ListOf_getItemTypeCode ( const ListOf_t *  lo)
Returns
the int of SBML objects contained in this ListOf or SBML_UNKNOWN (default).
int ListOf_insert ( ListOf_t *  lo,
int  location,
const SBase_t *  item 
)

inserts a copy of item to this ListOf items at the given position.

int ListOf_insertAndOwn ( ListOf_t *  lo,
int  location,
SBase_t *  item 
)

inserts the item to this ListOf items at the given position.

SBase_t* ListOf_remove ( ListOf_t *  lo,
unsigned int  n 
)

Removes the nth item from this ListOf items and returns a pointer to it.

The caller owns the returned item and is responsible for deleting it.

unsigned int ListOf_size ( const ListOf_t *  lo)

Returns the number of items in this ListOf items.