libSBML C API  5.18.0
Member_t Class Reference

Detailed Description

groups The Member_t class defines what objects are parts of a Group_t.

The Member_t class has four optional attributes: id and name, which identify the element, and idRef and metaIdRef which reference the identifiers of other elements. There must be exactly one (and only one) method used to reference another element: either idRef or metaIdRef may be defined, but not both. (Multiple attributes are needed to account for the different types of identifiers that a given object may have.) The referenced object (including, potentially, another Group_t object) is thus made a member of the group in which the Member_t object is contained.

Since Member_t is derived from SBase_t and, as mentioned above, SBase_t provides both the ability to attach SBO_t terms as well as MIRIAM annotations, the semantics of a given member in a model can be made more precise by reference to external controlled vocabularies and ontologies.

Public Member Functions

Member_tMember_clone (const Member_t *m)
 Creates and returns a deep copy of this Member_t object. More...
 
Member_tMember_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new Member_t using the given SBML Level, Version and “groups” package version. More...
 
void Member_free (Member_t *m)
 Frees this Member_t object. More...
 
char * Member_getId (const Member_t *m)
 Returns the value of the "id" attribute of this Member_t. More...
 
char * Member_getIdRef (const Member_t *m)
 Returns the value of the "idRef" attribute of this Member_t. More...
 
char * Member_getMetaIdRef (const Member_t *m)
 Returns the value of the "metaIdRef" attribute of this Member_t. More...
 
char * Member_getName (const Member_t *m)
 Returns the value of the "name" attribute of this Member_t. More...
 
int Member_hasRequiredAttributes (const Member_t *m)
 Predicate returning 1 (true) if all the required attributes for this Member_t object have been set. More...
 
int Member_isSetId (const Member_t *m)
 Predicate returning 1 (true) if this Member_t's "id" attribute is set. More...
 
int Member_isSetIdRef (const Member_t *m)
 Predicate returning 1 (true) if this Member_t's "idRef" attribute is set. More...
 
int Member_isSetMetaIdRef (const Member_t *m)
 Predicate returning 1 (true) if this Member_t's "metaIdRef" attribute is set. More...
 
int Member_isSetName (const Member_t *m)
 Predicate returning 1 (true) if this Member_t's "name" attribute is set. More...
 
int Member_setId (Member_t *m, const char *id)
 Sets the value of the "id" attribute of this Member_t. More...
 
int Member_setIdRef (Member_t *m, const char *idRef)
 Sets the value of the "idRef" attribute of this Member_t. More...
 
int Member_setMetaIdRef (Member_t *m, const char *metaIdRef)
 Sets the value of the "metaIdRef" attribute of this Member_t. More...
 
int Member_setName (Member_t *m, const char *name)
 Sets the value of the "name" attribute of this Member_t. More...
 
int Member_unsetId (Member_t *m)
 Unsets the value of the "id" attribute of this Member_t. More...
 
int Member_unsetIdRef (Member_t *m)
 Unsets the value of the "idRef" attribute of this Member_t. More...
 
int Member_unsetMetaIdRef (Member_t *m)
 Unsets the value of the "metaIdRef" attribute of this Member_t. More...
 
int Member_unsetName (Member_t *m)
 Unsets the value of the "name" attribute of this Member_t. More...
 

Member Function Documentation

Member_t * Member_clone ( const Member_t m)

Creates and returns a deep copy of this Member_t object.

Parameters
mthe Member_t structure.
Returns
a (deep) copy of this Member_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.
Member_t * Member_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

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

Parameters
levelan unsigned int, the SBML Level to assign to this Member_t.
versionan unsigned int, the SBML Version to assign to this Member_t.
pkgVersionan unsigned int, the SBML Groups Version to assign to this Member_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.
void Member_free ( Member_t m)

Frees this Member_t object.

Parameters
mthe Member_t structure.
char * Member_getId ( const Member_t m)

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

Parameters
mthe Member_t structure whose id is sought.
Returns
the value of the "id" attribute of this Member_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.
char * Member_getIdRef ( const Member_t m)

Returns the value of the "idRef" attribute of this Member_t.

Parameters
mthe Member_t structure whose idRef is sought.
Returns
the value of the "idRef" attribute of this Member_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.
char * Member_getMetaIdRef ( const Member_t m)

Returns the value of the "metaIdRef" attribute of this Member_t.

Parameters
mthe Member_t structure whose metaIdRef is sought.
Returns
the value of the "metaIdRef" attribute of this Member_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.
char * Member_getName ( const Member_t m)

Returns the value of the "name" attribute of this Member_t.

Parameters
mthe Member_t structure whose name is sought.
Returns
the value of the "name" attribute of this Member_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 Member_hasRequiredAttributes ( const Member_t m)

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

Parameters
mthe Member_t structure.
Returns
1 (true) to indicate that all the required attributes of this Member_t have been set, otherwise 0 (false) is returned.
int Member_isSetId ( const Member_t m)

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

Parameters
mthe Member_t structure.
Returns
1 (true) if this Member_t's "id" attribute has been set, otherwise 0 (false) is returned.
int Member_isSetIdRef ( const Member_t m)

Predicate returning 1 (true) if this Member_t's "idRef" attribute is set.

Parameters
mthe Member_t structure.
Returns
1 (true) if this Member_t's "idRef" attribute has been set, otherwise 0 (false) is returned.
int Member_isSetMetaIdRef ( const Member_t m)

Predicate returning 1 (true) if this Member_t's "metaIdRef" attribute is set.

Parameters
mthe Member_t structure.
Returns
1 (true) if this Member_t's "metaIdRef" attribute has been set, otherwise 0 (false) is returned.
int Member_isSetName ( const Member_t m)

Predicate returning 1 (true) if this Member_t's "name" attribute is set.

Parameters
mthe Member_t structure.
Returns
1 (true) if this Member_t's "name" attribute has been set, otherwise 0 (false) is returned.
int Member_setId ( Member_t m,
const char *  id 
)

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

Parameters
mthe Member_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 Member_unsetId().
int Member_setIdRef ( Member_t m,
const char *  idRef 
)

Sets the value of the "idRef" attribute of this Member_t.

Parameters
mthe Member_t structure.
idRefconst char * value of the "idRef" 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 Member_setMetaIdRef ( Member_t m,
const char *  metaIdRef 
)

Sets the value of the "metaIdRef" attribute of this Member_t.

Parameters
mthe Member_t structure.
metaIdRefconst char * value of the "metaIdRef" 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 Member_setName ( Member_t m,
const char *  name 
)

Sets the value of the "name" attribute of this Member_t.

Parameters
mthe Member_t structure.
nameconst char * value of the "name" 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 name = NULL or an empty string is equivalent to calling Member_unsetName().
int Member_unsetId ( Member_t m)

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

Parameters
mthe Member_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 Member_unsetIdRef ( Member_t m)

Unsets the value of the "idRef" attribute of this Member_t.

Parameters
mthe Member_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 Member_unsetMetaIdRef ( Member_t m)

Unsets the value of the "metaIdRef" attribute of this Member_t.

Parameters
mthe Member_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 Member_unsetName ( Member_t m)

Unsets the value of the "name" attribute of this Member_t.

Parameters
mthe Member_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: