libSBML C API  5.18.0
ReplacedBy_t Class Reference

Detailed Description

comp Indicates an object replaced by another.

The ReplacedBy_t class was introduced by the SBML Level 3 Hierarchical Model_t Composition (“comp”) package to allow submodel elements to be 'canonical' versions of the element while still allowing the parent model to reference those elements. Whereas a ReplacedElement_t object indicates that the containing object replaces another, a ReplacedBy_t object indicates the converse: the parent object is to be replaced by another object.

As is the case with ReplacedElement_t, the ReplacedBy_t class inherits from SBaseRef_t. It additionally defines one required attribute ("submodelRef"), defined in libSBML in the Replacing_t class.

Public Member Functions

ReplacedBy_tReplacedBy_clone (ReplacedBy_t *rb)
 Returns a copy of the given ReplacedBy_t structure. More...
 
ReplacedBy_tReplacedBy_create (unsigned int level, unsigned int version, unsigned int pkgVersion)
 Creates a new ReplacedBy_t structure using the given SBML level and version, and the pkgVersion package version. More...
 
void ReplacedBy_free (ReplacedBy_t *rb)
 Frees the given ReplacedBy_t structure. More...
 
char * ReplacedBy_getSubmodelRef (ReplacedBy_t *rb)
 Takes a ReplacedBy_t structure and returns its submodelRef. More...
 
int ReplacedBy_hasRequiredAttributes (ReplacedBy_t *rb)
 Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for the given ReplacedBy_t structure have been set. More...
 
int ReplacedBy_isSetSubmodelRef (ReplacedBy_t *rb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given ReplacedBy_t structure's submodelRef is set. More...
 
int ReplacedBy_setSubmodelRef (ReplacedBy_t *rb, const char *submodelRef)
 Sets the submodelRef of the given ReplacedBy_t to a copy of submodelRef. More...
 
int ReplacedBy_unsetSubmodelRef (ReplacedBy_t *rb)
 Unsets the "submodelRef" attribute of the given ReplacedBy_t structure. More...
 

Member Function Documentation

ReplacedBy_t * ReplacedBy_clone ( ReplacedBy_t rb)

Returns a copy of the given ReplacedBy_t structure.

Parameters
rbthe ReplacedBy_t structure to copy.
Returns
a (deep) copy of the ReplacedBy_t.
ReplacedBy_t * ReplacedBy_create ( unsigned int  level,
unsigned int  version,
unsigned int  pkgVersion 
)

Creates a new ReplacedBy_t structure using the given SBML level and version, and the pkgVersion package version.

Parameters
levelan unsigned int, the SBML Level to assign to this ReplacedBy_t.
versionan unsigned int, the SBML Version to assign to this ReplacedBy_t.
pkgVersionan unsigned int, the SBML 'comp' package Version to assign to this ReplacedBy_t.
Returns
a pointer to the newly created ReplacedBy_t structure.
void ReplacedBy_free ( ReplacedBy_t rb)

Frees the given ReplacedBy_t structure.

Parameters
rbthe ReplacedBy_t structure to free.
char * ReplacedBy_getSubmodelRef ( ReplacedBy_t rb)

Takes a ReplacedBy_t structure and returns its submodelRef.

Parameters
rbthe ReplacedBy_t whose submodelRef is sought.
Returns
the submodelRef of the given ReplacedBy_t, as a pointer to a string.
int ReplacedBy_hasRequiredAttributes ( ReplacedBy_t rb)

Predicate returning 1 (true) or 0 (false) depending on whether all the required attributes for the given ReplacedBy_t structure have been set.

Note
The required attributes for a ReplacedBy_t structure are that it uses exactly one attribute to refer to its target, and that the submodelRef is set.
int ReplacedBy_isSetSubmodelRef ( ReplacedBy_t rb)

Predicate returning 1 (true) or 0 (false) depending on whether the given ReplacedBy_t structure's submodelRef is set.

Parameters
rbthe ReplacedBy_t structure to query.
Returns
1 (true) if the "submodelRef" attribute of the given ReplacedBy_t structure is set, 0 (false) otherwise.
int ReplacedBy_setSubmodelRef ( ReplacedBy_t rb,
const char *  submodelRef 
)

Sets the submodelRef of the given ReplacedBy_t to a copy of submodelRef.

Parameters
rbthe ReplacedBy_t structure to set.
submodelRefthe submodelRef to assign to the given ReplacedBy_t's "submodelRef" attribute.
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:
Note
Using this function with the name set to NULL is equivalent to unsetting the "submodelRef" attribute.
int ReplacedBy_unsetSubmodelRef ( ReplacedBy_t rb)

Unsets the "submodelRef" attribute of the given ReplacedBy_t structure.

Parameters
rbthe ReplacedBy_t structure to unset.
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: