# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.2 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. package LibSBML; use base qw(Exporter); use base qw(DynaLoader); package LibSBMLc; bootstrap LibSBML; package LibSBML; @EXPORT = qw(); =head1 NAME LibSBML -- interface to the libSBML library =head1 SYNOPSIS # Change the following path to wherever your copy is installed. use lib '/usr/local/lib/perl5/site_perl'; use File::Spec; use LibSBML; use strict; my $file = File::Spec->rel2abs('FOO.xml'); my $rd = new LibSBML::SBMLReader; my $document = $rd->readSBML($file); # Check for reading errors: my $errors = $document->getNumErrors(); # Print errors, if any, to stderr. if ($errors > 0) { $document->printErrors(); die "Errors while reading $file"; } my $model = $document->getModel() || die "No Model found in $file"; ... =head1 DESCRIPTION The LibSBML.pm package gives access to almost all functions in libSBML (http://sbml.org). The Perl wrapper is generated using SWIG http://www.swig.org/ with relatively little manual intervention. =head1 AUTHORS Christoph Flamm Rainer Machne =head1 FUNCTION INDEX =over 8 =item getLibSBMLVersion Returns the version number of this copy of libSBML as an integer. @return the libSBML version as an integer; version 1.2.3 becomes 10203. =item getLibSBMLDottedVersion Returns the version number of this copy of libSBML as a string. @return the libSBML version as a string; version 1.2.3 becomes "1.2.3". @see getLibSBMLVersionString() =item getLibSBMLVersionString Returns the version number of this copy of libSBML as a string without periods. @return the libSBML version as a string: version 1.2.3 becomes "10203". @see getLibSBMLDottedVersion() =item isLibSBMLCompiledWith Returns an indication whether libSBML has been compiled with against a specific library. @param option the library to test against, this can be one of "expat", "libxml", "xerces-c", "bzip2", "zip" @return 0 in case the libSBML has not been compiled against that library and nonzero otherwise (for libraries that define an integer version number that number will be returned). @see getLibSBMLDependencyVersionOf(const char option) =item getLibSBMLDependencyVersionOf Returns the version string for the dependency library used. @param option the library for which the version should be retrieved, this can be one of "expat", "libxml", "xerces-c", "bzip2", "zip" @return NULL in case libSBML has not been compiled against that library and a version string otherwise. @see isLibSBMLCompiledWith(const char option) =item OperationReturnValue_toString This method takes an SBML operation return value and returns a string representing the code. @param returnValue the operation return value to convert to a string. @return a human readable name for the given @if clike #OperationReturnValues_t value@else operation return value @endif. @note The caller does not own the returned string and is therefore not allowed to modify it. =back =head2 IdList @sbmlpackage{core} @htmlinclude pkg-marker-core.html Maintains a list of SIds. @internal =over =item IdList::append @internal =item IdList::contains @internal =item IdList::empty @internal =item IdList::removeIdsBefore @internal =item IdList::size @internal =back =head2 IdentifierTransformer @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for identifier transformers. @internal =over =back =head2 ElementFilter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for filter functions. @htmlinclude libsbml-facility-only-warning.html Some libSBML objects provide the ability to return lists of components. To provide callers with greater control over exactly what is returned, these methods take optional arguments in the form of filters. The ElementFilter class is the parent class for these filters. =over =item ElementFilter::ElementFilter Creates a new ElementFilter object. =item ElementFilter::filter Predicate to test elements. This is the central predicate of the ElementFilter class. In subclasses of ElementFilter, callers should implement this method such that it returns C for C arguments that are "desirable" and C for those that are "undesirable" in whatever filtering context the ElementFilter subclass is designed to be used. @param element the element to be tested. @return C if the C is desirable or should be kept, C otherwise. =item ElementFilter::getUserData Returns the user data that has been previously set via setUserData(). Callers can attach private data to ElementFilter objects using setUserData(). This user data can be used by an application to store custom information to be accessed by the ElementFilter in its work. In case of a deep copy, the data will passed as it is. The attribute will never be interpreted by libSBML. @return the user data of this node, or C if no user data has been set. @warning This user data is specific to an ElementFilter object instance, and is not the same as the user data that may be attached to an SBML object using SBase::setUserData(). @see setUserData() =item ElementFilter::setUserData Sets the user data of this element. Callers can attach private data to ElementFilter objects using this method, and retrieve them using getUserData(). Such user data can be used by an application to store information to be accessed by the ElementFilter in its work. In case of a deep copy, this data will passed as it is. The attribute will never be interpreted by libSBML. @param userData specifies the new user data. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @warning This user data is specific to an ElementFilter object instance, and is not the same as the user data that may be attached to an SBML object using SBase::setUserData(). @see getUserData() =back =head2 SBMLReader @sbmlpackage{core} @htmlinclude pkg-marker-core.html File and text-string SBML reader. @htmlinclude not-sbml-warning.html The SBMLReader class provides the main interface for reading SBML content from files and strings. The methods for reading SBML all return an SBMLDocument object representing the results. In the case of failures (such as if the SBML contains errors or a file cannot be read), the errors will be recorded with the SBMLErrorLog object kept in the SBMLDocument returned by SBMLReader. Consequently, immediately after calling a method on SBMLReader, callers should always check for errors and warnings using the methods for this purpose provided by SBMLDocument. For convenience as well as easy access from other languages besides C++, this file also defines two global functions, @sbmlglobalfunction{readSBML, String} and @sbmlglobalfunction{readSBMLFromString, String}. They are equivalent to creating an SBMLReader object and then calling the @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java SBMLReader::readSBML(String)@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif@~ and @if python @link SBMLReader::readSBMLFromString() SBMLReader.readSBMLFromString()@endlink@endif@if java SBMLReader::readSBMLFromString(String)@endif@if cpp SBMLReader::readSBMLFromString()@endif@if csharp SBMLReader.readSBMLFromString()@endif@~ methods, respectively. @section compression Support for reading compressed files LibSBML provides support for reading (as well as writing) compressed SBML files. The process is transparent to the calling application---the application does not need to do anything deliberate to invoke the functionality. If a given SBML filename ends with an extension for the I, I or I compression formats (respectively, @c .gz, @c .zip, or @c .bz2), then the methods @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader::readSBML(String) SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif@~ and @if python @link SBMLWriter::writeSBML() SBMLWriter.writeSBML()@endlink@endif@if java @link SBMLWriter::writeSBML(String) SBMLWriter.writeSBML(String)@endlink@endif@if cpp SBMLWriter::writeSBML()@endif@if csharp SBMLWriter.writeSBML()@endif@~ will automatically decompress and compress the file while reading and writing it. If the filename has no such extension, it will be read and written uncompressed as normal. The compression feature requires that the I (for I and @em zip formats) and/or I (for I format) be available on the system running libSBML, and that libSBML was configured with their support compiled-in. Please see the libSBML @if java installation instructions @else installation instructions@endif@~ for more information about this. The methods @if java SBMLReader::hasZlib()@else hasZlib()@endif@~ and @if java SBMLReader::hasBzip2()@else hasBzip2()@endif@~ can be used by an application to query at run-time whether support for the compression libraries is available in the present copy of libSBML. Support for compression is not mandated by the SBML standard, but applications may find it helpful, particularly when large SBML models are being communicated across data links of limited bandwidth. =over =item SBMLReader::SBMLReader Creates a new SBMLReader object and returns it. The libSBML SBMLReader object offers methods for reading SBML in XML form from files and text strings. =item SBMLReader::readSBML C doc_readsbmlfromfile This method is identical to @if python @link SBMLReader::readSBMLFromFile() SBMLReader.readSBMLFromFile()@endlink@endif@if java @link SBMLReader::readSBMLFromFile(String) SBMLReader.readSBMLFromFile(String)@endlink@endif@if cpp SBMLReader::readSBMLFromFile()@endif@if csharp SBMLReader.readSBMLFromFile()@endif. @param filename the name or full pathname of the file to be read. @return a pointer to the SBMLDocument object created from the SBML content in C. C doc_note_sbmlreader_error_handling @see readSBMLFromString(@if java String@endif) @see SBMLError @see SBMLDocument =item SBMLReader::readSBMLFromFile C doc_readsbmlfromfile This method is identical to @if python @link SBMLReader::readSBML() SBMLReader.readSBML()@endlink@endif@if java @link SBMLReader::readSBML(String) SBMLReader.readSBML(String)@endlink@endif@if cpp SBMLReader::readSBML()@endif@if csharp SBMLReader.readSBML()@endif. @param filename the name or full pathname of the file to be read. @return a pointer to the SBMLDocument object created from the SBML content in C. C doc_note_sbmlreader_error_handling @see readSBMLFromString(@if java String@endif) @see SBMLError @see SBMLDocument =item SBMLReader::readSBMLFromString C doc_readsbmlfromstring @param xml a string containing a full SBML model. @return a pointer to the SBMLDocument created from the SBML content, or a null pointer if C is C. C doc_note_reading_comp @see SBMLReader::readSBML(@if java String@endif) =item SBMLReader::hasZlib Static method; returns C if this copy of libSBML supports gzip and zip format compression. @return C if libSBML has been linked with the zlib library, C otherwise. C doc_note_static_methods @see @if clike hasBzip2() @else SBMLReader::hasBzip2()@endif@~ =item SBMLReader::hasBzip2 Static method; returns C if this copy of libSBML supports bzip2 format compression. @return C if libSBML is linked with the bzip2 libraries, C otherwise. C doc_note_static_methods @see @if clike hasZlib() @else SBMLReader::hasZlib()@endif@~ =item SBMLReader::readInternal @internal =item readSBML C doc_readsbmlfromfile @if conly @memberof SBMLReader_t @endif =item readSBMLFromFile C doc_readsbmlfromfile @param filename the name or full pathname of the file to be read. @return a pointer to the SBMLDocument structure created from the SBML content in C. @if conly @memberof SBMLReader_t @endif =item readSBMLFromString C doc_readsbmlfromstring @param xml a string containing a full SBML model. @return a pointer to the SBMLDocument structure created from the SBML content in C. C doc_note_reading_comp @if conly @memberof SBMLReader_t @endif =back =head2 SBMLWriter @sbmlpackage{core} @htmlinclude pkg-marker-core.html File and text-string SBML writer. @htmlinclude not-sbml-warning.html The SBMLWriter class is the converse of SBMLReader, and provides the main interface for serializing SBML models into XML and writing the result to an output stream or to files and text strings. The methods for writing SBML all take an SBMLDocument object and a destination. They return a boolean or integer value to indicate success or failure. @section sbmlwriter-compression Support for writing compressed files LibSBML provides support for writing (as well as reading) compressed SBML files. The process is transparent to the calling application---the application does not need to do anything deliberate to invoke the functionality. If a given SBML filename ends with an extension for the I, I or I compression formats (respectively, C<".gz">, C<".zip">, or C<".bz2">), then the methods SBMLWriter::writeSBML(@if java SBMLDocument, String@endif) and SBMLReader::readSBML(@if java String@endif) will automatically compress and decompress the file while writing and reading it. If the filename has no such extension, it will be written and read uncompressed as normal. The compression feature requires that the I (for I and @em zip formats) and/or I (for I format) be available on the system running libSBML, and that libSBML was configured with their support compiled-in. Please see the libSBML @if clike installation instructions@endif@if python installation instructions@endif@if java installation instructions@endif@~ for more information about this. The methods SBMLWriter::hasZlib() and SBMLWriter::hasBzip2() can be used by an application to query at run-time whether support for the compression libraries is available in the present copy of libSBML. Support for compression is not mandated by the SBML standard, but applications may find it helpful, particularly when large SBML models are being communicated across data links of limited bandwidth. =over =item SBMLWriter::SBMLWriter Creates a new SBMLWriter. The libSBML SBMLWriter objects offer methods for writing SBML in XML form to files and text strings. =item SBMLWriter::setProgramName Sets the name of this program, i.e., the program that is about to write out the SBMLDocument. If the program name and version are set (see SBMLWriter::setProgramVersion(@if java String@endif)), the following XML comment, intended for human consumption, will be written at the beginning of the XML document: @verbatim @endverbatim If the program name and version are not set at some point before calling the writeSBML() methods, no such comment is written out. @param name the name of this program (where "this program" refers to program in which libSBML is embedded, not libSBML itself!) C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see setProgramVersion(const std::string& version) =item SBMLWriter::setProgramVersion Sets the version of this program, i.e., the program that is about to write out the SBMLDocument. If the program version and name are set (see SBMLWriter::setProgramName(@if java String@endif)), the following XML comment, intended for human consumption, will be written at the beginning of the document: @verbatim @endverbatim If the program version and name are not set at some point before calling the writeSBML() methods, no such comment is written out. @param version the version of this program (where "this program" refers to program in which libSBML is embedded, not libSBML itself!) C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see setProgramName(const std::string& name) =item SBMLWriter::writeSBML Writes the given SBML document to filename. @htmlinclude assuming-compressed-file.html @param d the SBML document to be written. @param filename the name or full pathname of the file where the SBML is to be written. @return C on success and C if the filename could not be opened for writing. @note @htmlinclude note-writing-zipped-files.html @see setProgramVersion(const std::string& version) @see setProgramName(const std::string& name) =item SBMLWriter::writeSBML Writes the given SBML document to the output stream. @param d the SBML document to be written. @param stream the stream object where the SBML is to be written. @return C on success and C if one of the underlying parser components fail (rare). @see setProgramVersion(const std::string& version) @see setProgramName(const std::string& name) =item SBMLWriter::writeToString @internal =item SBMLWriter::writeSBMLToFile Writes the given SBML document to filename. @htmlinclude assuming-compressed-file.html @param d the SBML document to be written. @param filename the name or full pathname of the file where the SBML is to be written. @return C on success and C if the filename could not be opened for writing. @note @htmlinclude note-writing-zipped-files.html @see setProgramVersion(const std::string& version) @see setProgramName(const std::string& name) =item SBMLWriter::writeSBMLToString Writes the given SBML document to an in-memory string and returns a pointer to it. The string is owned by the caller and should be freed (with C()) when no longer needed. @param d the SBML document to be written. @return the string on success and C<0> if one of the underlying parser components fail. @see setProgramVersion(const std::string& version) @see setProgramName(const std::string& name) =item SBMLWriter::hasZlib Predicate returning C if this copy of libSBML has been linked with the zlib library. LibSBML supports reading and writing files compressed with either bzip2 or zip/gzip compression. The facility depends on libSBML having been compiled with the necessary support libraries. This method allows a calling program to inquire whether that is the case for the copy of libSBML it is using. @return C if libSBML is linked with zlib, C otherwise. C doc_note_static_methods @see @if clike hasBzip2() @else SBMLWriter::hasBzip2() @endif@~ =item SBMLWriter::hasBzip2 Predicate returning C if this copy of libSBML has been linked with the bzip2 library. LibSBML supports reading and writing files compressed with either bzip2 or zip/gzip compression. The facility depends on libSBML having been compiled with the necessary support libraries. This method allows a calling program to inquire whether that is the case for the copy of libSBML it is using. @return C if libSBML is linked with bzip2, C otherwise. C doc_note_static_methods @see @if clike hasZlib() @else SBMLWriter::hasZlib() @endif@~ =item writeSBML Writes the given SBML document C to the file named by C. This convenience function is functionally equivalent to: SBMLWriter_writeSBML(SBMLWriter_create(), d, filename); @htmlinclude assuming-compressed-file.html @param d the SBMLDocument object to be written out in XML format. @param filename a string giving the path to a file where the XML content is to be written. @return C<1> (true) on success and C<0> (false) if C could not be written. Some possible reasons for failure include (a) being unable to open the file, and (b) using a filename that indicates a compressed SBML file (i.e., a filename ending in C<".zip"> or similar) when the compression functionality has not been enabled in the underlying copy of libSBML. @see @if conly SBMLWriter_hasZlib() @else SBMLWriter::hasZlib() @endif @see @if conly SBMLWriter_hasBzip2() @else SBMLWriter::hasBzip2() @endif @if conly @memberof SBMLWriter_t @endif =item writeSBMLToString Writes the given SBML document C to an in-memory string and returns a pointer to it. The string is owned by the caller and should be freed (with free()) when no longer needed. This convenience function is functionally equivalent to: SBMLWriter_writeSBMLToString(SBMLWriter_create(), d); but does not require the caller to create an SBMLWriter object first. @param d an SBMLDocument object to be written out in XML format. @return the string on success and C if one of the underlying parser components fail. @if clike @warning Note that the string is owned by the caller and should be freed after it is no longer needed.@endif@~ @if conly @memberof SBMLWriter_t @endif =item writeSBMLToFile Writes the given SBML document C to the file C. This convenience function is functionally equivalent to: SBMLWriter_writeSBMLToFile(SBMLWriter_create(), d, filename); but that does not require the caller to create an SBMLWriter object first. @htmlinclude assuming-compressed-file.html @param d an SBMLDocument object to be written out in XML format. @param filename a string giving the path to a file where the XML content is to be written. @return C<1> (true) on success and C<0> (false) if C could not be written. Some possible reasons for failure include (a) being unable to open the file, and (b) using a filename that indicates a compressed SBML file (i.e., a filename ending in C<".zip"> or similar) when the compression functionality has not been enabled in the underlying copy of libSBML. @if clike @warning Note that the string is owned by the caller and should be freed (with the normal string C C++ function) after it is no longer needed.@endif@~ @see SBMLWriter::hasZlib() @see SBMLWriter::hasBzip2() @if conly @memberof SBMLWriter_t @endif =item SBMLTypeCode_toString This method takes an SBML type code and returns a string representing the code. @if clike LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. The set of possible type codes is defined in the enumeration #SBMLTypeCode_t. The names of the type codes all begin with the characters C. @endif@if java LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In other languages, the set of type codes is stored in an enumeration; in the Java language interface for libSBML, the type codes are defined as static integer constants in the interface class {@link libsbmlConstants}. The names of the type codes all begin with the characters C. @endif@if python LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the Python language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbml@endlink. The names of the type codes all begin with the characters C. @endif@if csharp LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the C# language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbml@endlink. The names of the type codes all begin with the characters C. @endif@~ @return a human readable name for the given @if clike #SBMLTypeCode_t value@else SBML type code@endif. @note The caller does not own the returned string and is therefore not allowed to modify it. =back =head2 SBase @sbmlpackage{core} @htmlinclude pkg-marker-core.html SBML's SBase class, base class of most SBML objects. Most components in SBML are derived from a single abstract base type, SBase. In addition to serving as the parent class for most other classes of objects in SBML, this base type is designed to allow a modeler or a software package to attach arbitrary information to each major element or list in an SBML model. SBase has an optional subelement called "notes". It is intended to serve as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. There are certain conditions on the XHTML content permitted inside the "notes" element; please consult the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "notes" content. SBase has another optional subelement called "annotation". Whereas the "notes" element described above is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. The element's content type is XML type "any", allowing essentially arbitrary data content. SBML places only a few restrictions on the organization of the content; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. As is the case with "notes", it is important to refer to the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "annotation" content. It is worth pointing out that the "annotation" element in the definition of SBase exists in order that software developers may attach optional application-specific data to the elements in an SBML model. However, it is important that this facility not be misused. In particular, it is critical that data essential to a model definition or that can be encoded in existing SBML elements is not stored in "annotation". Parameter values, functional dependencies between model elements, etc., should not be recorded as annotations. It is crucial to keep in mind the fact that data placed in annotations can be freely ignored by software applications. If such data affects the interpretation of a model, then software interoperability is greatly impeded. SBML Level 2 introduced an optional SBase attribute named "metaid" for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each "metaid" value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the "metaid" attribute used by SBML---something to be aware of if your application-specific XML content inside the "annotation" subelement happens to use XML ID.) The "metaid" value serves to identify a model component for purposes such as referencing that component from metadata placed within "annotation" subelements. Beginning with SBML Level 2 Version 2, SBase has an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO:NNNNNNN", where "NNNNNNN" is a seven digit integer number; libSBML simplifies the representation by only storing the "NNNNNNN" integer portion. Thus, in libSBML, the "sboTerm" attribute on SBase has data type C, and SBO identifiers are stored simply as integers. (For convenience, SBase offers methods for returning both the integer form and a text-string form of the SBO identifier.) SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for "sboTerm". More details can be found in SBML specifications for Level 2 Version 2 and above. Finally, note that, in the list of methods on SBase, there is no public constructor because SBase is an abstract class. The constructors reside in the subclasses derived from SBase. @section sbase-miriam Standard format for annotations linking data resources SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed regular format for encoding two particular categories of annotations: (a) references to controlled vocabulary terms and database identifiers which define and describe biological and biochemical entities in a model; and (b) descriptions of the provenance of a model, including its author(s) and modification history. =over =item SBase::accept @internal =item SBase::clone Creates and returns a deep copy of this SBase object. @return the (deep) copy of this SBase object. =item SBase::getElementBySId Returns the first child element found that has the given C in the model-wide C namespace, or C if no such object is found. @param id string representing the "id" attribute value of the object to find. @return pointer to the first element found with the given identifier. =item SBase::getElementBySId Returns the first child element found that has the given C in the model-wide C namespace, or C if no such object is found. @param id string representing the "id" attribute value of the object to find. @return pointer to the first element found with the given identifier. =item SBase::getElementByMetaId Returns the first child element it can find with a specific "metaid" attribute value, or C if no such object is found. C doc_what_is_metaid @param metaid string representing the "metaid" attribute value of the object to find. @return pointer to the first element found with the given meta-identifier. =item SBase::getElementByMetaId Returns the first child element it can find with a specific "metaid" attribute value, or C if no such object is found. C doc_what_is_metaid @param metaid string representing the "metaid" attribute value of the object to find. @return pointer to the first element found with the given meta-identifier. =item SBase::getAllElements Returns a List of all child SBase objects, including those nested to an arbitrary depth. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a pointer to a List of pointers to all objects that are children of this object. =item SBase::renameSIdRefs C doc_renamesidref_common =item SBase::renameMetaIdRefs C doc_renamemetasidref_common =item SBase::renameUnitSIdRefs C doc_renameunitsidref_common =item SBase::replaceSIDWithFunction @internal =item SBase::divideAssignmentsToSIdByFunction @internal =item SBase::multiplyAssignmentsToSIdByFunction @internal =item SBase::getElementFromPluginsBySId @internal =item SBase::getElementFromPluginsByMetaId @internal =item SBase::hasNonstandardIdentifierBeginningWith @internal =item SBase::prependStringToAllIdentifiers @internal =item SBase::transformIdentifiers @internal =item SBase::getAllElementsFromPlugins Returns a List of all child SBase objects contained in SBML package plug-ins. C doc_what_are_plugins This method walks down the list of all SBML Level 3 packages used by this object and returns all child objects defined by those packages. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a pointer to a List of pointers to all children objects from plug-ins. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBase::getMetaId Returns the value of the "metaid" attribute of this SBML object. C doc_what_is_metaid @return the meta-identifier of this SBML object. @see isSetMetaId() @see setMetaId(const std::string& metaid) =item SBase::getMetaId Returns the value of the "metaid" attribute of this SBML object. C doc_what_is_metaid @return the meta-identifier of this SBML object, as a string. @see isSetMetaId() @see setMetaId(const std::string& metaid) =item SBase::getId Returns the value of the "id" attribute of this SBML object, if it has one, or the "variable" attribute of a Rule, or the "symbol" attribute of an InitialAssignment. C doc_id_attribute @return the id of this SBML object, or the "variable" if the object is a Rule, or the "symbol" if the object is an InitialAssignment. @note Because of the inconsistent behavior of this function with respect to assignments and rules, callers should use getIdAttribute() instead. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item SBase::getIdAttribute Returns the value of the "id" attribute of this SBML object. C doc_id_attribute @return the id of this SBML object, if set and valid for this level and version of SBML; an empty string otherwise. @note Because of the inconsistent behavior of this function with respect to assignments and rules, callers should use getIdAttribute() instead. @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item SBase::getName Returns the value of the "name" attribute of this SBML object. C doc_get_name =item SBase::getNotes Returns the content of the "notes" subelement of this object as a tree of XMLNode objects. C doc_what_are_notes The "notes" element content returned by this method will be in XML form, but libSBML does not provide an object model specifically for the content of notes. Callers will need to traverse the XML tree structure using the facilities available on XMLNode and related objects. For an alternative method of accessing the notes, see getNotesString(). @return the content of the "notes" subelement of this SBML object as a tree structure composed of XMLNode objects. @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::getNotes Returns the content of the "notes" subelement of this object as a tree of XMLNode objects. C doc_what_are_notes The "notes" element content returned by this method will be in XML form, but libSBML does not provide an object model specifically for the content of notes. Callers will need to traverse the XML tree structure using the facilities available on XMLNode and related objects. For an alternative method of accessing the notes, see getNotesString(). @return the content of the "notes" subelement of this SBML object as a tree structure composed of XMLNode objects. @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::getNotesString Returns the content of the "notes" subelement of this object as a string. C doc_what_are_notes For an alternative method of accessing the notes, see getNotes(), which returns the content as an XMLNode tree structure. Depending on an application's needs, one or the other method may be more convenient. @return the content of the "notes" subelement of this SBML object as a string. @see getNotes() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::getNotesString Returns the content of the "notes" subelement of this object as a string. C doc_what_are_notes For an alternative method of accessing the notes, see getNotes(), which returns the content as an XMLNode tree structure. Depending on an application's needs, one or the other method may be more convenient. @return the content of the "notes" subelement of this SBML object as a string. @see getNotes() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::getAnnotation Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects. C doc_what_are_annotations The annotations returned by this method will be in XML form. LibSBML provides an object model and related interfaces for certain specific kinds of annotations, namely model history information and RDF content. See the ModelHistory, CVTerm and RDFAnnotationParser classes for more information about the facilities available. @return the annotation of this SBML object as a tree of XMLNode objects. @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::getAnnotation Returns the content of the "annotation" subelement of this object as a tree of XMLNode objects. C doc_what_are_annotations The annotations returned by this method will be in XML form. LibSBML provides an object model and related interfaces for certain specific kinds of annotations, namely model history information and RDF content. See the ModelHistory, CVTerm and RDFAnnotationParser classes for more information about the facilities available. @return the annotation of this SBML object as a tree of XMLNode objects. @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::getAnnotationString Returns the content of the "annotation" subelement of this object as a character string. C doc_what_are_annotations The annotations returned by this method will be in string form. See the method getAnnotation() for a version that returns annotations in XML form. @return the annotation of this SBML object as a character string. @see getAnnotation() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::getAnnotationString Returns the content of the "annotation" subelement of this object as a character string. C doc_what_are_annotations The annotations returned by this method will be in string form. See the method getAnnotation() for a version that returns annotations in XML form. @return the annotation of this SBML object as a character string. @see getAnnotation() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::getNamespaces Returns a list of the XML Namespaces declared on the SBML document owning this object. The SBMLNamespaces object encapsulates SBML Level/Version/namespaces information. It is used to communicate the SBML Level, Version, and (in Level 3) packages used in addition to SBML Level 3 Core. @return the XML Namespaces associated with this SBML object, or C in certain very usual circumstances where a namespace is not set. @see getLevel() @see getVersion() =item SBase::getSBMLDocument Returns the SBMLDocument object containing this object instance. C doc_what_is_SBMLDocument This method allows the caller to obtain the SBMLDocument for the current object. @return the parent SBMLDocument object of this SBML object. @see getParentSBMLObject() @see getModel() =item SBase::getSBMLDocument Returns the SBMLDocument object containing this object instance. C doc_what_is_SBMLDocument This method allows the caller to obtain the SBMLDocument for the current object. @return the parent SBMLDocument object of this SBML object. @see getParentSBMLObject() @see getModel() =item SBase::getParentSBMLObject Returns the parent SBML object containing this object. This returns the immediately-containing object. This method is convenient when holding an object nested inside other objects in an SBML model. @return the parent SBML object of this SBML object. @see getSBMLDocument() @see getModel() =item SBase::getParentSBMLObject Returns the parent SBML object containing this object. This returns the immediately-containing object. This method is convenient when holding an object nested inside other objects in an SBML model. @return the parent SBML object of this SBML object. @see getSBMLDocument() @see getModel() =item SBase::getAncestorOfType Returns the first ancestor object that has the given SBML type code from the given package. @if clike LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. The set of possible type codes is defined in the enumeration #SBMLTypeCode_t. The names of the type codes all begin with the characters C. @endif@if java LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In other languages, the set of type codes is stored in an enumeration; in the Java language interface for libSBML, the type codes are defined as static integer constants in the interface class {@link libsbmlConstants}. The names of the type codes all begin with the characters C. @endif@if python LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the Python language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbml@endlink. The names of the type codes all begin with the characters C. @endif@if csharp LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the C# language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with the characters C. @endif@~ This method searches the tree of objects that are parents of this object, and returns the first one that has the given SBML type code from the given C. @param type the SBML type code of the object sought. @param pkgName (optional) the short name of an SBML Level 3 package to which the sought-after object must belong. @return the ancestor SBML object of this SBML object that corresponds to the given @if clike #SBMLTypeCode_t value@else SBML object type code@endif, or C if no ancestor exists. @warning The optional argument C must be used for all type codes from SBML Level 3 packages. Otherwise, the function will search the "core" namespace alone, not find any corresponding elements, and return NULL. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBase::getAncestorOfType Returns the first ancestor object that has the given SBML type code from the given package. @if clike LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. The set of possible type codes is defined in the enumeration #SBMLTypeCode_t. The names of the type codes all begin with the characters C. @endif@if java LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In other languages, the set of type codes is stored in an enumeration; in the Java language interface for libSBML, the type codes are defined as static integer constants in the interface class {@link libsbmlConstants}. The names of the type codes all begin with the characters C. @endif@if python LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the Python language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbml@endlink. The names of the type codes all begin with the characters C. @endif@if csharp LibSBML attaches an identifying code to every kind of SBML object. These are known as SBML type codes. In the C# language interface for libSBML, the type codes are defined as static integer constants in the interface class @link libsbmlcs.libsbml libsbml@endlink. The names of the type codes all begin with the characters C. @endif@~ This method searches the tree of objects that are parents of this object, and returns the first one that has the given SBML type code from the given C. @param type the SBML type code of the object sought. @param pkgName (optional) the short name of an SBML Level 3 package to which the sought-after object must belong. @return the ancestor SBML object of this SBML object that corresponds to the given @if clike #SBMLTypeCode_t value@else SBML object type code@endif, or C if no ancestor exists. @warning The optional argument C must be used for all type codes from SBML Level 3 packages. Otherwise, the function will search the "core" namespace alone, not find any corresponding elements, and return NULL. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBase::getSBOTerm Returns the integer portion of the value of the "sboTerm" attribute of this object. C doc_sbo_terms C doc_sbo_terms_addendum @return the value of the "sboTerm" attribute as an integer, or C<-1> if the value is not set. =item SBase::getSBOTermID Returns the string representation of the "sboTerm" attribute of this object. C doc_sbo_terms C doc_sbo_terms_addendum @return the value of the "sboTerm" attribute as a string (its value will be of the form "SBO:NNNNNNN"), or an empty string if the value is not set. =item SBase::getSBOTermAsURL Returns the URL representation of the "sboTerm" attribute of this object. This method returns the entire SBO identifier as a text string in the form http://identifiers.org/biomodels.sbo/SBO:NNNNNNN". C doc_sbo_terms_addendum @return the value of the "sboTerm" attribute as an identifiers.org URL, or an empty string if the value is not set. =item SBase::getLine Returns the line number where this object first appears in the XML representation of the SBML document. @return the line number of this SBML object. If this object was created programmatically and not read from a file, this method will return the value C<0>. @note The line number for each construct in an SBML model is set upon reading the model. The accuracy of the line number depends on the correctness of the XML representation of the model, and on the particular XML parser library being used. The former limitation relates to the following problem: if the model is actually invalid XML, then the parser may not be able to interpret the data correctly and consequently may not be able to establish the real line number. The latter limitation is simply that different parsers seem to have their own accuracy limitations, and out of all the parsers supported by libSBML, none have been 100% accurate in all situations. (At this time, libSBML supports the use of libxml2, Expat and Xerces.) @see getColumn() =item SBase::getColumn Returns the column number where this object first appears in the XML representation of the SBML document. @return the column number of this SBML object. If this object was created programmatically and not read from a file, this method will return the value C<0>. @note The column number for each construct in an SBML model is set upon reading the model. The accuracy of the column number depends on the correctness of the XML representation of the model, and on the particular XML parser library being used. The former limitation relates to the following problem: if the model is actually invalid XML, then the parser may not be able to interpret the data correctly and consequently may not be able to establish the real column number. The latter limitation is simply that different parsers seem to have their own accuracy limitations, and out of all the parsers supported by libSBML, none have been 100% accurate in all situations. (At this time, libSBML supports the use of libxml2, Expat and Xerces.) @see getLine() =item SBase::getModelHistory Returns the ModelHistory object, if any, attached to this object. @return the ModelHistory object attached to this object, or C if none exist. @note In SBML Level 2, model history annotations were only permitted on the Model element. In SBML Level 3, they are permitted on all SBML components derived from SBase. =item SBase::getModelHistory Returns the ModelHistory object, if any, attached to this object. @return the ModelHistory object attached to this object, or C if none exist. @note In SBML Level 2, model history annotations were only permitted on the Model element. In SBML Level 3, they are permitted on all SBML components derived from SBase. =item SBase::isSetMetaId Predicate returning C if this object's "metaid" attribute is set. C doc_what_is_metaid @return C if the "metaid" attribute of this SBML object is set, C otherwise. @see getMetaId() @see setMetaId(const std::string& metaid) =item SBase::isSetId Predicate returning C if a call to getId() returns a non-empty string. For most objects, this function will return C if its "id" attribute is set, and C if it is not, or if the object has no "id" attribute at all. However, for an EventAssignment or a Rule, isSetId() checks whether the "variable" attribute is set, and for an InitialAssignment, it checks whether the "symbol" attribute is set. Because those elements will also have an "id" attribute in SBML Level 3 Version 2 which isSetId() will not check, the function itself is deprecated, and it is recommended to use isSetIdAttribute() in all cases where one needs to know whether the "id" attribute is set, and to use EventAssignment::isSetVariable(), Rule::isSetVariable() and InitialAssignment::isSetSymbol() when the status of the "variable" or "symbol" attributes need to be checked. C doc_isset_id =item SBase::isSetIdAttribute Predicate returning C if this object's "id" attribute is set. C doc_id_attribute @return C if the "id" attribute of this SBML object is set, C otherwise. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see unsetIdAttribute() =item SBase::isSetName Predicate returning C if this object's "name" attribute is set. C doc_isset_name =item SBase::isSetNotes Predicate returning C if this object's "notes" subelement exists and has content. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode xhtml@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. @return C if a "notes" subelement exists, C otherwise. @see getNotes() @see getNotesString() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::isSetAnnotation Predicate returning C if this object's "annotation" subelement exists and has content. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. @return C if a "annotation" subelement exists, C otherwise. @see getAnnotation() @see getAnnotationString() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::isSetSBOTerm Predicate returning C if this object's "sboTerm" attribute is set. @return C if the "sboTerm" attribute of this SBML object is set, C otherwise. =item SBase::setMetaId Sets the value of the meta-identifier attribute of this SBML object. C doc_what_is_metaid The string C is copied. @param metaid the identifier string to use as the value of the "metaid" attribute. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @see getMetaId() @see isSetMetaId() =item SBase::isSetModelHistory Predicate returning C if this object has a ModelHistory object attached to it. @return C if the ModelHistory of this object is set, C otherwise. @note In SBML Level 2, model history annotations were only permitted on the Model element. In SBML Level 3, they are permitted on all SBML components derived from SBase. =item SBase::setId Sets the value of the "id" attribute of this SBML object. C doc_set_id =item SBase::setIdAttribute Sets the value of the "id" attribute of this SBML object. C doc_set_id =item SBase::setName Sets the value of the "name" attribute of this SBML object. C doc_set_name =item SBase::setAnnotation Sets the value of the "annotation" subelement of this SBML object. The content of C is copied, and any previous content of this object's "annotation" subelement is deleted. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. Call this method will result in any existing content of the "annotation" subelement to be discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the @p annotation that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use SBase::appendAnnotation(const XMLNode annotation) or SBase::appendAnnotation(const std::string& annotation). @param annotation an XML structure that is to be used as the new content of the "annotation" subelement of this object. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::setAnnotation Sets the value of the "annotation" subelement of this SBML object. The content of C is copied, and any previous content of this object's "annotation" subelement is deleted. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. Call this method will result in any existing content of the "annotation" subelement to be discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the @p annotation that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use SBase::appendAnnotation(const XMLNode annotation) or SBase::appendAnnotation(const std::string& annotation). @param annotation an XML string that is to be used as the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::appendAnnotation Appends the given C to the "annotation" subelement of this object. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. Unlike SBase::setAnnotation(const XMLNode annotation) or SBase::setAnnotation(const std::string& annotation), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML structure that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink (if the parent element does not have the 'metaid' attribute set) @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS@endlink (if the parent was already annotated with the annotation in question) @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const std::string& annotation) @see unsetAnnotation() =item SBase::appendAnnotation Appends the given C to the "annotation" subelement of this object. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. Unlike SBase::setAnnotation(const XMLNode annotation) or SBase::setAnnotation(const std::string& annotation), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML string that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink (if the parent element does not have the 'metaid' attribute set) @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_ANNOTATION_NS LIBSBML_DUPLICATE_ANNOTATION_NS@endlink (if the parent was already annotated with the annotation in question) @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see unsetAnnotation() =item SBase::removeTopLevelAnnotationElement Removes the top-level element within the "annotation" subelement of this SBML object with the given name and optional URI. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. Calling this method allows a particular annotation element to be removed whilst the remaining annotations remain intact. @param elementName a string representing the name of the top level annotation element that is to be removed. @param elementURI an optional string that is used to check both the name and URI of the top level element to be removed. @param removeEmpty if after removing of the element, the annotation is empty, and the removeEmpty argument is true, the annotation node will be deleted (default). C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_ANNOTATION_NAME_NOT_FOUND LIBSBML_ANNOTATION_NAME_NOT_FOUND@endlink @li @link OperationReturnValues_t#LIBSBML_ANNOTATION_NS_NOT_FOUND LIBSBML_ANNOTATION_NS_NOT_FOUND@endlink @see replaceTopLevelAnnotationElement(const XMLNode ) @see replaceTopLevelAnnotationElement(const std::string&) =item SBase::replaceTopLevelAnnotationElement Replaces the given top-level element within the "annotation" subelement of this SBML object and with the annotation element supplied. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling C< removeTopLevelAnnotationElement(name)> followed by calling C, with the exception that the placement of the annotation element remains the same. @param annotation XMLNode representing the replacement top level annotation. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see removeTopLevelAnnotationElement(const std::string elementName, const std::string elementURI, bool removeEmpty) @see replaceTopLevelAnnotationElement(const std::string&) =item SBase::replaceTopLevelAnnotationElement Replaces the given top-level element within the "annotation" subelement of this SBML object and with the annotation element supplied. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling C< removeTopLevelAnnotationElement(name)> followed by calling C, with the exception that the placement of the annotation element remains the same. @param annotation string representing the replacement top level annotation. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see removeTopLevelAnnotationElement(const std::string elementName, const std::string elementURI) @see replaceTopLevelAnnotationElement(const XMLNode ) =item SBase::setNotes Sets the value of the "notes" subelement of this SBML object. The content of C is copied, and any existing content of this object's "notes" subelement is deleted. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode xhtml@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. @param notes an XML structure that is to be used as the content of the "notes" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see getNotesString() @see isSetNotes() @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::setNotes Sets the value of the "notes" subelement of this SBML object to a copy of the string C. The content of C is copied, and any existing content of this object's "notes" subelement is deleted. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. The following code illustrates a very simple way of setting the notes using this method. Here, the object being annotated is the whole SBML document, but that is for illustration purposes only; you could of course use this same approach to annotate any other SBML component. @if cpp C.cpp} SBMLDocument s = new SBMLDocument(3, 1); s->setNotes("

here is my note

"); @endcode @endif @if java C.java} SBMLDocument s = new SBMLDocument(3, 1); s.setNotes("

here is my note

"); @endcode @endif @if python C.py} try: sbmlDoc = SBMLDocument(3, 1) except ValueError: print('Could not create SBMLDocument object') sys.exit(1) note = "

here is my note

" status = sbmlDoc.setNotes(note) if status != LIBSBML_OPERATION_SUCCESS: # Do something to handle the error here. print("Unable to set notes on the SBML document object") sys.exit(1) @endcode @endif @if csharp C SBMLDocument s = new SBMLDocument(3, 1); s.setNotes("

here is my note

"); @endcode @endif@~ @param notes an XML string that is to be used as the content of the "notes" subelement of this object. @param addXHTMLMarkup a boolean indicating whether to wrap the contents of the C argument with XHTML paragraph (C<<p>>) tags. This is appropriate when the string in C does not already containg the appropriate XHTML markup. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::appendNotes Appends the given C to the "notes" subelement of this object. The content of C is copied. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. @param notes an XML node structure that is to appended to the content of the "notes" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const std::string& notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::appendNotes Appends the given C to the "notes" subelement of this object. The content of the parameter C is copied. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. @param notes an XML string that is to appended to the content of the "notes" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see unsetNotes() @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::setModelHistory Sets the ModelHistory of this object. The content of C is copied, and this object's existing model history content is deleted. @param history ModelHistory of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note In SBML Level 2, model history annotations were only permitted on the Model element. In SBML Level 3, they are permitted on all SBML components derived from SBase. =item SBase::setSBMLDocument @internal =item SBase::connectToParent @internal =item SBase::setSBOTerm Sets the value of the "sboTerm" attribute. C doc_sbo_terms C doc_sbo_terms_addendum @param value the NNNNNNN integer portion of the SBO identifier. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @see setSBOTerm(const std::string &sboid) =item SBase::setSBOTerm Sets the value of the "sboTerm" attribute by string. C doc_sbo_terms C doc_sbo_terms_addendum @param sboid the SBO identifier string of the form "SBO:NNNNNNN". C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @see setSBOTerm(int value) =item SBase::setNamespaces Sets the namespaces relevant of this SBML object. The content of C is copied, and this object's existing namespace content is deleted. The SBMLNamespaces object encapsulates SBML Level/Version/namespaces information. It is used to communicate the SBML Level, Version, and (in Level 3) packages used in addition to SBML Level 3 Core. @param xmlns the namespaces to set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SBase::unsetMetaId Unsets the value of the "metaid" attribute of this SBML object. C doc_what_is_metaid C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SBase::unsetId Unsets the value of the "id" attribute of this SBML object. C doc_unset_id =item SBase::unsetIdAttribute Unsets the value of the "id" attribute of this SBML object. Most (but not all) objects in SBML include two common attributes: "id" and "name". The identifier given by an object's "id" attribute value is used to identify the object within the SBML model definition. Other objects can refer to the component using this identifier. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() =item SBase::unsetName Unsets the value of the "name" attribute of this SBML object. C doc_unset_name =item SBase::unsetNotes Unsets the value of the "notes" subelement of this SBML object. The optional SBML element named "notes", present on every major SBML component type, is intended as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. Every object derived directly or indirectly from type SBase can have a separate value for "notes", allowing users considerable freedom when adding comments to their models. The format of "notes" elements must be XHTML 1.0. To help verify the formatting of "notes" content, libSBML provides the static utility method SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif); however, readers are urged to consult the appropriate SBML specification document for the Level and Version of their model for more in-depth explanations. The SBML Level 2 and 3 specifications have considerable detail about how "notes" element content must be structured. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getNotesString() @see isSetNotes() @see setNotes(const XMLNode notes) @see setNotes(const std::string& notes, bool addXHTMLMarkup) @see appendNotes(const XMLNode notes) @see appendNotes(const std::string& notes) @see SyntaxChecker::hasExpectedXHTMLSyntax(@if java XMLNode@endif) =item SBase::unsetAnnotation Unsets the value of the "annotation" subelement of this SBML object. Whereas the SBase "notes" subelement is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content I meant to be shown to humans. Every object derived from SBase can have its own value for "annotation". The element's content type is XML type "any", allowing essentially arbitrary well-formed XML data content. SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getAnnotation() @see getAnnotationString() @see isSetAnnotation() @see setAnnotation(const XMLNode annotation) @see setAnnotation(const std::string& annotation) @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) =item SBase::unsetSBOTerm Unsets the value of the "sboTerm" attribute of this SBML object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item SBase::addCVTerm Adds a copy of the given CVTerm object to this SBML object. @param term the CVTerm to assign. @param newBag if C, creates a new RDF bag with the same identifier as a previous bag, and if C, adds the term to an existing RDF bag with the same type of qualifier as the term being added. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink, if this object lacks a "metaid" attribute @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note Since the CV Term uses the "metaid" attribute of the object as a reference, if the object has no "metaid" attribute value set, then the CVTerm will not be added. C doc_note_object_is_copied @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBase::getCVTerms Returns a list of CVTerm objects in the annotations of this SBML object. @return the list of CVTerms for this SBML object. =item SBase::getCVTerms Returns a list of CVTerm objects in the annotations of this SBML object. @return the list of CVTerms for this SBML object. =item SBase::getNumCVTerms Returns the number of CVTerm objects in the annotations of this SBML object. @return the number of CVTerms for this SBML object. =item SBase::getCVTerm Returns the nth CVTerm in the list of CVTerms of this SBML object. @param n unsigned int the index of the CVTerm to retrieve. @return the nth CVTerm in the list of CVTerms for this SBML object. If the index C is invalid, C is returned. =item SBase::unsetCVTerms Clears the list of CVTerm objects attached to this SBML object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SBase::unsetModelHistory Unsets the ModelHistory object attached to this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note In SBML Level 2, model history annotations were only permitted on the Model element. In SBML Level 3, they are permitted on all SBML components derived from SBase. =item SBase::getResourceBiologicalQualifier Returns the MIRIAM biological qualifier associated with the given resource. In MIRIAM, qualifiers are an optional means of indicating the relationship between a model component and its annotations. There are two broad kinds of annotations: model and biological. The latter kind is used to qualify the relationship between a model component and a biological entity which it represents. Examples of relationships include "is" and "has part", but many others are possible. MIRIAM defines numerous relationship qualifiers to enable different software tools to qualify biological annotations in the same standardized way. In libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model element are represented using lists of CVTerm objects, and the the MIRIAM biological qualifiers are represented using values @if clike from the enumeration type #BiolQualifierType_t.@endif@if python whose names begin with C in the interface class @link libsbml libsbml@endlink.@endif@if java whose names begin with C in the interface class {@link libsbmlConstants}.@endif@if csharp whose names begin with C in the interface class @link libsbmlcs.libsbml libsbml@endlink.@endif@~ This method searches the controlled-vocabulary annotations (i.e., the list of CVTerm objects) on the present object, then out of those that have biological qualifiers, looks for an annotation to the given C. If such an annotation is found, it returns the type of biological qualifier associated with that resource as a value @if clike from the enumeration type #BiolQualifierType_t.@endif@if python whose name begins with C from the interface class @link libsbml libsbml@endlink.@endif@if java whose name begins with C from the interface class {@link libsbmlConstants}.@endif@if csharp whose names begin with C in the interface class @link libsbmlcs.libsbml libsbml@endlink.@endif@~ @param resource string representing the resource; e.g., C<"http://www.geneontology.org/#GO:0005892">. @return the qualifier associated with the resource, or @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink if the resource does not exist. @if clike @note The set of MIRIAM biological qualifiers grows over time, although relatively slowly. The values in the enumeration #BiolQualifierType_t are up to date with MIRIAM at the time of a given libSBML release. The set of values may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if python @note The set of MIRIAM biological qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in @link libsbml libsbml@endlink may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if java @note The set of MIRIAM biological qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in {@link libsbmlConstants} may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if csharp @note The set of MIRIAM biological qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in @link libsbmlcs.libsbml libsbml@endlink may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@~ =item SBase::getResourceModelQualifier Returns the MIRIAM model qualifier associated with the given resource. In MIRIAM, qualifiers are an optional means of indicating the relationship between a model component and its annotations. There are two broad kinds of annotations: model and biological. The former kind is used to qualify the relationship between a model component and another modeling object. An example qualifier is "isDerivedFrom", to indicate that a given component of the model is derived from the modeling object represented by the referenced resource. MIRIAM defines numerous relationship qualifiers to enable different software tools to qualify model annotations in the same standardized way. In libSBML, the MIRIAM controlled-vocabulary annotations on an SBML model element are represented using lists of CVTerm objects, and the the MIRIAM model qualifiers are represented using values @if clike from the enumeration type #ModelQualifierType_t.@endif@if python whose names begin with C in the interface class @link libsbml libsbml@endlink.@endif@if java whose names begin with C in the interface class {@link libsbmlConstants}.@endif@if csharp whose names begin with C in the interface class @link libsbmlcs.libsbml libsbml@endlink.@endif@~ This method method searches the controlled-vocabulary annotations (i.e., the list of CVTerm objects) on the present object, then out of those that have model qualifiers, looks for an annotation to the given C. If such an annotation is found, it returns the type of type of model qualifier associated with that resource as a value @if clike from the enumeration type #ModelQualifierType_t.@endif@if python whose name begins with C from the interface class @link libsbml libsbml@endlink.@endif@if java whose name begins with C from the interface class {@link libsbmlConstants}.@endif@if csharp whose names begin with C in the interface class @link libsbmlcs.libsbml libsbml@endlink.@endif@~ @param resource string representing the resource; e.g., C<"http://www.geneontology.org/#GO:0005892">. @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ associated with the resource, or @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink if the resource does not exist. @if clike @note The set of MIRIAM biological qualifiers grows over time, although relatively slowly. The values in the enumeration #ModelQualifierType_t are up to date with MIRIAM at the time of a given libSBML release. The set of values may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if python @note The set of MIRIAM model qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in @link libsbml libsbml@endlink may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if java @note The set of MIRIAM model qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in {@link libsbmlConstants} may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@if csharp @note The set of MIRIAM model qualifiers grows over time, although relatively slowly. The values are up to date with MIRIAM at the time of a given libSBML release. The set of values in list of C constants defined in @link libsbmlcs.libsbml libsbml@endlink may be expanded in later libSBML releases, to match the values defined by MIRIAM at that later time. @endif@~ =item SBase::getModel Returns the Model object for the SBML Document in which the current object is located. @return the Model object for the SBML Document of this SBML object. @see getParentSBMLObject() @see getSBMLDocument() =item SBase::getLevel Returns the SBML Level of the SBMLDocument object containing I object. C doc_what_is_SBMLDocument @return the SBML level of this SBML object. @see getVersion() @see getNamespaces() @see getPackageVersion() =item SBase::getVersion Returns the Version within the SBML Level of the SBMLDocument object containing I object. C doc_what_is_SBMLDocument @return the SBML version of this SBML object. @see getLevel() @see getNamespaces() =item SBase::getPackageCoreVersion Returns the SBML Core Version within the SBML Level of the actual object. C doc_what_is_SBMLDocument @return the SBML core version of this SBML object. =item SBase::getPackageVersion Returns the Version of the SBML Level 3 package to which this element belongs to. @return the version of the SBML Level 3 package to which this element belongs. The value C<0> will be returned if this element belongs to the SBML Level 3 Core package. @see getLevel() @see getVersion() =item SBase::getPackageName Returns the name of the SBML Level 3 package in which this element is defined. @return the name of the SBML package in which this element is defined. The string C<"core"> will be returned if this element is defined in SBML Level 3 Core. The string C<"unknown"> will be returned if this element is not defined in any SBML package. =item SBase::getTypeCode Returns the libSBML type code for this object. C doc_what_are_typecodes C doc_additional_typecode_details @return the @if clike #SBMLTypeCode_t value@else SBML object type code@endif@~ of this SBML object, or @link SBMLTypeCode_t#SBML_UNKNOWN SBML_UNKNOWN@endlink (the default). The latter is possible because subclasses of SBase are not required to implement this method to return a type code. C doc_warning_typecodes_not_unique @see getPackageName() @see getElementName() =item SBase::hasValidLevelVersionNamespaceCombination Predicate returning C if this object's level/version and namespace values correspond to a valid SBML specification. The valid combinations of SBML Level, Version and Namespace as of this release of libSBML are the following: \n=over\n \n=item\n\nLevel 1 Version 2: "http://www.sbml.org/sbml/level1" \n=item\n\nLevel 2 Version 1: "http://www.sbml.org/sbml/level2" \n=item\n\nLevel 2 Version 2: "http://www.sbml.org/sbml/level2/version2" \n=item\n\nLevel 2 Version 3: "http://www.sbml.org/sbml/level2/version3" \n=item\n\nLevel 2 Version 4: "http://www.sbml.org/sbml/level2/version4" \n=item\n\nLevel 2 Version 5: "http://www.sbml.org/sbml/level2/version5" \n=item\n\nLevel 3 Version 1 Core: "http://www.sbml.org/sbml/level3/version1/core" \n=item\n\nLevel 3 Version 2 Core: "http://www.sbml.org/sbml/level3/version2/core" \n=back\n @return C if the level, version and namespace values of this SBML object correspond to a valid set of values, C otherwise. =item SBase::getElementName Returns the XML element name of this object. This is overridden by subclasses to return a string appropriate to the SBML component. For example, Model defines it as returning C<"model">, CompartmentType defines it as returning C<"compartmentType">, and so on. =item SBase::toSBML Returns a string consisting of a partial SBML corresponding to just this object. @return the partial SBML that describes this SBML object. @warning This is primarily provided for testing and debugging purposes. It may be removed in a future version of libSBML. =item SBase::toXMLNode Returns this element as an XMLNode. @return this element as an XMLNode. @warning This operation is computationally expensive, because the element has to be fully serialized to a string and then parsed into the XMLNode structure. Attempting to convert a large tree structure (e.g., a large Model) may consume significant computer memory and time. =item SBase::read Reads (initializes) this SBML object by reading from the given XMLNode. @param node the XMLNode to read from. @param flag an optional flag that determines how how errors are logged during the reading process. @warning This method is computationally expensive, because the given node has to be serialized to a string first. Attempting to serialize a large tree structure (e.g., a large Model) may consume significant computer memory and time. =item SBase::getPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension with the given package name or URI. The returned plug-in will be the appropriate type of plugin requested: calling Model::getPlugin("fbc") will return an FbcModelPlugin; calling Parameter::getPlugin("comp") will return CompSBasePlugin, etc. If no such plugin exists, NULL is returned. C doc_what_are_plugins @param package the name or URI of the package. @return the plug-in object (the libSBML extension interface) of a package extension with the given package name or URI. @see getPlugin(unsigned int n) =item SBase::getPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension with the given package name or URI. The returned plug-in will be the appropriate type of plugin requested: calling Model::getPlugin("fbc") will return an FbcModelPlugin; calling Parameter::getPlugin("comp") will return CompSBasePlugin, etc. If no such plugin exists, NULL is returned. C doc_what_are_plugins @param package the name or URI of the package. @return the plug-in object (the libSBML extension interface) of a package extension with the given package name or URI. @see getPlugin(unsigned int n) =item SBase::getPlugin Returns the nth plug-in object (extension interface) for an SBML Level 3 package extension. The returned plug-in will be the appropriate type of plugin requested: calling Model::getPlugin("fbc") will return an FbcModelPlugin; calling Parameter::getPlugin("comp") will return CompSBasePlugin, etc. If no such plugin exists, NULL is returned. C doc_what_are_plugins @param n the index of the plug-in to return. @return the nth plug-in object (the libSBML extension interface) of a package extension. If the index C is invalid, C is returned. @see getNumPlugins() @see getPlugin(const std::string& package) =item SBase::getPlugin Returns the nth plug-in object (extension interface) for an SBML Level 3 package extension. The returned plug-in will be the appropriate type of plugin requested: calling Model::getPlugin("fbc") will return an FbcModelPlugin; calling Parameter::getPlugin("comp") will return CompSBasePlugin, etc. If no such plugin exists, NULL is returned. C doc_what_are_plugins @param n the index of the plug-in to return. @return the nth plug-in object (the libSBML extension interface) of a package extension. If the index C is invalid, C is returned. @see getNumPlugins() @see getPlugin(const std::string& package) =item SBase::getDisabledPlugin Returns the nth disabled plug-in object (extension interface) for an SBML Level 3 package extension. If no such plugin exists, NULL is returned. C doc_what_are_plugins C doc_what_are_disabled_plugins @param n the index of the disabled plug-in to return. @return the nth disabled plug-in object (the libSBML extension interface) of a package extension. If the index C is invalid, C is returned. @see getNumDisabledPlugins() @see getPlugin(const std::string& package) =item SBase::getDisabledPlugin Returns the nth disabled plug-in object (extension interface) for an SBML Level 3 package extension. If no such plugin exists, NULL is returned. C doc_what_are_plugins C doc_what_are_disabled_plugins @param n the index of the disabled plug-in to return. @return the nth disabled plug-in object (the libSBML extension interface) of a package extension. If the index C is invalid, C is returned. @see getNumDisabledPlugins() @see getPlugin(const std::string& package) =item SBase::getNumPlugins Returns the number of plug-in objects (extenstion interfaces) for SBML Level 3 package extensions known. C doc_what_are_plugins @return the number of plug-in objects (extension interfaces) of package extensions known by this instance of libSBML. @see getPlugin(unsigned int n) =item SBase::getNumDisabledPlugins Returns the number of disabled plug-in objects (extension interfaces) for SBML Level 3 package extensions known. C doc_what_are_plugins C doc_what_are_disabled_plugins @return the number of disabled plug-in objects (extension interfaces) of package extensions known by this instance of libSBML. =item SBase::deleteDisabledPlugins Deletes all information stored in disabled plugins. If the plugin is re-enabled later, it will then not have any previously-stored information. C doc_what_are_plugins C doc_what_are_disabled_plugins @param recursive if C, the disabled information will be deleted also from all child elements, otherwise only from this SBase element. @see getNumDisabledPlugins() =item SBase::enablePackage Enables or disables the given SBML Level 3 package on this object. This method enables the specified package on this object and other objects connected by child-parent links in the same SBMLDocument object. This method is the converse of SBase::disablePackage(const std::string& pkgURI, const std::string& pkgPrefix). @param pkgURI the URI of the package. @param pkgPrefix the XML prefix of the package. @param flag whether to enable (C) or disable (C) the package. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION@endlink @see disablePackage(const std::string& pkgURI, const std::string& pkgPrefix) =item SBase::disablePackage Disables the given SBML Level 3 package on this object. This method disables the specified package on this object and other objects connected by child-parent links in the same SBMLDocument object. An example of when this may be useful is during construction of model components when mixing existing and new models. Suppose your application read an SBML document containing a model that used the SBML Hierarchical Model Composition (“comp”) package, and extracted parts of that model in order to construct a new model in memory. The new, in-memory model will not accept a component drawn from an other SBMLDocument with different package namespace declarations. You could reconstruct the same namespaces in the in-memory model first, but as a shortcut, you could also disable the package namespace on the object being added. Here is a code example to help clarify this: @if cpp C.cpp} // We read in an SBML L3V1 model that uses the 'comp' // package namespace. doc = readSBML("sbml-file-with-comp-elements.xml"); // We extract one of the species from the model. Species s1 = doc->getModel()->getSpecies(0); // We construct a new model. This model does not use the // 'comp' package. Model newModel = new Model(3,1); // The following will fail with an error, because addSpecies() // will first check that the parent of the given object has // namespaces declared, and will discover that s1 does but // newModel does not. // newModel->addSpecies(s1); // However, if we disable the 'comp' package on s1, then // the call to addSpecies will work. s1->disablePackage("http://www.sbml.org/sbml/level3/version1/comp/version1", "comp"); newModel->addSpecies(s1); @endcode @endif @if python C.py} import sys import os.path from libsbml import # We read an SBML L3V1 model that uses the 'comp' package. doc = readSBML("sbml-file-with-comp-elements.xml"); if doc.getNumErrors() E 0: print('readSBML encountered errors while reading the file.') doc.printErrors() sys.exit(1) # We extract one of the species from the model. model = doc.getModel() if model == None: print('Unable to retrieve Model object') sys.exit(1) s1 = model.getSpecies(0) if s1 == None: print('Unable to retrieve Species object') sys.exit(1) # We construct a new model. # This model does not use the 'comp' package. try: newDoc = SBMLDocument(3, 1) except ValueError: print('Could not create SBMLDocument object') sys.exit(1) newModel = newDoc.createModel() if newModel == None: print('Unable to create new Model object') sys.exit(1) # The following would normally fail with an error, because # addSpecies() would first check that the parent of the given # object has namespaces declared, and will discover that s1 # does but newModel does not. # newModel.addSpecies(s1) # However, if we disable the 'comp' package on s1, then the # call to addSpecies will work. compNS = "http://www.sbml.org/sbml/level3/version1/comp/version1" status = s1.disablePackage(compNS, "comp") if status != LIBSBML_OPERATION_SUCCESS: print('Unable to disable package.') sys.exit(1) newSpecies = newModel.addSpecies(s1) # This will work now. if newSpecies == None: print('Could not add Species') # (This will not happen, sys.exit(1) # but always check errors.) @endcode @endif @if java C.java} // We read in an SBML L3V1 model that uses the 'comp' package namespace SBMLReader reader = new SBMLReader(); SBMLDocument doc = reader.readSBML("sbml-file-with-comp-elements.xml"); // We extract one of the species from the model we just read in. Species s1 = doc.getModel().getSpecies(0); // We construct a new model. This model does not use the 'comp' package. Model newModel = new Model(3,1); // The following will fail with an error, because addSpecies() will // first check that the parent of the given object has namespaces // declared, and will discover that s1 does but newModel does not. // newModel->addSpecies(s1); // However, if we disable the 'comp' package on s1, then the call // to addSpecies will work. s1->disablePackage("http://www.sbml.org/sbml/level3/version1/comp/version1", "comp"); newModel.addSpecies(s1); @endcode @endif @param pkgURI the URI of the package. @param pkgPrefix the XML prefix of the package. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_UNKNOWN LIBSBML_PKG_UNKNOWN@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_VERSION_MISMATCH LIBSBML_PKG_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_CONFLICTED_VERSION LIBSBML_PKG_CONFLICTED_VERSION@endlink @see enablePackage(const std::string& pkgURI, const std::string& pkgPrefix, bool flag) =item SBase::enablePackageInternal @internal =item SBase::isPackageURIEnabled Predicate returning C if an SBML Level 3 package with the given URI is enabled with this object. @param pkgURI the URI of the package. @return C if the given package is enabled within this object, @c false otherwise. @see isPackageEnabled(@if java String@endif) =item SBase::isPackageEnabled Predicate returning C if the given SBML Level 3 package is enabled with this object. The search ignores the package version. @param pkgName the name of the package. @return C if the given package is enabled within this object, C otherwise. @see isPackageURIEnabled(@if java String@endif) =item SBase::isPkgURIEnabled Predicate returning C if an SBML Level 3 package with the given URI is enabled with this object. @param pkgURI the URI of the package. @return C if the given package is enabled within this object, @c false otherwise. @deprecated Replaced in libSBML 5.2.0 by SBase::isPackageURIEnabled(@if java String@endif). @see isPkgEnabled(@if java String@endif) =item SBase::isPkgEnabled Predicate returning C if the given SBML Level 3 package is enabled with this object. The search ignores the package version. @param pkgName the name of the package. @return C if the given package is enabled within this object, C otherwise. @deprecated Replaced in libSBML 5.2.0 by SBase::isPackageEnabled(@if java String@endif). @see isPkgURIEnabled(@if java String@endif) =item SBase::writeExtensionElements @internal =item SBase::read @internal =item SBase::write @internal =item SBase::writeElements @internal =item SBase::hasRequiredAttributes @internal =item SBase::hasRequiredElements @internal =item SBase::checkCompatibility @internal =item SBase::setSBMLNamespaces @internal =item SBase::setSBMLNamespacesAndOwn @internal =item SBase::getSBMLNamespaces @internal =item SBase::removeDuplicateAnnotations @internal =item SBase::checkMathMLNamespace @internal =item SBase::getDerivedUnitDefinition @internal =item SBase::containsUndeclaredUnits @internal =item SBase::removeFromParentAndDelete Removes this object from its parent. If the parent was storing this object as a pointer, it is deleted. If not, it is simply cleared (as in ListOf objects). This is a pure virtual method, as every SBase element has different parents, and therefore different methods of removing itself. Will fail (and not delete itself) if it has no parent object. This function is designed to be overridden, but for all objects whose parent is of the class ListOf, the default implementation will work. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SBase::matchesSBMLNamespaces Returns C if this object's set of XML namespaces are the same as the given object's XML namespaces. C doc_what_are_sbmlnamespaces @param sb an object to compare with respect to namespaces. @return boolean, C if this object's collection of namespaces is the same as C, C otherwise. =item SBase::matchesSBMLNamespaces Returns C if this object's set of XML namespaces are the same as the given object's XML namespaces. C doc_what_are_sbmlnamespaces @param sb an object to compare with respect to namespaces. @return boolean, C if this object's collection of namespaces is the same as C, C otherwise. =item SBase::matchesRequiredSBMLNamespacesForAddition Returns C if this object's set of XML namespaces are a subset of the given object's XML namespaces. C doc_what_are_sbmlnamespaces @param sb an object to compare with respect to namespaces. @return boolean, C if this object's collection of namespaces is a subset of C, C otherwise. =item SBase::matchesRequiredSBMLNamespacesForAddition Returns C if this object's set of XML namespaces are a subset of the given object's XML namespaces. C doc_what_are_sbmlnamespaces @param sb an object to compare with respect to namespaces. @return boolean, C if this object's collection of namespaces is a subset of C, C otherwise. =item SBase::setUserData Sets the user data of this element. C doc_what_is_user_data @param userData specifies the new user data. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SBase::*getUserData Returns the user data that has been previously set via setUserData(). C doc_what_is_user_data @return the user data of this node, or C if no user data has been set. @if clike @see ASTNode::setUserData(void userData) @endif@~ =item SBase::isSetUserData Predicate returning true or false depending on whether the user data of this element has been set. C doc_what_is_user_data @return boolean, C if this object's user data has been set, C otherwise. =item SBase::unsetUserData Unsets the user data of this element. C doc_what_is_user_data C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SBase::getURI Returns the namespace URI to which this element belongs to. For example, all elements that belong to SBML Level 3 Version 1 Core must would have the URI C<"http://www.sbml.org/sbml/level3/version1/core">; all elements that belong to Layout Extension Version 1 for SBML Level 3 Version 1 Core must would have the URI C<"http://www.sbml.org/sbml/level3/version1/layout/version1">. This function first returns the URI for this element by looking into the SBMLNamespaces object of the document with the its package name. If not found, it will then look for the namespace associated with the element itself. @return the URI of this element, as a text string. @see getSBMLDocument() @see getPackageName() =item SBase::getPrefix Returns the XML namespace prefix of this element. This reports the XML namespace prefix chosen for this class of object in the current SBML document. This may be an empty string if the component has no explicit prefix (for instance, if it is a core SBML object placed in the default SBML namespace of the document). If it is not empty, then it corresponds to the XML namespace prefix used set the object, whatever that may be in a given SBML document. @return a text string representing the XML namespace prefix. =item SBase::hasOptionalAttributes @internal =item SBase::hasOptionalElements @internal =item SBase::updateSBMLNamespace @internal =item SBase::setElementText @internal When overridden allows SBase elements to use the text included in between the elements tags. The default implementation does nothing. @param text the text string found between the element tags. =item SBase::matchesCoreSBMLNamespace @internal =item SBase::matchesCoreSBMLNamespace @internal =item SBase::SBase @internal =item SBase::SBase @internal =item SBase::SBase @internal =item SBase::createObject @internal =item SBase::hasValidLevelVersionNamespaceCombination @internal =item SBase::readOtherXML @internal =item SBase::getElementPosition @internal =item SBase::getErrorLog @internal =item SBase::logError @internal =item SBase::logUnknownAttribute @internal =item SBase::logUnknownElement @internal =item SBase::logEmptyString @internal =item SBase::addExpectedAttributes @internal =item SBase::readAttributes @internal =item SBase::writeAttributes @internal =item SBase::writeXMLNS @internal =item SBase::syncAnnotation @internal =item SBase::reconstructRDFAnnotation @internal =item SBase::checkOrderAndLogError @internal =item SBase::checkListOfPopulated @internal =item SBase::checkDefaultNamespace @internal =item SBase::checkAnnotation @internal =item SBase::checkXHTML @internal =item SBase::loadPlugins @internal =item SBase::createExtensionObject @internal =item SBase::setElementNamespace @internal =item SBase::getElementNamespace @internal =item SBase::readExtensionAttributes @internal =item SBase::writeExtensionAttributes @internal =item SBase::storeUnknownExtAttribute @internal =item SBase::storeUnknownExtElement @internal =item SBase::getSBMLPrefix @internal =item SBase::getRootElement @internal =item SBase::getHasBeenDeleted @internal =item SBase::setSBaseFields @internal =item SBase::readAnnotation @internal =item SBase::removeDuplicatedResources @internal =item SBase::addTermToExistingBag @internal =item SBase::readNotes @internal =back =head2 ListOf @sbmlpackage{core} @htmlinclude pkg-marker-core.html Parent class for libSBML's "ListOfXYZ" classes. @htmlinclude not-sbml-warning.html The ListOf class in libSBML is a utility class that serves as the parent class for implementing the ListOf__ classes. It provides methods for working generically with the various SBML lists of objects in a program. LibSBML uses this separate list class rather than ordinary @if conly C@endif@if cpp C++; @endif@if java Java@endif@if python Python@endif@~ lists, so that it can provide the methods and features associated with SBase. Whether a given ListOf element may be empty or not depends on the element in question, and on what level and version of SBML it is being used for. For ListOf elements in SBML Level 3 Version 1 and prior, no core list and few package lists could be empty. As of SBML Level 3 Version 2, the rules were relaxed, and lists were allowed to be empty. In libSBML, documents created for Level 3 Version 2 will be written with empty ListOf's if that ListOf contains some other 'extra' information: an attribute such as metaid or sboTerm, a child '<notes>' or '<annotation>', or information from a SBML Level 3 package. C doc_what_is_listof =over =item ListOf::ListOf Creates a new ListOf object. @param level the SBML Level; if not assigned, defaults to the value of SBMLDocument::getDefaultLevel(). @param version the Version within the SBML Level; if not assigned, defaults to the value of SBMLDocument::getDefaultVersion(). C doc_note_bare_listof C doc_note_setting_lv @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ListOf::ListOf Creates a new ListOf with a given SBMLNamespaces object. @param sbmlns the set of SBML namespaces that this ListOf should contain. C doc_note_bare_listof C doc_note_setting_lv =item ListOf::ListOf Copy constructor; creates a copy of this ListOf. @param orig the ListOf instance to copy. =item ListOf::accept @internal =item ListOf::clone Creates and returns a deep copy of this ListOf object. @return the (deep) copy of this ListOf object. =item ListOf::append Adds an item to the end of this ListOf's list of items. This method makes a clone of the C handed to it. This means that when the ListOf object is destroyed, the original items will not be destroyed. For a method with an alternative ownership behavior, see the ListOf::appendAndOwn(@if java SBase@endif) method. @param item the item to be added to the list. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see appendAndOwn(SBase disownedItem) @see appendFrom(const ListOf list) =item ListOf::appendAndOwn Adds an item to the end of this ListOf's list of items. This method does not clone the C handed to it; instead, it assumes ownership of it. This means that when the ListOf is destroyed, the item will be destroyed along with it. For a method with an alternative ownership behavior, see the ListOf::append(SBase item) method. @param disownedItem the item to be added to the list. Will become a child of the parent list. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see append(const SBase item) @see appendFrom(const ListOf list) =item ListOf::appendFrom Adds a clone of a list of items to this ListOf's list. Note that because this clones the objects handed to it, the original items will not be destroyed when this ListOf object is destroyed. @param list a list of items to be added. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see append(const SBase item) @see appendAndOwn(SBase disownedItem) =item ListOf::insert Inserts an item at a given position in this ListOf's list of items. This variant of the method makes a clone of the C handed to it. This means that when the ListOf is destroyed, the original C will not be destroyed. @param location the location in the list where to insert the item. @param item the item to be inserted to the list. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see insertAndOwn(int location, SBase item) =item ListOf::insertAndOwn Inserts an item at a given position in this ListOf's list of items. This variant of the method does not make a clone of the C handed to it. This means that when the ListOf is destroyed, the original C will be destroyed. @param location the location where to insert the item. @param disownedItem the item to be inserted to the list. Will become a child of the parent list. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see insert(int location, const SBase item) =item ListOf::get Get an item from the list. @param n the index number of the item to get. @return the nth item in this ListOf items, or a null pointer if the index number C refers to a nonexistent position in this list. @see size() =item ListOf::get Get an item from the list. @param n the index number of the item to get. @return the nth item in this ListOf items, or a null pointer if the index number C refers to a nonexistent position in this list. @see size() =item ListOf::getElementBySId Returns the first child element found that has the given identifier. This method searches this ListOf's list of items for SBML objects based on their "id" attribute value in the model-wide C identifier namespace. @param id string representing the id of the object to find. @return the first element found with the given C, or C if no such object is found. =item ListOf::getElementByMetaId Returns the first child element found with the given meta-identifier. @param metaid string representing the "metaid" attribute of the object to find. @return the first element found with the given C, or C if no such object is found. =item ListOf::getAllElements Returns a List of all child SBase objects. The values returned include all children of the objects in this ListOf list, nested to an arbitrary depth. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all child objects. =item ListOf::clear Removes all items in this ListOf object. If parameter C is C (default), all items in this ListOf object are deleted and cleared, and thus the caller doesn't have to delete those items. Otherwise, all items are cleared only from this ListOf object; the caller is still responsible for deleting the actual items. (In the latter case, callers are advised to store pointers to all items elsewhere before calling this function.) @param doDelete if C (default), all items are deleted and cleared. Otherwise, all items are just cleared and not deleted. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ListOf::removeFromParentAndDelete Removes all items in this ListOf object and deletes its properties too. This performs a call to clear() with an argument of C (thus removing all the child objects in the list), followed by calls to various libSBML unsetFoo methods to delete everything else: CVTerm objects, model history objects, etc. @if cpp Implementations of subclasses of ListOf may need to override this method if different handling of child objects is needed.@endif@~ C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ListOf::remove Removes the nth item from this ListOf list of items and returns it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOf::size Returns number of items in this ListOf list. @return the number of items in this ListOf items. =item ListOf::setSBMLDocument @internal =item ListOf::getTypeCode Returns the libSBML type code for this object, namely, @link SBMLTypeCode_t#SBML_LIST_OF SBML_LIST_OF@endlink. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_LIST_OF SBML_LIST_OF@endlink (default). @note The various ListOf classes mostly differ from each other in what they contain. Hence, one must call getItemTypeCode() to fully determine the class of this SBML object. C doc_warning_typecodes_not_unique @see getItemTypeCode() @see getElementName() @see getPackageName() =item ListOf::getItemTypeCode Get the type code of the objects contained in this ListOf. C doc_what_are_typecodes Classes that inherit from the ListOf class should override this method to return the SBML type code for the objects contained in this ListOf. If they do not, this method will return @link SBMLTypeCode_t#SBML_UNKNOWN SBML_UNKNOWN@endlink @return The ListOf base class contains no SBML objects, and therefore this method returns @link SBMLTypeCode_t#SBML_UNKNOWN SBML_UNKNOWN@endlink. @see getElementName() @see getPackageName() =item ListOf::getElementName Returns the XML element name of this object, which for ListOf, is always C<"listOf">. @return the XML name of this element. =item ListOf::writeElements @internal =item ListOf::enablePackageInternal @internal =item ListOf::updateSBMLNamespace @internal =item ListOf::hasOptionalElements @internal =item ListOf::isExplicitlyListed @internal =item ListOf::setExplicitlyListed @internal =item ListOf::sort @internal =item ListOf::addExpectedAttributes @internal =item ListOf::readAttributes @internal =item ListOf::writeAttributes @internal =item ListOf::isValidTypeForList @internal =back =head2 Model @sbmlpackage{core} @htmlinclude pkg-marker-core.html An SBML model. In an SBML model definition, a single object of class Model serves as the overall container for the lists of the various model components. All of the lists are optional, but if a given list container is present within the model, the list must not be empty; that is, it must have length one or more. The following are the components and lists permitted in different Levels and Versions of SBML in version @htmlinclude libsbml-version.html of libSBML: \n=over\n \n=item\n\nIn SBML Level 1, the components are: UnitDefinition, Compartment, Species, Parameter, Rule, and Reaction. Instances of the classes are placed inside instances of classes ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, and ListOfReactions. \n=item\n\nIn SBML Level 2 Version 1, the components are: FunctionDefinition, UnitDefinition, Compartment, Species, Parameter, Rule, Reaction and Event. Instances of the classes are placed inside instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfRules, ListOfReactions, and ListOfEvents. \n=item\n\nIn SBML Level 2 Versions 2, 3 and 4, the components are: FunctionDefinition, UnitDefinition, CompartmentType, SpeciesType, Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, Reaction and Event. Instances of the classes are placed inside instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartmentTypes, ListOfSpeciesTypes, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules, ListOfConstraints, ListOfReactions, and ListOfEvents. \n=item\n\nIn SBML Level 3 Version 1, the components are: FunctionDefinition, UnitDefinition, Compartment, Species, Parameter, InitialAssignment, Rule, Constraint, Reaction and Event. Instances of the classes are placed inside instances of classes ListOfFunctionDefinitions, ListOfUnitDefinitions, ListOfCompartments, ListOfSpecies, ListOfParameters, ListOfInitialAssignments, ListOfRules, ListOfConstraints, ListOfReactions, and ListOfEvents. \n=back\n Although all the lists are optional, there are dependencies between SBML components such that defining some components requires defining others. An example is that defining a species requires defining a compartment, and defining a reaction requires defining a species. The dependencies are explained in more detail in the SBML specifications. In addition to the above lists and attributes, the Model class in both SBML Level 2 and Level 3 has the usual two attributes of "id" and "name", and both are optional. As is the case for other SBML components with "id" and "name" attributes, they must be used according to the guidelines described in the SBML specifications. (Within the frameworks of SBML Level 2 and Level 3, a Model object identifier has no assigned meaning, but extension packages planned for SBML Level 3 are likely to make use of this identifier.) Finally, SBML Level 3 has introduced a number of additional Model attributes. They are discussed in a separate section below. @section approaches Approaches to creating objects using the libSBML API LibSBML provides two main mechanisms for creating objects: class constructors (e.g., @if java Species() @else Species::Species() @endif), and createObject() methods (such as Model::createSpecies()) provided by certain Object classes such as Model. These multiple mechanisms are provided by libSBML for flexibility and to support different use-cases, but they also have different implications for the overall model structure. In general, the recommended approach is to use the createObject() methods. These methods both create an object I link it to the parent in one step. Here is an example:@if clike C.cpp} // Create an SBMLDocument object in Level 3 Version 1 format: SBMLDocument sbmlDoc = new SBMLDocument(3, 1); // Create a Model object inside the SBMLDocument object and set // its identifier. The call returns a pointer to the Model object // created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Model model = sbmlDoc->createModel(); model->setId("BestModelEver"); // Create a Species object inside the Model and set its identifier. // Similar to the lines above, this call returns a pointer to the Species // object created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Species sp = model->createSpecies(); sp->setId("MySpecies"); @endcode @endif@if java C.java} // Create an SBMLDocument object in Level 3 Version 1 format: SBMLDocument sbmlDoc = new SBMLDocument(3, 1); // Create a Model object inside the SBMLDocument object and set // its identifier. The call returns a pointer to the Model object // created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Note that // the call to setId() returns a status code, and a real program // should check this status code to make sure everything went okay. Model model = sbmlDoc.createModel(); model.setId("BestModelEver"); // Create a Species object inside the Model and set its identifier. // Similar to the lines above, this call returns a pointer to the Species // object created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Note that, like // with Model, the call to setId() returns a status code, and a real program // should check this status code to make sure everything went okay. Species sp = model.createSpecies(); sp.setId("BestSpeciesEver"); @endcode @endif@if python C.py} # Create an SBMLDocument object in Level 3 Version 1 format. # Make sure to check for possible failures. try: sbmlDoc = SBMLDocument(3, 1) except ValueError: print('Could not create SBMLDocument object') sys.exit(1) # Create a Model object inside the SBMLDocument object and set its # identifier, checking the returned values. The call to setId() returns a # status code to indicate whether the assignment was successful. model = sbmlDoc.createModel() if model == None: # Do something to handle the error here. print("Unable to create Model object.") sys.exit(1) status = model.setId('BestModelEver') if status != LIBSBML_OPERATION_SUCCESS: # Do something to handle the error here. print("Unable to set identifier on the Model object") sys.exit(1) # Create a Species object inside the Model and set its identifier. # Again, the setId() returns a status code to indicate whether the # assignment was successful. sp = model.createSpecies() if sp == None: # Do something to handle the error here. print("Unable to create Species object.") sys.exit(1) status = sp.setId('BestSpeciesEver') if status != LIBSBML_OPERATION_SUCCESS: # Do something to handle the error here. print("Unable to set identifier on the Species object") sys.exit(1) @endcode @endif@if csharp C // Create an SBMLDocument object in Level 3 Version 1 format: SBMLDocument sbmlDoc = new SBMLDocument(3, 1); // Create a Model object inside the SBMLDocument object and set // its identifier. The call returns a pointer to the Model object // created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Model model = sbmlDoc.createModel(); model.setId("BestModelEver"); // Create a Species object inside the Model and set its identifier. // Similar to the lines above, this call returns a pointer to the Species // object created, and methods called on that object affect the attributes // of the object attached to the model (as expected). Species sp = model.createSpecies(); sp.setId("MySpecies"); @endcode @endif@~ The createObject() methods return a pointer to the object created, but they also add the object to the relevant list of object instances contained in the parent. (These lists become the <listOfObjects> elements in the finished XML rendition of SBML.) In the example above, Model::createSpecies() adds the created species directly to the C<<listOfSpecies>> list in the model. Subsequently, methods called on the species change the species in the model (which is what is expected in most situations). @section model-checking Consistency and adherence to SBML specifications To make it easier for applications to do whatever they need, libSBML version @htmlinclude libsbml-version.html is relatively lax when it comes to enforcing correctness and completeness of models I model construction and editing. Essentially, libSBML I I in most cases check automatically that a model's components have valid attribute values, or that the overall model is consistent and free of errors---even obvious errors such as duplication of identifiers. This allows applications great leeway in how they build their models, but it means that software authors must take deliberate steps to ensure that the model will be, in the end, valid SBML. These steps include such things as keeping track of the identifiers used in a model, manually performing updates in certain situations where an entity is referenced in more than one place (e.g., a species that is referenced by multiple SpeciesReference objects), and so on. That said, libSBML does provide powerful features for deliberately performing validation of SBML when an application decides it is time to do so. The interfaces to these facilities are on the SBMLDocument class, in the form of SBMLDocument::checkInternalConsistency() and SBMLDocument::checkConsistency(). Please refer to the documentation for SBMLDocument for more information about this. While applications may play fast and loose and live like free spirits during the construction and editing of SBML models, they should always make sure to call SBMLDocument::checkInternalConsistency() and/or SBMLDocument::checkConsistency() before writing out the final version of an SBML model. @section model-l3-attrib Model attributes introduced in SBML Level 3 As mentioned above, the Model class has a number of optional attributes in SBML Level 3. These are "substanceUnits", "timeUnits", "volumeUnits", "areaUnits", "lengthUnits", "extentUnits", and "conversionFactor. The following provide more information about them. @subsection model-l3-substanceunits The "substanceUnits" attribute The "substanceUnits" attribute is used to specify the unit of measurement associated with substance quantities of Species objects that do not specify units explicitly. If a given Species object definition does not specify its unit of substance quantity via the "substanceUnits" attribute on the Species object instance, then that species inherits the value of the Model "substanceUnits" attribute. If the Model does not define a value for this attribute, then there is no unit to inherit, and all species that do not specify individual "substanceUnits" attribute values then have no declared units for their quantities. The SBML Level 3 specifications provide more details. Note that when the identifier of a species appears in a model's mathematical expressions, the unit of measurement associated with that identifier is not solely determined by setting "substanceUnits" on Model or Species. Please see the discussion about units given in the documentation for the Species class. @subsection model-l3-timeunits The "timeUnits" attribute The "timeUnits" attribute on SBML Level 3's Model object is used to specify the unit in which time is measured in the model. This attribute on Model is the only way to specify a unit for time in a model. It is a global attribute; time is measured in the model everywhere in the same way. This is particularly relevant to Reaction and RateRule objects in a model: all Reaction and RateRule objects in SBML define per-time values, and the unit of time is given by the "timeUnits" attribute on the Model object instance. If the Model "timeUnits" attribute has no value, it means that the unit of time is not defined for the model's reactions and rate rules. Leaving it unspecified in an SBML model does not result in an invalid model in SBML Level 3; however, as a matter of best practice, we strongly recommend that all models specify units of measurement for time. @subsection model-l3-voletc The "volumeUnits", "areaUnits", and "lengthUnits" attributes The attributes "volumeUnits", "areaUnits" and "lengthUnits" together are used to set the units of measurements for the sizes of Compartment objects in an SBML Level 3 model when those objects do not otherwise specify units. The three attributes correspond to the most common cases of compartment dimensions: "volumeUnits" for compartments having a "spatialDimensions" attribute value of C<"3">, "areaUnits" for compartments having a "spatialDimensions" attribute value of C<"2">, and "lengthUnits" for compartments having a "spatialDimensions" attribute value of C<"1">. The attributes are not applicable to compartments whose "spatialDimensions" attribute values are I one of C<"1">, C<"2"> or C<"3">. If a given Compartment object instance does not provide a value for its "units" attribute, then the unit of measurement of that compartment's size is inherited from the value specified by the Model "volumeUnits", "areaUnits" or "lengthUnits" attribute, as appropriate based on the Compartment object's "spatialDimensions" attribute value. If the Model object does not define the relevant attribute, then there are no units to inherit, and all Compartment objects that do not set a value for their "units" attribute then have no units associated with their compartment sizes. The use of three separate attributes is a carry-over from SBML Level 2. Note that it is entirely possible for a model to define a value for two or more of the attributes "volumeUnits", "areaUnits" and "lengthUnits" simultaneously, because SBML models may contain compartments with different numbers of dimensions. @subsection model-l3-extentunits The "extentUnits" attribute Reactions are processes that occur over time. These processes involve events of some sort, where a single ``reaction event'' is one in which some set of entities (known as reactants, products and modifiers in SBML) interact, once. The extent of a reaction is a measure of how many times the reaction has occurred, while the time derivative of the extent gives the instantaneous rate at which the reaction is occurring. Thus, what is colloquially referred to as the "rate of the reaction" is in fact equal to the rate of change of reaction extent. In SBML Level 3, the combination of "extentUnits" and "timeUnits" defines the units of kinetic laws in SBML and establishes how the numerical value of each KineticLaw object's mathematical formula is meant to be interpreted in a model. The units of the kinetic laws are taken to be "extentUnits" divided by "timeUnits". Note that this embodies an important principle in SBML Level 3 models: all reactions in an SBML model must have the same units for the rate of change of extent. In other words, the units of all reaction rates in the model must be the same. There is only one global value for "extentUnits" and one global value for "timeUnits". @subsection model-l3-convfactor The "conversionFactor" attribute The attribute "conversionFactor" in SBML Level 3's Model object defines a global value inherited by all Species object instances that do not define separate values for their "conversionFactor" attributes. The value of this attribute must refer to a Parameter object instance defined in the model. The Parameter object in question must be a constant; ie it must have its "constant" attribute value set to C<"true">. If a given Species object definition does not specify a conversion factor via the "conversionFactor" attribute on Species, then the species inherits the conversion factor specified by the Model "conversionFactor" attribute. If the Model does not define a value for this attribute, then there is no conversion factor to inherit. More information about conversion factors is provided in the SBML Level 3 specifications. =over =item Model::Model Creates a new Model using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Model. @param version an unsigned int, the SBML Version to assign to this Model. C doc_throw_exception_lv C doc_note_setting_lv =item Model::Model Creates a new Model using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Model::Model Copy constructor; creates a (deep) copy of the given Model object. @param orig the object to copy. =item Model::accept @internal =item Model::clone Creates and returns a deep copy of this Model object. @return the (deep) copy of this Model object. =item Model::getElementBySId Returns the first child element found that has the given C. This operation searches the model-wide C identifier type namespace @param id string representing the id of the object to find. @return pointer to the first element found with the given C, or C if no such object is found. =item Model::getElementByMetaId Returns the first child element it can find with the given C. @param metaid string representing the meta-identifier of the object to find. @return pointer to the first element found with the given C, or NULL if no such object is found. =item Model::getAllElements Returns a List of all child objects. This returns all child objects nested to an arbitrary depth. If an optional element filter is provided, only those objects for which the C C method returns true will be added to the list. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item Model::getId Returns the value of the "id" attribute of this Model. @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() function instead. C doc_id_attribute @return the id of this Model. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item Model::getName Returns the value of the "name" attribute of this Model object. C doc_get_name =item Model::getSubstanceUnits Returns the value of the "substanceUnits" attribute of this Model. @return the substanceUnits of this Model. @note The "substanceUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getTimeUnits Returns the value of the "timeUnits" attribute of this Model. @return the timeUnits of this Model. @note The "timeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getVolumeUnits Returns the value of the "volumeUnits" attribute of this Model. @return the volumeUnits of this Model. @note The "volumeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getAreaUnits Returns the value of the "areaUnits" attribute of this Model. @return the areaUnits of this Model. @note The "areaUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getLengthUnits Returns the value of the "lengthUnits" attribute of this Model. @return the lengthUnits of this Model. @note The "lengthUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getExtentUnits Returns the value of the "extentUnits" attribute of this Model. @return the extentUnits of this Model. @note The "extentUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::getConversionFactor Returns the value of the "conversionFactor" attribute of this Model. @return the conversionFactor of this Model. @note The "conversionFactor" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetId Predicate returning C if this Model's "id" attribute is set. C doc_isset_id =item Model::isSetName Predicate returning C if this Model's "name" attribute is set. C doc_isset_name =item Model::isSetSubstanceUnits Predicate returning C if this Model's "substanceUnits" attribute is set. @return C if the "substanceUnits" attribute of this Model is set, C otherwise. @note The "substanceUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetTimeUnits Predicate returning C if this Model's "timeUnits" attribute is set. @return C if the "timeUnits" attribute of this Model is set, C otherwise. @note The "substanceUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetVolumeUnits Predicate returning C if this Model's "volumeUnits" attribute is set. @return C if the "volumeUnits" attribute of this Model is set, C otherwise. @note The "volumeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetAreaUnits Predicate returning C if this Model's "areaUnits" attribute is set. @return C if the "areaUnits" attribute of this Model is set, C otherwise. @note The "areaUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetLengthUnits Predicate returning C if this Model's "lengthUnits" attribute is set. @return C if the "lengthUnits" attribute of this Model is set, C otherwise. @note The "lengthUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetExtentUnits Predicate returning C if this Model's "extentUnits" attribute is set. @return C if the "extentUnits" attribute of this Model is set, C otherwise. @note The "extentUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::isSetConversionFactor Predicate returning C if this Model's "conversionFactor" attribute is set. @return C if the "conversionFactor" attribute of this Model is set, C otherwise. @note The "conversionFactor" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setId Sets the value of the "id" attribute of this Model. C doc_set_id =item Model::setName Sets the value of the "name" attribute of this Model. C doc_set_name =item Model::setSubstanceUnits Sets the value of the "substanceUnits" attribute of this Model. The string in C is copied. @param units the new substanceUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "substanceUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setTimeUnits Sets the value of the "timeUnits" attribute of this Model. The string in C is copied. @param units the new timeUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "timeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setVolumeUnits Sets the value of the "volumeUnits" attribute of this Model. The string in C is copied. @param units the new volumeUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "volumeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setAreaUnits Sets the value of the "areaUnits" attribute of this Model. The string in C is copied. @param units the new areaUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "areaUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setLengthUnits Sets the value of the "lengthUnits" attribute of this Model. The string in C is copied. @param units the new lengthUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "lengthUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setExtentUnits Sets the value of the "extentUnits" attribute of this Model. The string in C is copied. @param units the new extentUnits for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "extentUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::setConversionFactor Sets the value of the "conversionFactor" attribute of this Model. The string in C is copied. @param units the new conversionFactor for the Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "conversionFactor" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetId Unsets the value of the "id" attribute of this Model. C doc_unset_id =item Model::unsetName Unsets the value of the "name" attribute of this Model. C doc_unset_name =item Model::unsetSubstanceUnits Unsets the value of the "substanceUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "substanceUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetTimeUnits Unsets the value of the "timeUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "timeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetVolumeUnits Unsets the value of the "volumeUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "volumeUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetAreaUnits Unsets the value of the "areaUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "areaUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetLengthUnits Unsets the value of the "lengthUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "lengthUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetExtentUnits Unsets the value of the "extentUnits" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "extentUnits" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::unsetConversionFactor Unsets the value of the "conversionFactor" attribute of this Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "conversionFactor" attribute is available in SBML Level 3 but is not present on Model in lower Levels of SBML. =item Model::addFunctionDefinition Adds a copy of the given FunctionDefinition object to this Model. @param fd the FunctionDefinition to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createFunctionDefinition() =item Model::addUnitDefinition Adds a copy of the given UnitDefinition object to this Model. @param ud the UnitDefinition object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createUnitDefinition() =item Model::addCompartmentType Adds a copy of the given CompartmentType object to this Model. @param ct the CompartmentType object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. @see createCompartmentType() =item Model::addSpeciesType Adds a copy of the given SpeciesType object to this Model. @param st the SpeciesType object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. @see createSpeciesType() =item Model::addCompartment Adds a copy of the given Compartment object to this Model. @param c the Compartment object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createCompartment() =item Model::addSpecies Adds a copy of the given Species object to this Model. @param s the Species object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createSpecies() =item Model::addParameter Adds a copy of the given Parameter object to this Model. @param p the Parameter object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createParameter() =item Model::addInitialAssignment Adds a copy of the given InitialAssignment object to this Model. @param ia the InitialAssignment object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createInitialAssignment() =item Model::addRule Adds a copy of the given Rule object to this Model. @param r the Rule object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createAlgebraicRule() @see createAssignmentRule() @see createRateRule() =item Model::addConstraint Adds a copy of the given Constraint object to this Model. @param c the Constraint object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createConstraint() =item Model::addReaction Adds a copy of the given Reaction object to this Model. @param r the Reaction object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createReaction() =item Model::addEvent Adds a copy of the given Event object to this Model. @param e the Event object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createEvent() =item Model::createFunctionDefinition Creates a new FunctionDefinition inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the FunctionDefinition object created. @see addFunctionDefinition(const FunctionDefinition fd) =item Model::createUnitDefinition Creates a new UnitDefinition inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the UnitDefinition object created. @see addUnitDefinition(const UnitDefinition ud) =item Model::createUnit Creates a new Unit object within the last UnitDefinition object created in this model and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. The mechanism by which the UnitDefinition was created is not significant. If a UnitDefinition object does not exist in this model, a new Unit is I created and C is returned instead. @return the Unit object created. @see addUnitDefinition(const UnitDefinition ud) =item Model::createCompartmentType Creates a new CompartmentType inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the CompartmentType object created. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. @see addCompartmentType(const CompartmentType ct) =item Model::createSpeciesType Creates a new SpeciesType inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the SpeciesType object created. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. @see addSpeciesType(const SpeciesType st) =item Model::createCompartment Creates a new Compartment inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Compartment object created. @see addCompartment(const Compartment c) =item Model::createSpecies Creates a new Species inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Species object created. @see addSpecies(const Species s) =item Model::createParameter Creates a new Parameter inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Parameter object created. @see addParameter(const Parameter p) =item Model::createInitialAssignment Creates a new InitialAssignment inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the InitialAssignment object created. @see addInitialAssignment(const InitialAssignment ia) =item Model::createAlgebraicRule Creates a new AlgebraicRule inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the AlgebraicRule object created. @see addRule(const Rule r) =item Model::createAssignmentRule Creates a new AssignmentRule inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the AssignmentRule object created. @see addRule(const Rule r) =item Model::createRateRule Creates a new RateRule inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the RateRule object created. @see addRule(const Rule r) =item Model::createConstraint Creates a new Constraint inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Constraint object created. @see addConstraint(const Constraint c) =item Model::createReaction Creates a new Reaction inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Reaction object created. @see addReaction(const Reaction r) =item Model::createReactant Creates a new SpeciesReference object for a reactant inside the last Reaction object in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_reaction_irrelevant @return the SpeciesReference object created. If a Reaction does not exist for this model, a new SpeciesReference is I created and C is returned. =item Model::createProduct Creates a new SpeciesReference object for a product inside the last Reaction object in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_reaction_irrelevant @return the SpeciesReference object created. If a Reaction does not exist for this model, a new SpeciesReference is I created and C is returned. =item Model::createModifier Creates a new ModifierSpeciesReference object for a modifier species inside the last Reaction object in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_reaction_irrelevant @return the SpeciesReference object created. If a Reaction does not exist for this model, a new SpeciesReference is I created and C is returned. =item Model::createKineticLaw Creates a new KineticLaw inside the last Reaction object created in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_reaction_irrelevant @return the KineticLaw object created. If a Reaction does not exist for this model, or a Reaction does exist but already has a KineticLaw, a new KineticLaw is I created and C is returned. =item Model::createKineticLawParameter Creates a new local Parameter inside the KineticLaw object of the last Reaction created inside this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_kineticlaw_irrelevant @return the Parameter object created. If a Reaction does not exist for this model, or a KineticLaw for the Reaction does not exist, a new Parameter is I created and C is returned. =item Model::createKineticLawLocalParameter Creates a new LocalParameter inside the KineticLaw object of the last Reaction created inside this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_kineticlaw_irrelevant @return the Parameter object created. If a Reaction does not exist for this model, or a KineticLaw for the Reaction does not exist, a new Parameter is I created and C is returned. =item Model::createEvent Creates a new Event inside this Model and returns it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. @return the Event object created. =item Model::createEventAssignment Creates a new EventAssignment inside the last Event object created in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_event_irrelevant @return the EventAssignment object created. =item Model::createTrigger Creates a new Trigger inside the last Event object created in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_event_irrelevant @return the Trigger object created. =item Model::createDelay Creates a new Delay inside the last Event object created in this Model, and returns a pointer to it. The SBML Level and Version of the enclosing Model object, as well as any SBML package namespaces, are used to initialize this object's corresponding attributes. C doc_how_added_last_event_irrelevant @return the Delay object created. =item Model::setAnnotation Sets the value of the "annotation" subelement of this SBML object to a copy of C. Any existing content of the "annotation" subelement is discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the C that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use appendAnnotation(). @param annotation an XML structure that is to be used as the content of the "annotation" subelement of this object. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see appendAnnotation(const XMLNode annotation) =item Model::setAnnotation Sets the value of the "annotation" subelement of this SBML object to a copy of C. Any existing content of the "annotation" subelement is discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the C that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use appendAnnotation(). @param annotation an XML string that is to be used as the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see appendAnnotation(const std::string& annotation) =item Model::appendAnnotation Appends annotation content to any existing content in the "annotation" subelement of this object. The content in C is copied. Unlike setAnnotation(), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML structure that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see setAnnotation(const XMLNode annotation) =item Model::appendAnnotation Appends annotation content to any existing content in the "annotation" subelement of this object. The content in C is copied. Unlike setAnnotation(), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML string that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see setAnnotation(const std::string& annotation) =item Model::getListOfFunctionDefinitions Get the ListOfFunctionDefinitions object in this Model. @return the list of FunctionDefinitions for this Model. =item Model::getListOfFunctionDefinitions Get the ListOfFunctionDefinitions object in this Model. @return the list of FunctionDefinitions for this Model. =item Model::getListOfUnitDefinitions Get the ListOfUnitDefinitions object in this Model. @return the list of UnitDefinitions for this Model. =item Model::getListOfUnitDefinitions Get the ListOfUnitDefinitions object in this Model. @return the list of UnitDefinitions for this Model. =item Model::getListOfCompartmentTypes Get the ListOfCompartmentTypes object in this Model. @return the list of CompartmentTypes for this Model. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getListOfCompartmentTypes Get the ListOfCompartmentTypes object in this Model. @return the list of CompartmentTypes for this Model. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getListOfSpeciesTypes Get the ListOfSpeciesTypes object in this Model. @return the list of SpeciesTypes for this Model. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getListOfSpeciesTypes Get the ListOfSpeciesTypes object in this Model. @return the list of SpeciesTypes for this Model. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getListOfCompartments Get the ListOfCompartments object in this Model. @return the list of Compartments for this Model. =item Model::getListOfCompartments Get the ListOfCompartments object in this Model. @return the list of Compartments for this Model. =item Model::getListOfSpecies Get the ListOfSpecies object in this Model. @return the list of Species for this Model. =item Model::getListOfSpecies Get the ListOfSpecies object in this Model. @return the list of Species for this Model. =item Model::getListOfParameters Get the ListOfParameters object in this Model. @return the list of Parameters for this Model. =item Model::getListOfParameters Get the ListOfParameters object in this Model. @return the list of Parameters for this Model. =item Model::getListOfInitialAssignments Get the ListOfInitialAssignments object in this Model. @return the list of InitialAssignments for this Model. =item Model::getListOfInitialAssignments Get the ListOfInitialAssignments object in this Model. @return the list of InitialAssignment for this Model. =item Model::getListOfRules Get the ListOfRules object in this Model. @return the list of Rules for this Model. =item Model::getListOfRules Get the ListOfRules object in this Model. @return the list of Rules for this Model. =item Model::getListOfConstraints Get the ListOfConstraints object in this Model. @return the list of Constraints for this Model. =item Model::getListOfConstraints Get the ListOfConstraints object in this Model. @return the list of Constraints for this Model. =item Model::getListOfReactions Get the ListOfReactions object in this Model. @return the list of Reactions for this Model. =item Model::getListOfReactions Get the ListOfReactions object in this Model. @return the list of Reactions for this Model. =item Model::getListOfEvents Get the ListOfEvents object in this Model. @return the list of Events for this Model. =item Model::getListOfEvents Get the ListOfEvents object in this Model. @return the list of Events for this Model. =item Model::getFunctionDefinition Get the nth FunctionDefinitions object in this Model. @param n the index of the object to return. @return the nth FunctionDefinition of this Model. If the index C is invalid, C is returned. =item Model::getFunctionDefinition Get the nth FunctionDefinitions object in this Model. @param n the index of the object to return. @return the nth FunctionDefinition of this Model. If the index C is invalid, C is returned. =item Model::getFunctionDefinition Get a FunctionDefinition object based on its identifier. @param sid the identifier to search for. @return the FunctionDefinition in this Model with the identifier C or C if no such FunctionDefinition exists. =item Model::getFunctionDefinition Get a FunctionDefinition object based on its identifier. @param sid the identifier to search for. @return the FunctionDefinition in this Model with the identifier C or C if no such FunctionDefinition exists. =item Model::getUnitDefinition Get the nth UnitDefinition object in this Model. @param n the index of the object to return. @return the nth UnitDefinition of this Model. If the index C is invalid, C is returned. =item Model::getUnitDefinition Get the nth UnitDefinition object in this Model. @param n the index of the object to return. @return the nth UnitDefinition of this Model. If the index C is invalid, C is returned. =item Model::getUnitDefinition Get a UnitDefinition based on its identifier. @param sid the identifier to search for. @return the UnitDefinition in this Model with the identifier C or C if no such UnitDefinition exists. =item Model::getUnitDefinition Get a UnitDefinition based on its identifier. @param sid the identifier to search for. @return the UnitDefinition in this Model with the identifier C or C if no such UnitDefinition exists. =item Model::getCompartmentType Get the nth CompartmentType object in this Model. @param n the index of the object to return. @return the nth CompartmentType of this Model. If the index C is invalid, C is returned. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getCompartmentType Get the nth CompartmentType object in this Model. @param n the index of the object to return. @return the nth CompartmentType of this Model. If the index C is invalid, C is returned. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getCompartmentType Get a CompartmentType object based on its identifier. @param sid the identifier to search for. @return the CompartmentType in this Model with the identifier C or C if no such CompartmentType exists. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getCompartmentType Get a CompartmentType object based on its identifier. @param sid the identifier to search for. @return the CompartmentType in this Model with the identifier C or C if no such CompartmentType exists. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getSpeciesType Get the nth SpeciesType object in this Model. @param n the index of the object to return. @return the nth SpeciesType of this Model. If the index C is invalid, C is returned. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getSpeciesType Get the nth SpeciesType object in this Model. @param n the index of the object to return. @return the nth SpeciesType of this Model. If the index C is invalid, C is returned. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getSpeciesType Get a SpeciesType object based on its identifier. @param sid the identifier to search for. @return the SpeciesType in this Model with the identifier C or C if no such SpeciesType exists. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getSpeciesType Get a SpeciesType object based on its identifier. @param sid the identifier to search for. @return the SpeciesType in this Model with the identifier C or C if no such SpeciesType exists. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getCompartment Get the nth Compartment object in this Model. @param n the index of the object to return. @return the nth Compartment of this Model. If the index C is invalid, C is returned. =item Model::getCompartment Get the nth Compartment object in this Model. @param n the index of the object to return. @return the nth Compartment of this Model. If the index C is invalid, C is returned. =item Model::getCompartment Get a Compartment object based on its identifier. @param sid the identifier to search for. @return the Compartment in this Model with the identifier C or C if no such Compartment exists. =item Model::getCompartment Get a Compartment object based on its identifier. @param sid the identifier to search for. @return the Compartment in this Model with the identifier C or C if no such Compartment exists. =item Model::getSpecies Get the nth Species object in this Model. @param n the index of the object to return. @return the nth Species of this Model. If the index C is invalid, C is returned. =item Model::getSpecies Get the nth Species object in this Model. @param n the index of the object to return. @return the nth Species of this Model. If the index C is invalid, C is returned. =item Model::getSpecies Get a Species object based on its identifier. @param sid the identifier to search for. @return the Species in this Model with the identifier C or C if no such Species exists. =item Model::getSpecies Get a Species object based on its identifier. @param sid the identifier to search for. @return the Species in this Model with the identifier C or C if no such Species exists. =item Model::getParameter Get the nth Parameter object in this Model. @param n the index of the object to return. @return the nth Parameter of this Model. If the index C is invalid, C is returned. =item Model::getParameter Get the nth Parameter object in this Model. @param n the index of the object to return. @return the nth Parameter of this Model. If the index C is invalid, C is returned. =item Model::getParameter Get a Parameter object based on its identifier. @param sid the identifier to search for. @return the Parameter in this Model with the identifier C or C if no such Parameter exists. =item Model::getParameter Get a Parameter object based on its identifier. @param sid the identifier to search for. @return the Parameter in this Model with the identifier C or C if no such Parameter exists. =item Model::getInitialAssignment Get the nth InitialAssignment object in this Model. @param n the index of the object to return. @return the nth InitialAssignment of this Model. If the index C is invalid, C is returned. =item Model::getInitialAssignment Get the nth InitialAssignment object in this Model. @param n the index of the object to return. @return the nth InitialAssignment of this Model. If the index C is invalid, C is returned. =item Model::getInitialAssignment Get an InitialAssignment object based on the symbol to which it assigns a value. @param symbol the symbol to search for. @return the InitialAssignment in this Model with the given "symbol" attribute value or C if no such InitialAssignment exists. =item Model::getInitialAssignmentBySymbol Get an InitialAssignment object based on the symbol to which it assigns a value. @param symbol the symbol to search for. @return the InitialAssignment in this Model with the given "symbol" attribute value or C if no such InitialAssignment exists. =item Model::getInitialAssignment Get an InitialAssignment object based on the symbol to which it assigns a value. @param symbol the symbol to search for. @return the InitialAssignment in this Model with the given "symbol" attribute value or C if no such InitialAssignment exists. =item Model::getInitialAssignmentBySymbol Get an InitialAssignment object based on the symbol to which it assigns a value. @param symbol the symbol to search for. @return the InitialAssignment in this Model with the given "symbol" attribute value or C if no such InitialAssignment exists. =item Model::getRule Get the nth Rule object in this Model. @param n the index of the object to return. @return the nth Rule of this Model. If the index C is invalid, C is returned. =item Model::getRule Get the nth Rule object in this Model. @param n the index of the object to return. @return the nth Rule of this Model. If the index C is invalid, C is returned. =item Model::getRule Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRule Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getAssignmentRule Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getAssignmentRule Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRateRule Get a Rule object based on the variable to which it assigns a value. @param variable the symbol to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRateRule Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getAssignmentRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getAssignmentRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRateRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getRateRuleByVariable Get a Rule object based on the variable to which it assigns a value. @param variable the variable to search for. @return the Rule in this Model with the given "variable" attribute value or C if no such Rule exists. =item Model::getConstraint Get the nth Constraint object in this Model. @param n the index of the object to return. @return the nth Constraint of this Model. If the index C is invalid, C is returned. =item Model::getConstraint Get the nth Constraint object in this Model. @param n the index of the object to return. @return the nth Constraint of this Model. If the index C is invalid, C is returned. =item Model::getReaction Get the nth Reaction object in this Model. @param n the index of the object to return. @return the nth Reaction of this Model. If the index C is invalid, C is returned. =item Model::getReaction Get the nth Reaction object in this Model. @param n the index of the object to return. @return the nth Reaction of this Model. If the index C is invalid, C is returned. =item Model::getReaction Get a Reaction object based on its identifier. @param sid the identifier to search for. @return the Reaction in this Model with the identifier C or C if no such Reaction exists. =item Model::getReaction Get a Reaction object based on its identifier. @param sid the identifier to search for. @return the Reaction in this Model with the identifier C or C if no such Reaction exists. =item Model::getSpeciesReference Get a SpeciesReference object based on its identifier. @param sid the identifier to search for. @return the SpeciesReference in this Model with the identifier C or C if no such SpeciesReference exists. =item Model::getSpeciesReference Get a SpeciesReference object based on its identifier. @param sid the identifier to search for. @return the SpeciesReference in this Model with the identifier C or C if no such SpeciesReference exists. =item Model::getModifierSpeciesReference Get a ModifierSpeciesReference object based on its identifier. @param sid the identifier to search for. @return the ModifierSpeciesReference in this Model with the identifier C or C if no such ModifierSpeciesReference exists. =item Model::getModifierSpeciesReference Get a ModifierSpeciesReference object based on its identifier. @param sid the identifier to search for. @return the ModifierSpeciesReference in this Model with the identifier C or C if no such ModifierSpeciesReference exists. =item Model::getEvent Get the nth Event object in this Model. @param n the index of the object to return. @return the nth Event of this Model. If the index C is invalid, C is returned. =item Model::getEvent Get the nth Event object in this Model. @param n the index of the object to return. @return the nth Event of this Model. If the index C is invalid, C is returned. =item Model::getEvent Get an Event object based on its identifier. @param sid the identifier to search for. @return the Event in this Model with the identifier C or C if no such Event exists. =item Model::getEvent Get an Event object based on its identifier. @param sid the identifier to search for. @return the Event in this Model with the identifier C or C if no such Event exists. =item Model::getNumFunctionDefinitions Get the number of FunctionDefinition objects in this Model. @return the number of FunctionDefinitions in this Model. =item Model::getNumUnitDefinitions Get the number of UnitDefinition objects in this Model. @return the number of UnitDefinitions in this Model. =item Model::getNumCompartmentTypes Get the number of CompartmentType objects in this Model. @return the number of CompartmentTypes in this Model. @note The CompartmentType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getNumSpeciesTypes Get the number of SpeciesType objects in this Model. @return the number of SpeciesTypes in this Model. @note The SpeciesType object class is only available in SBML Level 2 Versions 2–4. It is not available in Level 1 nor Level 3. =item Model::getNumCompartments Get the number of Compartment objects in this Model. @return the number of Compartments in this Model. =item Model::getNumSpecies Get the number of Species objects in this Model. @return the number of Species in this Model. =item Model::getNumSpeciesWithBoundaryCondition Get the number of Species in this Model having their "boundaryCondition" attribute value set to C. @return the number of Species in this Model with boundaryCondition set to true. =item Model::getNumParameters Get the number of Parameter objects in this Model. @return the number of Parameters in this Model. Parameters defined in KineticLaws are not included. =item Model::getNumInitialAssignments Get the number of InitialAssignment objects in this Model. @return the number of InitialAssignments in this Model. =item Model::getNumRules Get the number of Rule objects in this Model. @return the number of Rules in this Model. =item Model::getNumConstraints Get the number of Constraint objects in this Model. @return the number of Constraints in this Model. =item Model::getNumReactions Get the number of Reaction objects in this Model. @return the number of Reactions in this Model. =item Model::getNumEvents Get the number of Event objects in this Model. @return the number of Events in this Model. =item Model::removeFromParentAndDelete Remove this Model from its parent SBMLDocument object. This works by finding this Model's parent SBMLDocument and then calling C on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Model::renameAllIds @internal =item Model::renameIDs @internal =item Model::renameSIdRefs C doc_renamesidref_common =item Model::renameUnitSIdRefs C doc_renameunitsidref_common =item Model::isBoolean @internal =item Model::convertL1ToL2 @internal =item Model::convertL1ToL3 @internal =item Model::convertL2ToL3 @internal =item Model::convertL2ToL1 @internal =item Model::convertL3ToL1 @internal =item Model::convertL3ToL2 @internal =item Model::convertFromL3V2 @internal =item Model::dealWithFast @internal =item Model::dealWithL3Fast @internal =item Model::addModifiers @internal =item Model::addConstantAttribute @internal =item Model::setSpatialDimensions @internal =item Model::addDefinitionsForDefaultUnits @internal =item Model::dealWithDefaultValues @internal =item Model::convertParametersToLocals @internal =item Model::setSpeciesReferenceConstantValueAndStoichiometry @internal =item Model::removeMetaId @internal =item Model::removeSBOTerms @internal =item Model::removeHasOnlySubstanceUnits @internal =item Model::removeSBOTermsNotInL2V2 @internal =item Model::removeDuplicateTopLevelAnnotations @internal =item Model::removeParameterRuleUnits @internal =item Model::convertStoichiometryMath @internal =item Model::assignRequiredValues @internal =item Model::dealWithModelUnits @internal =item Model::dealWithStoichiometry @internal =item Model::dealWithEvents @internal =item Model::removeSpeciesTypes @internal =item Model::removeCompartmentTypes @internal =item Model::setSBMLDocument @internal =item Model::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_MODEL SBML_MODEL@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Model::getElementName Returns the XML element name of this object, which for Model, is always C<"model">. @return the name of this element, i.e., C<"model">. =item Model::getElementPosition @internal =item Model::writeElements @internal =item Model::populateListFormulaUnitsData Populates the internal list of derived units for this Model object. This method tells libSBML to (re)calculate all units for all components of the enclosing Model object. The result is stored in an internal list of unit data. Users can access the resulting data by calling the method SBase::getDerivedUnitDefinition() available on most objects. (The name "formula units data" is drawn from the name of the internal objects libSBML uses to store the data; note that these internal objects are not exposed to callers, because callers can interact with the results using the ordinary SBML unit objects.) This method is used by libSBML itself in the validator concerned with unit consistency. The unit consistency validator (like all other validators in libSBML) is invoked by using SBMLDocument::checkConsistency(), with the consistency checks for the category @link SBMLErrorCategory_t#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink turned on. The method populateListFormulaUnitsData() does not need to be called prior to invoking the validator if unit consistency checking has not been turned off. This method is only provided for cases when callers have a special need to force the unit data to be recalculated. For instance, during construction of a model, a caller may want to interrogate libSBML's inferred units without invoking full-blown model validation; this is a scenario in which calling populateListFormulaUnitsData() may be useful. @warning Computing and inferring units is a time-consuming operation. Callers may want to call isPopulatedListFormulaUnitsData() to determine whether the units may already have been computed, to save themselves the need of invoking unit inference unnecessarily. @see isPopulatedListFormulaUnitsData() =item Model::isPopulatedListFormulaUnitsData Predicate returning C if libSBML has derived units for the components of this model. LibSBML can infer the units of measurement associated with different elements of a model. When libSBML does that, it builds a complex internal structure during a resource-intensive operation. This is done automatically only when callers invoke validation (via SBMLDocument::checkConsistency()) and have not turned off the unit validation option. Callers can force units to be recalculated by calling populateListFormulaUnitsData(). To avoid calling that method unnecessarily, calling programs may first want to invoke this method (isPopulatedListFormulaUnitsData()) to determine whether it is even necessary. @return C if the units have already been computed, C otherwise. =item Model::addFormulaUnitsData @internal =item Model::createFormulaUnitsData @internal =item Model::createFormulaUnitsData @internal =item Model::getFormulaUnitsData @internal =item Model::getFormulaUnitsData @internal =item Model::getFormulaUnitsData @internal =item Model::getFormulaUnitsData @internal =item Model::getFormulaUnitsDataForVariable @internal =item Model::getFormulaUnitsDataForAssignment @internal =item Model::getNumFormulaUnitsData @internal =item Model::getListFormulaUnitsData @internal =item Model::getListFormulaUnitsData @internal =item Model::populateAllElementIdList Populates the internal list of the identifiers of all elements within this Model object. This method tells libSBML to retrieve the identifiers of all elements of the enclosing Model object. The result is stored in an internal list of ids. Users can access the resulting data by calling the method getAllElementIdList(). @warning Retrieving all elements within a model is a time-consuming operation. Callers may want to call isPopulatedAllElementIdList() to determine whether the id list may already have been populated. @see isPopulatedAllElementIdList() =item Model::isPopulatedAllElementIdList Predicate returning C if libSBML has a list of the ids of all components of this model. @return C if the id list has already been populated, C otherwise. =item Model::getAllElementIdList Returns the internal list of the identifiers of all elements within this Model object. @return an IdList of all the identifiers in the model. @see populateAllElementIdList() @see isPopulatedAllElementIdList() =item Model::clearAllElementIdList Clears the internal list of the identifiers of all elements within this Model object. @see populateAllElementIdList() @see isPopulatedAllElementIdList() =item Model::populateAllElementMetaIdList Populates the internal list of the metaids of all elements within this Model object. This method tells libSBML to retrieve the identifiers of all elements of the enclosing Model object. The result is stored in an internal list of metaids. Users can access the resulting data by calling the method getAllElementMetaIdList(). @warning Retrieving all elements within a model is a time-consuming operation. Callers may want to call isPopulatedAllElementMetaIdList() to determine whether the metaid list may already have been populated. @see isPopulatedAllElementMetaIdList() =item Model::isPopulatedAllElementMetaIdList Predicate returning C if libSBML has a list of the metaids of all components of this model. @return C if the metaid list has already been populated, C otherwise. =item Model::getAllElementMetaIdList Returns the internal list of the metaids of all elements within this Model object. @return an IdList of all the metaids in the model. @see populateAllElementMetaIdList() @see isPopulatedAllElementMetaIdList() =item Model::clearAllElementMetaIdList Clears the internal list of the metaids of all elements within this Model object. @see populateAllElementMetaIdList() @see isPopulatedAllElementMetaIdList() =item Model::hasRequiredElements Predicate returning C if all the required elements for this Model object have been set. @return a boolean value indicating whether all the required elements for this object have been defined. =item Model::removeFunctionDefinition Removes the nth FunctionDefinition object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the FunctionDefinition object to remove. @return the FunctionDefinition object removed, or C if the given index is out of range. =item Model::removeFunctionDefinition Removes the FunctionDefinition object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the FunctionDefinition object to remove. @return the FunctionDefinition object removed, or C if no FunctionDefinition object with the identifier exists in this Model object. =item Model::removeUnitDefinition Removes the nth UnitDefinition object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the UnitDefinition object to remove. @return the UnitDefinition object removed., or C if the given index is out of range. =item Model::removeUnitDefinition Removes the UnitDefinition object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the UnitDefinition object to remove. @return the UnitDefinition object removed, or C if no UnitDefinition object with the identifier exists in this Model object. =item Model::removeCompartmentType Removes the nth CompartmentType object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the CompartmentType object to remove. @return the ComapartmentType object removed, or C if the given index is out of range. =item Model::removeCompartmentType Removes the CompartmentType object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the object to remove. @return the CompartmentType object removed, or C if no CompartmentType object with the identifier exists in this Model object. =item Model::removeSpeciesType Removes the nth SpeciesType object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the SpeciesType object to remove. @return the SpeciesType object removed, or C if the given index is out of range. =item Model::removeSpeciesType Removes the SpeciesType object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the SpeciesType object to remove. @return the SpeciesType object removed, or C if no SpeciesType object with the identifier exists in this Model object. =item Model::removeCompartment Removes the nth Compartment object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Compartment object to remove. @return the Compartment object removed, or C if the given index is out of range. =item Model::removeCompartment Removes the Compartment object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Compartment object to remove. @return the Compartment object removed, or C if no Compartment object with the identifier exists in this Model object. =item Model::removeSpecies Removes the nth Species object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Species object to remove. @return the Species object removed, or C if the given index is out of range. =item Model::removeSpecies Removes the Species object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Species object to remove. @return the Species object removed, or C if no Species object with the identifier exists in this Model object. =item Model::removeParameter Removes the nth Parameter object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Parameter object to remove. @return the Parameter object removed, or C if the given index is out of range. =item Model::removeParameter Removes the Parameter object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Parameter object to remove. @return the Parameter object removed, or C if no Parameter object with the identifier exists in this Model object. =item Model::removeInitialAssignment Removes the nth InitialAssignment object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the InitialAssignment object to remove. @return the InitialAssignment object removed, or C if the given index is out of range. =item Model::removeInitialAssignment Removes the InitialAssignment object with the given "symbol" attribute from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param symbol the "symbol" attribute of the InitialAssignment object to remove. @return the InitialAssignment object removed, or C if no InitialAssignment object with the "symbol" attribute exists in this Model object. =item Model::removeRule Removes the nth Rule object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Rule object to remove. @return the Rule object removed, or C if the given index is out of range. =item Model::removeRule Removes the Rule object with the given "variable" attribute from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param variable the "variable" attribute of the Rule object to remove. @return the Rule object removed, or C if no Rule object with the "variable" attribute exists in this Model object. =item Model::removeRuleByVariable Removes the Rule object with the given "variable" attribute from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param variable the "variable" attribute of the Rule object to remove. @return the Rule object removed, or C if no Rule object with the "variable" attribute exists in this Model object. =item Model::removeConstraint Removes the nth Constraint object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Constraint object to remove. @return the Constraint object removed, or C if the given index is out of range. =item Model::removeReaction Removes the nth Reaction object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Reaction object to remove. @return the Reaction object removed, or C if the given index is out of range. =item Model::removeReaction Removes the Reaction object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Reaction object to remove. @return the Reaction object removed, or C if no Reaction object with the identifier exists in this Model object. =item Model::removeEvent Removes the nth Event object from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the Event object to remove. @return the Event object removed, or C if the given index is out of range. =item Model::removeEvent Removes the Event object with the given identifier from this Model object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Event object to remove. @return the Event object removed, or C if no Event object with the identifier exists in this Model object. =item Model::appendFrom Copies a given Model object's subcomponents and appends the copies to the appropriate places in this Model. This method also calls the C method on all libSBML plug-in objects. C doc_what_are_plugins @param model the Model to merge with this one. =item Model::enablePackageInternal @internal =item Model::updateSBMLNamespace @internal =item Model::readOtherXML @internal =item Model::createObject @internal =item Model::addExpectedAttributes @internal =item Model::readAttributes @internal =item Model::readL1Attributes @internal =item Model::readL2Attributes @internal =item Model::readL3Attributes @internal =item Model::writeAttributes @internal =item Model::syncAnnotation @internal =item Model::populatePerTimeUnitDefinition @internal =item Model::createSpeciesReferenceUnitsData @internal =item Model::removeListFormulaUnitsData @internal =item Model::createSubstanceUnitsData @internal =item Model::getL3SubstanceUD @internal =item Model::getSubstanceUD @internal =item Model::createTimeUnitsData @internal =item Model::getL3TimeUD @internal =item Model::getTimeUD @internal =item Model::createVolumeUnitsData @internal =item Model::getL3VolumeUD @internal =item Model::getVolumeUD @internal =item Model::createAreaUnitsData @internal =item Model::getL3AreaUD @internal =item Model::getAreaUD @internal =item Model::createLengthUnitsData @internal =item Model::getL3LengthUD @internal =item Model::getLengthUD @internal =item Model::createExtentUnitsData @internal =item Model::getL3ExtentUD @internal =item Model::createSubstancePerTimeUnitsData @internal =item Model::getL3SubstancePerTimeUD @internal =item Model::getSubstancePerTimeUD @internal =item Model::createCompartmentUnitsData @internal =item Model::createSpeciesUnitsData @internal =item Model::createL3SpeciesUnitsData @internal =item Model::createParameterUnitsData @internal =item Model::createUnitsDataFromMath @internal =item Model::createInitialAssignmentUnitsData @internal =item Model::createConstraintUnitsData @internal =item Model::createRuleUnitsData @internal =item Model::createReactionUnitsData @internal =item Model::createEventUnitsData @internal =item Model::createDelayUnitsData @internal =item Model::createTriggerUnitsData @internal =item Model::createPriorityUnitsData @internal =item Model::createEventAssignmentUnitsData @internal =item Model::createLocalParameterUnitsData @internal =back =head2 SBMLDocument @sbmlpackage{core} @htmlinclude pkg-marker-core.html Overall SBML container object. @if clike LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). The two primary means of reading an SBML model, SBMLReader::readSBML() and SBMLReader::readSBMLFromString(), both return a pointer to an SBMLDocument object. From there, callers can inquire about any errors encountered (e.g., using SBMLDocument::getNumErrors()), access the Model object, and perform other actions such as consistency-checking and model translation. @endif@if python LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). The two primary means of reading an SBML model, SBMLReader::readSBML() and SBMLReader::readSBMLFromString(), both return a pointer to an SBMLDocument object. From there, callers can inquire about any errors encountered (e.g., using SBMLDocument::getNumErrors()), access the Model object, and perform other actions such as consistency-checking and model translation. @endif@if java LibSBML uses the class SBMLDocument as a top-level container for storing SBML content and data associated with it (such as warnings and error messages). The two primary means of reading an SBML model, SBMLReader::readSBML(String filename) and SBMLReader::readSBMLFromString(String xml), both return an SBMLDocument object. From there, callers can inquire about any errors encountered (e.g., using SBMLDocument::getNumErrors()), access the Model object, and perform other actions such as consistency-checking and model translation. @endif@~ When creating fresh models programmatically, the starting point is typically the creation of an SBMLDocument object instance. The SBMLDocument constructor accepts arguments for the SBML Level and Version of the model to be created. After creating the SBMLDocument object, calling programs then typically call SBMLDocument::createModel() almost immediately, and then proceed to call the methods on the Model object to fill out the model's contents. SBMLDocument corresponds roughly to the class Sbml defined in the SBML Level 2 specification and SBML in the Level 3 specification. It does not have a direct correspondence in SBML Level 1. (However, to make matters simpler for applications, libSBML creates an SBMLDocument no matter whether the model is Level 1, Level 2 or Level 3.) In its barest form, when written out in XML format for (e.g.) SBML Level 2 Version 4, the corresponding structure is the following: @verbatim ... @endverbatim SBMLDocument is derived from SBase, and therefore contains the usual SBase attributes (in SBML Level 2 and Level 3) of "metaid" and "sboTerm", as well as the subelements "notes" and "annotation". It also contains the attributes "level" and "version" indicating the Level and Version of the SBML data structure. These can be accessed using the methods defined by the SBase class for that purpose. @section checking Checking consistency and adherence to SBML specifications One of the most important features of libSBML is its ability to perform SBML validation to ensure that a model adheres to the SBML specification for whatever Level+Version combination the model uses. SBMLDocument provides the methods for running consistency-checking and validation rules on the SBML content. First, a brief explanation of the rationale is in order. In libSBML versions up to and including the version 3.3.x series, the individual methods for creating and setting attributes and other components were quite lenient, and allowed a caller to compose SBML entities that might not, in the end, represent valid SBML. This allowed applications the freedom to do things such as save incomplete models (which is useful when models are being developed over long periods of time). In the version 4.x series, libSBML is somewhat stricter, but still permits structures to be created independently and the results to be combined in a separate step. In all these cases, it means that a separate validation step is necessary when a calling program finally wants to finish a complete SBML document. The primary interface to this validation facility is SBMLDocument's SBMLDocument::checkInternalConsistency() and SBMLDocument::checkConsistency(). The former verifies the basic internal consistency and syntax of an SBML document, and the latter implements more elaborate validation rules (both those defined by the SBML specifications, as well as additional rules offered by libSBML). @if clike The checks performed by SBMLDocument::checkInternalConsistency() are hardwired and cannot be changed by calling programs, but the validation performed by SBMLDocument::checkConsistency() is under program control using the method SBMLDocument::setConsistencyChecks(). Applications can selectively disable specific kinds of checks that they may not be interested in, by calling SBMLDocument::setConsistencyChecks() with appropriate parameters. @endif@if python The checks performed by SBMLDocument::checkInternalConsistency() are hardwired and cannot be changed by calling programs, but the validation performed by SBMLDocument::checkConsistency() is under program control using the method SBMLDocument::setConsistencyChecks(). Applications can selectively disable specific kinds of checks that they may not be interested in, by calling SBMLDocument::setConsistencyChecks() with appropriate parameters. @endif@if java The checks performed by SBMLDocument::checkInternalConsistency() are hardwired and cannot be changed by calling programs, but the validation performed by SBMLDocument::checkConsistency() is under program control using the method SBMLDocument::setConsistencyChecks(int categ, boolean onoff). Applications can selectively disable specific kinds of checks that they may not be interested by calling SBMLDocument::setConsistencyChecks(int categ, boolean onoff) with appropriate parameters. @endif@~ These methods have slightly different relevance depending on whether a model is created programmaticaly from scratch, or whether it is read in from a file or data stream. The following list summarizes the possible scenarios. Scenario 1: Creating a model from scratch. Before writing out the model, @li Call SBMLDocument::checkInternalConsistency(), then inquire about the results by calling SBMLDocument::getNumErrors() @li Call @if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @else SBMLDocument::setConsistencyChecks() @endif@~ to configure which checks will be performed by SBMLDocument::checkConsistency() @li Call SBMLDocument::checkConsistency(), then inquire about the results by calling SBMLDocument::getNumErrors() Scenario 2: Reading a model from a file or data stream. After reading the model, @li Basic consistency checks will have been performed automatically by libSBML upon reading the content, so you only need to inquire about the results by using SBMLDocument::getNumErrors() @li Call @if java SBMLDocument::setConsistencyChecks(int categ, boolean onoff) @else SBMLDocument::setConsistencyChecks() @endif@~ to configure which checks are performed by SBMLDocument::checkConsistency() @li Call SBMLDocument::checkConsistency(), then inquire about the results by calling SBMLDocument::getNumErrors() @if clike An example of using the consistency-checking and validation facilities is provided in this manual in the section @ref libsbml-example. @endif@~ It should be noted that as of SBML Level 3 Version 2, the Model became an optional child of SBMLDocument, instead of being required. This means that one can no longer use SBMLDocument::getModel() as a cheap method of checking if an SBML document was read in properly: the more robust getError methods detailed above must be used instead. @section converting Converting documents between Levels and Versions of SBML LibSBML provides facilities for limited translation of SBML between Levels and Versions of the SBML specifications. The method for doing is is @if java SBMLDocument::setLevelAndVersion(long lev, long ver, boolean strict) @else setLevelAndVersion() @endif. In general, models can be converted upward without difficulty (e.g., from SBML Level 1 to Level 2, or from an earlier Version of Level 2 to the latest Version of Level 2). Sometimes models can be translated downward as well, if they do not use constructs specific to more advanced Levels of SBML. Calling @if java SBMLDocument::setLevelAndVersion(long lev, long ver, boolean strict) @else SBMLDocument::setLevelAndVersion() @endif@~ will not I lead to a successful conversion. The method will return a boolean value to indicate success or failure. Callers must check the error log (see next section) attached to the SBMLDocument object after calling @if java SBMLDocument::setLevelAndVersion(long lev, long ver) @else SBMLDocument::setLevelAndVersion() @endif@~ in order to assess whether any problems arose. If an application is interested in translating to a lower Level and/or Version of SBML within a Level, the following methods allow for prior assessment of whether there is sufficient compatibility to make a translation possible: @li SBMLDocument::checkL1Compatibility(), @li SBMLDocument::checkL2v1Compatibility(), @li SBMLDocument::checkL2v2Compatibility(), @li SBMLDocument::checkL2v3Compatibility(), @li SBMLDocument::checkL2v4Compatibility(), @li SBMLDocument::checkL2v5Compatibility(), and @li SBMLDocument::checkL3v1Compatibility(). Some changes between Versions of SBML Level 2 may lead to unexpected behaviors when attempting conversions in either direction. For example, SBML Level 2 Version 4 relaxed the requirement for consistency in units of measurement between expressions annd quantities in a model. As a result, a model written in Version 4, if converted to Version 3 with no other changes, may fail validation as a Version 3 model because Version 3 imposed stricter requirements on unit consistency. Other changes between SBML Level 2 and Level 3 make downward conversions challenging. In some cases, it means that a model converted to Level 2 from Level 3 will contain attributes that were not explicitly given in the Level 3 model, because in Level 2 these attributes may have been optional or have default values. @section errors Error handling Upon reading a model, SBMLDocument logs any problems encountered while reading the model from the file or data stream. The log contains objects that record diagnostic information about any notable issues that arose. Whether the problems are warnings or errors, they are both reported through a single common interface involving the object class SBMLError. The methods SBMLDocument::getNumErrors(), @if java SBMLDocument::getError(long n) @else SBMLDocument::getError() @endif@~ and SBMLDocument::printErrors() allow callers to interact with the warnings or errors logged. Alternatively, callers may retrieve the entire log as an SBMLErrorLog object using the method SBMLDocument::getErrorLog(). The SBMLErrorLog object provides some alternative methods for interacting with the set of errors and warnings. In either case, applications typically should first call SBMLDocument::getNumErrors() to find out if any issues have been logged after specific libSBML operations such as the ones discussed in the sections above. If they have, then an application will should proceed to inspect the individual reports using either the direct interfaces on SBMLDocument or using the methods on the SBMLErrorLog object. @if clike An example of using the error facility is provided in this manual in the section @ref libsbml-example. @endif@~ =over =item SBMLDocument::getDefaultLevel The default SBML Level of new SBMLDocument objects. C doc_sbmldocument_default_level @return an integer indicating the most recent SBML specification Level. C doc_note_static_methods @see @if clike getDefaultVersion() @else SBMLDocument::getDefaultVersion() @endif@~ =item SBMLDocument::getDefaultVersion The default Version of new SBMLDocument objects. C doc_sbmldocument_default_version @return an integer indicating the most recent SBML specification Version. C doc_note_static_methods @see @if clike getDefaultLevel() @else SBMLDocument::getDefaultLevel() @endif@~ =item SBMLDocument::SBMLDocument Creates a new SBMLDocument, optionally with given values for the SBML Level and Version. If both the SBML Level and Version attributes are not specified, the SBML document is treated as having the latest Level and Version of SBML as determined by SBMLDocument::getDefaultLevel() and SBMLDocument::getDefaultVersion(); however, the SBMLDocument object is otherwise left blank. In particular, the blank SBMLDocument object has no associated XML attributes, including (but not limited to) an XML namespace declaration. The XML namespace declaration is not added until the model is written out, or the method SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif) is called. This may be important to keep in mind if an application needs to add additional XML namespace declarations on the C<<sbml>> element. Application writers should either provide values for C and C on the call to this constructor, or else call SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif) shortly after creating the SBMLDocument object. @param level an integer for the SBML Level. @param version an integer for the Version within the SBML Level. C doc_throw_exception_lv @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif) @see getDefaultLevel() @see getDefaultVersion() =item SBMLDocument::SBMLDocument Creates a new SBMLDocument using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace =item SBMLDocument::SBMLDocument Copy constructor; creates a copy of this SBMLDocument. @param orig the object to copy. =item SBMLDocument::accept @internal =item SBMLDocument::clone Creates and returns a deep copy of this SBMLDocument object. @return the (deep) copy of this SBMLDocument object. =item SBMLDocument::isSetModel Returns C if the Model object has been set, otherwise returns C. @return C if the Model object has been set =item SBMLDocument::getModel Returns the Model object stored in this SBMLDocument. It is important to note that this method does not create a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(@if java Model@endif). This method returns C if a model does not yet exist. @return the Model contained in this SBMLDocument, or C if no such model exists. @see createModel() =item SBMLDocument::getModel Returns the Model object stored in this SBMLDocument. It is important to note that this method does not create a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(@if java Model@endif). This method returns C if a model does not yet exist. @return the Model contained in this SBMLDocument. @see createModel() =item SBMLDocument::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item SBMLDocument::getElementByMetaId Returns the first child element it can find with the given C, or itself if it has the given C, or C if no such object is found. @param metaid string representing the metaid of the object to find. @return pointer to the first element found with the given C. =item SBMLDocument::getAllElements Returns a List of all child SBase objects, including those nested to an arbitrary depth @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item SBMLDocument::expandFunctionDefinitions Removes FunctionDefinition constructs from the document and expands any instances of their use within C<<math>> elements. For example, suppose a Model contains a FunctionDefinition with identifier C<"f"> representing the math expression: f(x, y) = x y. Suppose further that there is a reaction in which the C<<math>> element of the KineticLaw object contains C, where C and C

are other identifiers defined in the model. The outcome of invoking this method is that the C<<math>> of the KineticLaw now represents the expression s p and the model no longer contains any FunctionDefinition objects. @return bool C if the transformation was successful, C, otherwise. @note This function will check the consistency of a model before attemptimg the transformation. If the model is not valid SBML, the transformation will not be performed and the function will return C. =item SBMLDocument::expandInitialAssignments Removes InitialAssignment constructs from the document and replaces them with appropriate values. For example, suppose a Model contains a InitialAssignment to a symbol C<"k"> where C<"k"> is the identifier of a Parameter. The outcome of invoking this method is that the "value" attribute of the Parameter definition is set to the result calculated using the InitialAssignment object's C<<math>> formula, and the corresponding InitialAssignment is then removed from the Model. @return bool C if the transformation was successful, C, otherwise. @note This function will check the consistency of a model before attemptimg the transformation. If the model is not valid SBML, the transformation will not be performed and the function will return C. As part of that process, this method will check that it has values for any components referred to by the C<<math>> elements of InitialAssignment objects. In cases where not all of the values have been declared (e.g., if the mathematical expression refers to model entities that have no declared values), the InitialAssignment in question will I be removed and this method will return C. =item SBMLDocument::setLevelAndVersion Sets the SBML Level and Version of this SBMLDocument instance, attempting to convert the model as needed. This method is the principal way in libSBML to convert models between Levels and Versions of SBML. Generally, models can be converted upward without difficulty (e.g., from SBML Level 1 to Level 2, or from an earlier Version of Level 2 to the latest Version of Level 2). Sometimes models can be translated downward as well, if they do not use constructs specific to more advanced Levels of SBML. Before calling this method, callers may check compatibility directly using the methods SBMLDocument::checkL1Compatibility(), SBMLDocument::checkL2v1Compatibility(), SBMLDocument::checkL2v2Compatibility(), SBMLDocument::checkL2v3Compatibility(), SBMLDocument::checkL2v4Compatibility(), SBMLDocument::checkL2v5Compatibility(), SBMLDocument::checkL3v1Compatibility(), and SBMLDocument::checkL3v2Compatibility(). The valid combinations of SBML Level and Version as of this release of libSBML are the following: \n=over\n \n=item\n\nLevel 1 Version 2 \n=item\n\nLevel 2 Version 1 \n=item\n\nLevel 2 Version 2 \n=item\n\nLevel 2 Version 3 \n=item\n\nLevel 2 Version 4 \n=item\n\nLevel 2 Version 5 \n=item\n\nLevel 3 Version 1 \n=item\n\nLevel 3 Version 2 \n=back\n Strict conversion applies the additional criteria that both the source and the target model must be consistent SBML. Users can control the consistency checks that are applied using the SBMLDocument::setConsistencyChecksForConversion(@if java int, boolean@endif) method. If either the source or the potential target model have validation errors, the conversion is not performed. When a strict conversion is successful, the underlying SBML object model is altered to reflect the new level and version. Thus, information that cannot be converted (e.g. sboTerms) will be lost. @param level the desired SBML Level. @param version the desired Version within the SBML Level. @param strict boolean indicating whether to check consistency of both the source and target model when performing conversion (defaults to C< true >). @param ignorePackages boolean indicating whether the presence of packages should be ignored by the conversion routine (defaults to C< false >). @return C if the level and version of the document were successfully set to the requested values (which may have required conversion of the model), C otherwise. @note Calling this method will not I lead to a successful conversion. If the conversion fails, it will be logged in the error list associated with this SBMLDocument. Callers should consult getNumErrors() to find out if the conversion succeeded without problems. For conversions from Level 2 to Level 1, callers can also check the Level of the model after calling this method to find out whether it is Level 1. (If the conversion to Level 1 failed, the Level of this model will be left unchanged.) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see checkL1Compatibility() @see checkL2v1Compatibility() @see checkL2v2Compatibility() @see checkL2v3Compatibility() @see checkL2v4Compatibility() @see checkL2v5Compatibility() @see checkL3v1Compatibility() =item SBMLDocument::updateSBMLNamespace @internal =item SBMLDocument::setModel Sets the Model for this SBMLDocument to a copy of the given Model. @param m the new Model to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @see createModel() @see getModel() =item SBMLDocument::createModel Creates a new Model inside this SBMLDocument, and returns a pointer to it. In SBML Level 2, the use of an identifier on a Model object is optional. This method takes an optional argument, C, for setting the identifier. If not supplied, the identifier attribute on the Model instance is not set. @param sid the identifier of the new Model to create. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see getModel() @see SBMLDocument::setModel(@if java Model@endif) =item SBMLDocument::setLocationURI Sets the location of this SBMLDocument. Called automatically when readSBMLFromFile is used, but may be set manually as well. =item SBMLDocument::getLocationURI Get the location of this SBMLDocument. If this document was read from a file or had its location set manually, that filename or set location will be returned, otherwise, an empty string is returned. =item SBMLDocument::getLocationURI Get the location of this SBMLDocument. If this document was read from a file or had its location set manually, that filename or set location will be returned, otherwise, an empty string is returned. =item SBMLDocument::setConsistencyChecks Controls the consistency checks that are performed when SBMLDocument::checkConsistency() is called. This method works by adding or subtracting consistency checks from the set of all possible checks that SBMLDocument::checkConsistency() knows how to perform. This method may need to be called multiple times in order to achieve the desired combination of checks. The first argument (C) in a call to this method indicates the category of consistency/error checks that are to be turned on or off, and the second argument (C, a boolean) indicates whether to turn it on (value of C) or off (value of C). @if clike The possible categories (values to the argument C) are the set of values from the enumeration #SBMLErrorCategory_t. The following are the possible choices: @endif@if java The possible categories (values to the argument C) are the set of constants whose names begin with the characters C in the interface class {@link libsbmlConstants}. The following are the possible choices: @endif@if python The possible categories (values to the argument C) are the set of constants whose names begin with the characters C in the interface class @link libsbml libsbml@endlink. The following are the possible choices: @endif@~ \n=over\n \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency of specific SBML language constructs. Performing this set of checks is highly recommended. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and consistency of identifiers used for model entities. An example of inconsistency would be using a species identifier in a reaction rate formula without first having declared the species. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement units associated with quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of SBO identifiers (if any) used in the model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether the system of equations implied by a model is mathematically overdetermined. With respect to the SBML specification, this is validation rule #10601 in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for recommended good modeling practice. (These are tests performed by libSBML and do not have equivalent SBML validation rules.) \n=back\n By default, all validation checks are applied to the model in an SBMLDocument object I SBMLDocument::setConsistencyChecks(@if java int categ, boolean onoff@endif) is called to indicate that only a subset should be applied. Further, this default (i.e., performing all checks) applies separately to each new SBMLDocument object created. In other words, each time a model is read using SBMLReader::readSBML(@if java String filename@endif), SBMLReader::readSBMLFromString(@if java String xml@endif), or the global functions readSBML() and readSBMLFromString(), a new SBMLDocument is created and for that document, a call to SBMLDocument::checkConsistency() will default to applying all possible checks. Calling programs must invoke SBMLDocument::setConsistencyChecks(@if java int categ, boolean onoff@endif) for each such new model if they wish to change the consistency checks applied. @param category a value drawn from @if clike #SBMLErrorCategory_t@else the set of SBML error categories@endif@~ indicating the consistency checking/validation to be turned on or off. @param apply a boolean indicating whether the checks indicated by C should be applied or not. @see SBMLDocument::checkConsistency() =item SBMLDocument::setConsistencyChecksForConversion Controls the consistency checks that are performed when SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif) is called. This method works by adding or subtracting consistency checks from the set of all possible checks that may be performed to avoid conversion to or from an invalid document. This method may need to be called multiple times in order to achieve the desired combination of checks. The first argument (C) in a call to this method indicates the category of consistency/error checks that are to be turned on or off, and the second argument (C, a boolean) indicates whether to turn it on (value of C) or off (value of C). @if clike The possible categories (values to the argument C) are the set of values from the enumeration #SBMLErrorCategory_t. The following are the possible choices: @endif@if java The possible categories (values to the argument C) are the set of constants whose names begin with the characters C in the interface class {@link libsbmlConstants}. The following are the possible choices: @endif@if python The possible categories (values to the argument C) are the set of constants whose names begin with the characters C in the interface class @link libsbml libsbml@endlink. The following are the possible choices: @endif@~ \n=over\n \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink: Correctness and consistency of specific SBML language constructs. Performing this set of checks is highly recommended. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink: Correctness and consistency of identifiers used for model entities. An example of inconsistency would be using a species identifier in a reaction rate formula without first having declared the species. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink: Consistency of measurement units associated with quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink: Syntax of MathML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink: Consistency and validity of SBO identifiers (if any) used in the model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink: Static analysis of whether the system of equations implied by a model is mathematically overdetermined. With respect to the SBML specification, this is validation rule #10601 in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications. \n=item\n\n@link SBMLErrorCategory_t#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink: Additional checks for recommended good modeling practice. (These are tests performed by libSBML and do not have equivalent SBML validation rules.) \n=back\n By default, all validation checks are applied to the model in an SBMLDocument object I SBMLDocument::setConsistencyChecks(@if java int, boolean@endif) is called to indicate that only a subset should be applied. Further, this default (i.e., performing all checks) applies separately to each new SBMLDocument object created. In other words, each time a model is read using SBMLReader::readSBML(@if java String@endif), SBMLReader::readSBMLFromString(@if java String@endif), or the global functions readSBML() and readSBMLFromString(), a new SBMLDocument is created and for that document, a call to SBMLDocument::checkConsistency() will default to applying all possible checks. Calling programs must invoke SBMLDocument::setConsistencyChecks(@if java int, boolean@endif) for each such new model if they wish to change the consistency checks applied. @param category a value drawn from @if clike #SBMLErrorCategory_t@else the set of SBML error categories@endif@~ indicating the consistency checking/validation to be turned on or off. @param apply a boolean indicating whether the checks indicated by C should be applied or not. @see SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif) =item SBMLDocument::checkConsistency Performs consistency checking and validation on this SBML document. If this method returns a nonzero value (meaning, one or more consistency checks have failed for SBML document), the failures may be due to warnings I errors. Callers should inspect the severity flag in the individual SBMLError objects returned by SBMLDocument::getError(@if java long@endif) to determine the nature of the failures. @return the number of failed checks (errors) encountered. @see SBMLDocument::checkInternalConsistency() =item SBMLDocument::checkConsistencyWithStrictUnits Performs consistency checking and validation on this SBML document using the ultra strict units validator that assumes that there are no hidden numerical conversion factors. If this method returns a nonzero value (meaning, one or more consistency checks have failed for SBML document), the failures may be due to warnings I errors. Callers should inspect the severity flag in the individual SBMLError objects returned by SBMLDocument::getError(@if java long@endif) to determine the nature of the failures. @return the number of failed checks (errors) encountered. @see SBMLDocument::checkInternalConsistency() =item SBMLDocument::validateSBML Performs consistency checking and validation on this SBML document. If this method returns a nonzero value (meaning, one or more consistency checks have failed for SBML document), the failures may be due to warnings I errors. Callers should inspect the severity flag in the individual SBMLError objects returned by SBMLDocument::getError(@if java long@endif) to determine the nature of the failures. @note unlike checkConsistency this method will write the document in order to determine all errors for the document. This will also clear the error log. @return the number of failed checks (errors) encountered. @see SBMLDocument::checkConsistency() =item SBMLDocument::checkInternalConsistency Performs consistency checking on libSBML's internal representation of an SBML Model. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. The distinction between this method and SBMLDocument::checkConsistency() is that this method reports on fundamental syntactic and structural errors that violate the XML Schema for SBML; by contrast, SBMLDocument::checkConsistency() performs more elaborate model verifications and also validation according to the validation rules written in the appendices of the SBML Level 2 Versions 2–4 specification documents. @see SBMLDocument::checkConsistency() =item SBMLDocument::checkL1Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 1 and can be converted to Level 1. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL2v1Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 1 and can be converted to Level 2 Version 1. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL2v2Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 2 and can be converted to Level 2 Version 2. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL2v3Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 3 and can be converted to Level 2 Version 3. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL2v4Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 4 and can be converted to Level 2 Version 4. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL2v5Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 2 Version 5 and can be converted to Level 2 Version 5. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL3v1Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 3 Version 1 and can be converted to Level 3 Version 1. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::checkL3v2Compatibility Performs a set of consistency checks on the document to establish whether it is compatible with SBML Level 3 Version 2 and can be converted to Level 3 Version 2. Callers should query the results of the consistency check by calling SBMLDocument::getError(@if java long@endif). @return the number of failed checks (errors) encountered. =item SBMLDocument::getError Returns the nth error or warning encountered during parsing, consistency checking, or attempted translation of this model. Callers can use method XMLError::getSeverity() on the result to assess the severity of the problem. The possible severity levels range from informational messages to fatal errors. @return the error or warning indexed by integer C, or return C if C. @param n the integer index of the error sought. @see SBMLDocument::getNumErrors() =item SBMLDocument::getErrorWithSeverity Returns the nth error or warning with the given severity encountered during parsing, consistency checking, or attempted translation of this model. @return the error or warning indexed by integer C, or return C if C. @param n the integer index of the error sought. @param severity the severity of the error sought. @see SBMLDocument::getNumErrors() =item SBMLDocument::getNumErrors Returns the number of errors or warnings encountered during parsing, consistency checking, or attempted translation of this model. @return the number of errors or warnings encountered. @see SBMLDocument::getError(unsigned int n) =item SBMLDocument::getNumErrors Returns the number of errors or warnings encountered with the given severity during parsing, consistency checking, or attempted translation of this model. @param severity the severity of the error sought. @return the number of errors or warnings encountered. @see SBMLDocument::getError(unsigned int n) =item SBMLDocument::printErrors Prints all the errors or warnings encountered trying to parse, check, or translate this SBML document. It prints the text to the stream given by the optional parameter @p stream. If no parameter is given, it prints the output to the standard error stream. If no errors have occurred, i.e., C, no output will be sent to the stream. The format of the output is: @verbatim N error(s): line NNN: (id) message @endverbatim @param stream the ostream or ostringstream object indicating where the output should be printed. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see getNumErrors() @see getErrorLog() @see SBMLDocument::getError(unsigned int n) =item SBMLDocument::printErrors Prints all the errors or warnings with the given severity encountered trying to parse, check, or translate this SBML document. It prints the text to the stream given by the parameter @p stream. If no errors have occurred, i.e., C, no output will be sent to the stream. The format of the output is: @verbatim N error(s): line NNN: (id) message @endverbatim @param stream the ostream or ostringstream object indicating where the output should be printed. @param severity of the errors sought. @see getNumErrors(unsigned int severity) @see getErrorLog() @see SBMLDocument::getErrorWithSeverity(unsigned int n, unsigned int severity) =item SBMLDocument::setSBMLDocument @internal =item SBMLDocument::convert Converts this document using the converter that best matches the given conversion properties. @param props the conversion properties to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE@endlink =item SBMLDocument::enablePackageInternal @internal =item SBMLDocument::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_DOCUMENT SBML_DOCUMENT@endlink (default). C doc_warning_typecodes_not_unique @see SBMLDocument::getElementName() @see getPackageName() =item SBMLDocument::getElementName Returns the XML element name of this object, which for SBMLDocument, is always C<"sbml">. @return the name of this element, i.e., C<"sbml">. =item SBMLDocument::getErrorLog Returns the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model. @return the SBMLErrorLog used for this SBMLDocument. @see SBMLDocument::getNumErrors() =item SBMLDocument::getErrorLog Returns a constant pointer to the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model. @return the SBMLErrorLog used for this SBMLDocument. @see SBMLDocument::getNumErrors() =item SBMLDocument::getNamespaces Returns a list of XML Namespaces associated with the XML content of this SBML document. @return the XML Namespaces associated with this SBML object. =item SBMLDocument::enableDefaultNS Set/unset default namespace to each top-level element defined in the given package extension. This works by adding a C attribute. No prefix will be written when writing elements defined in the given package extension if C is given as second argument. @param package the name or URI of the package extension. @param flag boolean value to indicate whether to write a namespace prefix. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink =item SBMLDocument::isEnabledDefaultNS Returns C if a default namespace is added to each top-level element defined in the given package extension, otherwise returns C. This basically checks if the attribute C is present. @param package the name or URI of the package extension. @return a boolean indicating whether the given package's default namespace is enabled. =item SBMLDocument::setPackageRequired Sets the C attribute value of the given package extension. @param package the name or URI of the package extension. @param flag Boolean value indicating whether the package is required. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink =item SBMLDocument::getPackageRequired Returns the C attribute of the given package extension. @param package the name or URI of the package extension. @return Boolean flag indicating whether the package is flagged as being required. =item SBMLDocument::isSetPackageRequired Returns C if the required attribute of the given package extension is defined, otherwise returns C. @param package the name or URI of the package extension. @return a Boolean indicating whether the package's 'required' flag is set. =item SBMLDocument::isIgnoredPackage Returns C if the given package extension is one of an ignored packages, otherwise returns C. An ignored package is one that is defined to be used in this SBML document, but the package is not enabled in this copy of libSBML. @param pkgURI the URI of the package extension. @return a Boolean, C if the package is being ignored and C otherwise. =item SBMLDocument::isDisabledIgnoredPackage Returns C if the given package extension is one of an ignored packages that has been disabled, otherwise returns C. An ignored package is one that is defined to be used in this SBML document, but the package is not enabled in this copy of libSBML. It may have been disabled to avoid reproducing the package information when writing out the file. @param pkgURI the URI of the package extension. @return a Boolean, C if the package is being ignored and C otherwise. =item SBMLDocument::setPkgRequired Sets the value of the C attribute for the given package. @param package the name or URI of the package extension. @param flag a Boolean value. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_UNKNOWN_VERSION LIBSBML_PKG_UNKNOWN_VERSION@endlink @deprecated Replaced in libSBML 5.2.0 by setPackageRequired(@if java String, boolean@endif) =item SBMLDocument::getPkgRequired Returns the C attribute of the given package extension. @param package the name or URI of the package extension. @return a Boolean value indicating whether the package is flagged as being required in this SBML document. @deprecated Replaced in libSBML 5.2.0 by getPackageRequired(@if java String@endif) =item SBMLDocument::isSetPkgRequired Returns C if the required attribute of the given package extension is defined, otherwise returns C. @param package the name or URI of the package extension. @return a Boolean value. @deprecated Replaced in libSBML 5.2.0 by isSetPackageRequired(@if java String@endif) =item SBMLDocument::isIgnoredPkg Returns C if the given package extension is one of ignored packages, otherwise returns C. An ignored package is one that is defined to be used in this SBML document, but the package is not enabled in this copy of libSBML. @param pkgURI the URI of the package extension. @return a boolean indicating whether the given package is being ignored. @deprecated Replaced in libSBML 5.2.0 by isIgnoredPackage(@if java String@endif) =item SBMLDocument::getElementPosition @internal =item SBMLDocument::writeElements @internal =item SBMLDocument::getApplicableValidators @internal =item SBMLDocument::getConversionValidators @internal =item SBMLDocument::setApplicableValidators @internal =item SBMLDocument::setConversionValidators @internal =item SBMLDocument::getNumValidators @internal =item SBMLDocument::clearValidators @internal =item SBMLDocument::addValidator @internal =item SBMLDocument::getValidator @internal =item SBMLDocument::addUnknownPackageRequired @internal =item SBMLDocument::hasUnknownPackage @internal =item SBMLDocument::getNumUnknownPackages @internal =item SBMLDocument::getUnknownPackageURI @internal =item SBMLDocument::getUnknownPackagePrefix @internal =item SBMLDocument::createObject @internal =item SBMLDocument::addExpectedAttributes @internal =item SBMLDocument::readAttributes @internal =item SBMLDocument::writeAttributes @internal =item SBMLDocument::writeXMLNS @internal =item SBMLDocument::setInvalidLevel @internal =back =head2 FunctionDefinition @sbmlpackage{core} @htmlinclude pkg-marker-core.html A user-defined function in an SBML model. The FunctionDefinition structure associates an identifier with a function definition. This identifier can then be used as the function called in subsequent MathML content elsewhere in an SBML model. FunctionDefinition has one required attribute, "id", to give the function a unique identifier by which other parts of an SBML model definition can refer to it. A FunctionDefinition instance can also have an optional "name" attribute of type C. Identifiers and names must be used according to the guidelines described in the SBML specification (e.g., Section 3.3 in the Level 2 Version 4 specification). FunctionDefinition has a "math" subelement containing a MathML expression defining the function body. In SBML Level 2 and SBML Level 3 Version 1, that "math" subelement is required; in SBML Level 3 Version 2, this restriction was relaxed, making the "math" subelement optional. The content of this element can only be a MathML "lambda" element. The "lambda" element must begin with zero or more "bvar" elements, followed by any other of the elements in the MathML subset allowed in SBML Level 2 I "lambda" (i.e., a "lambda" element cannot contain another "lambda" element). This is the only place in SBML where a "lambda" element can be used. The function defined by a FunctionDefinition is only available for use in other MathML elements that I the FunctionDefinition definition in the model. (These restrictions prevent recursive and mutually-recursive functions from being expressed.) A further restriction on the content of "math" is that it cannot contain references to variables other than the variables declared to the "lambda" itself. That is, the contents of MathML "ci" elements inside the body of the "lambda" can only be the variables declared by its "bvar" elements, or the identifiers of other FunctionDefinition instances in the model. This means must be written so that all variables or parameters used in the MathML content are passed to them via their function parameters. In SBML Level 2, this restriction applies also to the MathML C elements for I

  • @link UnitKind_t#UNIT_KIND_LITER UNIT_KIND_LITER@endlink C<==> @link UnitKind_t#UNIT_KIND_LITRE UNIT_KIND_LITRE@endlink
  • @link UnitKind_t#UNIT_KIND_METER UNIT_KIND_METER@endlink C<==> @link UnitKind_t#UNIT_KIND_METRE UNIT_KIND_METRE@endlink \n=back\n In the two cases above, C equality comparison would yield C<0> (false) (because each of the above is a distinct enumeration value), but this function returns C. @param uk1 a C value. @param uk2 a second C value to compare to C. @return C<1> (true) if C is logically equivalent to @p uk2, C<0> (false) otherwise. @note For more information about the libSBML unit codes, please refer to the class documentation for Unit. @if conly @memberof Unit_t @endif =item UnitKind_forName Converts a text string naming a kind of unit to its corresponding libSBML C constant/enumeration value. @param name a string, the name of a predefined base unit in SBML. @return @if clike a value from UnitKind_t corresponding to the given string C (determined in a case-insensitive manner). @endif@if python a value the set of C codes defined in class @link libsbml libsbml@endlink, corresponding to the string C (determined in a case-insensitive manner).@endif@if java a value the set of C codes defined in class {@link libsbmlConstants}, corresponding to the string C (determined in a case-insensitive manner).@endif@~ @note For more information about the libSBML unit codes, please refer to the class documentation for Unit. @if conly @memberof Unit_t @endif =item UnitKind_toString Converts a unit code to a text string equivalent. @param uk @if clike a value from the UnitKind_t enumeration @endif@if python a value from the set of C codes defined in the class @link libsbml libsbml@endlink @endif@if java a value from the set of C codes defined in the class {@link libsbmlConstants} @endif@~ @return the name corresponding to the given unit code. @note For more information about the libSBML unit codes, please refer to the class documentation for Unit. @warning The string returned is a static data value. The caller does not own the returned string and is therefore not allowed to modify it. @if conly @memberof Unit_t @endif =item UnitKind_isValidUnitKindString Predicate for testing whether a given string corresponds to a predefined libSBML unit code. @param str a text string naming a base unit defined by SBML. @param level the Level of SBML. @param version the Version within the Level of SBML. @return 1 (true) if string is the name of a valid C value, C<0> (false) otherwise. @note For more information about the libSBML unit codes, please refer to the class documentation for Unit. @if conly @memberof Unit_t @endif =back =head2 Unit @sbmlpackage{core} @htmlinclude pkg-marker-core.html A single unit referenced in an SBML unit definition. The SBML unit definition facility uses two classes of objects, UnitDefinition and Unit. The approach to defining units in SBML is compositional; for example, meter second –2 is constructed by combining a Unit object representing meter with another Unit object representing second –2. The combination is wrapped inside a UnitDefinition, which provides for assigning an identifier and optional name to the combination. The identifier can then be referenced from elsewhere in a model. Thus, the UnitDefinition class is the container, and Unit instances are placed inside UnitDefinition instances. A Unit has four attributes named "kind", "exponent", "scale" and "multiplier". It represents a (possibly transformed) reference to a base unit. The attribute "kind" on Unit indicates the chosen base unit. Its value must be one of the text strings listed below; this list corresponds to SBML Level 3: C doc_base_units A few small differences exist between the Level 3 list of base units and the list defined in other Level/Version combinations of SBML. Specifically, Levels of SBML before Level 3 do not define C; conversely, Level 2 Version 1 defines C, and Level 1 defines C, C, and C, none of which are available in Level 3. In libSBML, each of the predefined base unit names is represented by an enumeration value @if clike in #UnitKind_t@else whose name begins with the characters C@endif, discussed in a separate section below. The attribute named "exponent" on Unit represents an exponent on the unit. In SBML Level 2, the attribute is optional and has a default value of C<1> (one); in SBML Level 3, the attribute is mandatory and there is no default value. A Unit also has an attribute called "scale"; its value must be an integer exponent for a power-of-ten multiplier used to set the scale of the unit. For example, a unit having a "kind" value of C and a "scale" value of C<-3> signifies 10 –3 \f$\times\f$ gram, or milligrams. In SBML Level 2, the attribute is optional and has a default value of C<0> (zero), because 10 0 = 1; in SBML Level 3, the attribute is mandatory and has no default value. Lastly, the attribute named "multiplier" can be used to multiply the unit by a real-numbered factor; this enables the definition of units that are not power-of-ten multiples of SI units. For instance, a multiplier of 0.3048 could be used to define C as a measure of length in terms of a C. The "multiplier" attribute is optional in SBML Level 2, where it has a default value of C<1> (one); in SBML Level 3, the attribute is mandatory and has no default value. @if clike

    UnitKind_t

    @else

    Unit identification codes

    @endif@~ As discussed above, SBML defines a set of base units which serves as the starting point for new unit definitions. This set of base units consists of the SI units and a small number of additional convenience units. @if clike Until SBML Level 2 Version 3, there existed a data type in the SBML specifications called C, enumerating the possible SBML base units. Although SBML Level 2 Version 3 removed this type from the language specification, libSBML maintains the corresponding enumeration type #UnitKind_t as a convenience and as a way to provide backward compatibility to previous SBML Level/Version specifications. (The removal in SBML Level 2 Version 3 of the enumeration C was also accompanied by the redefinition of the data type C to include the previous C values as reserved symbols in the C space. This change has no net effect on permissible models, their representation or their syntax. The purpose of the change in the SBML specification was simply to clean up an inconsistency about the contexts in which these values were usable.) @endif@if java In SBML Level 2 Versions before Version 3, there existed an enumeration of units called C. In Version 3, this enumeration was removed and the identifier class C redefined to include the previous C values as reserved symbols. This change has no net effect on permissible models, their representation or their syntax. The purpose of the change in the SBML specification was simply to clean up an inconsistency about the contexts in which these values were usable. However, libSBML maintains UnitKind in the form of of a set of static integer constants whose names begin with the characters C. These constants are defined in the class libsbmlConstants. @endif@if python In SBML Level 2 Versions before Version 3, there existed an enumeration of units called C. In Version 3, this enumeration was removed and the identifier class C redefined to include the previous C values as reserved symbols. This change has no net effect on permissible models, their representation or their syntax. The purpose of the change in the SBML specification was simply to clean up an inconsistency about the contexts in which these values were usable. However, libSBML maintains UnitKind in the form of of a set of static integer constants whose names begin with the characters C. These constants are defined in the class @link libsbml libsbml@endlink. @endif@~ As a consequence of the fact that libSBML supports models in all Levels and Versions of SBML, libSBML's set of C values is a union of all the possible base unit names defined in the different SBML specifications. However, not every base unit is allowed in every Level+Version combination of SBML. Note in particular the following exceptions: \n=over\n \n=item\n\nThe alternate spelling C<"meter"> is included in addition to the official SI spelling C<"metre">. This spelling is only permitted in SBML Level 1 models. \n=item\n\nThe alternate spelling C<"liter"> is included in addition to the official SI spelling C<"litre">. This spelling is only permitted in SBML Level 1 models. \n=item\n\nThe unit C<"Celsius"> is included because of its presence in specifications of SBML prior to SBML Level 2 Version 2. \n=item\n\nThe unit C was introduced in SBML Level 3, and is only permitted for use in SBML Level 3 models. \n=back\n @if clike The table below lists the symbols defined in the C enumeration, and their meanings. @else The table below lists the unit constants defined in libSBML, and their meanings. @endif@~ @htmlinclude unitkind-table.html =over =back =head2 ListOfUnits @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of Unit objects. ListOfUnits is entirely contained within UnitDefinition. C doc_what_is_listof =over =item Unit::Unit Creates a new Unit using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Unit. @param version an unsigned int, the SBML Version to assign to this Unit. C doc_throw_exception_lv C doc_note_setting_lv =item Unit::Unit Creates a new Unit using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Unit::Unit Copy constructor; creates a copy of this Unit. @param orig the object to copy. =item Unit::accept @internal =item Unit::clone Creates and returns a deep copy of this Unit object. @return the (deep) copy of this Unit object. =item Unit::initDefaults Initializes the fields of this Unit object to "typical" default values. The SBML Unit component has slightly different aspects and default attribute values in different SBML Levels and Versions. This method sets the values to certain common defaults, based mostly on what they are in SBML Level 2. Specifically: \n=over\n \n=item\n\nSets attribute "exponent" to C<1> \n=item\n\nSets attribute "scale" to C<0> \n=item\n\nSets attribute "multiplier" to C<1>.0 \n=back\n The "kind" attribute is left unchanged. =item Unit::getKind Returns the "kind" of Unit this is. @if clike @return the value of the "kind" attribute of this Unit as a value from the UnitKind_t enumeration. @endif@if java @return the value of the "kind" attribute of this Unit as a value from the set of constants whose names begin with C defined in the class libsbmlConstants. @endif@if python @return the value of the "kind" attribute of this Unit as a value from the set of constants whose names begin with C defined in the class @link libsbml libsbml@endlink. @endif@~ =item Unit::getExponent Returns the value of the "exponent" attribute of this unit. @return the "exponent" value of this Unit, as an integer. =item Unit::getExponentAsDouble Returns the value of the "exponent" attribute of this unit. @return the "exponent" value of this Unit, as a double. =item Unit::getScale Returns the value of the "scale" attribute of this unit. @return the "scale" value of this Unit, as an integer. =item Unit::getMultiplier Returns the value of the "multiplier" attribute of this Unit. @return the "multiplier" value of this Unit, as a double. =item Unit::getOffset Returns the value of the "offset" attribute of this Unit. @return the "offset" value of this Unit, as a double. C doc_warning_unit_offset_only_l2v1 =item Unit::isAmpere Predicate for testing whether this Unit is of the kind C. @return C if the kind of this Unit is C, C otherwise. =item Unit::isAvogadro Predicate for testing whether this Unit is of the kind C. @return C if the kind of this Unit is C, C otherwise. @note The unit C was introduced in SBML Level 3, and is only permitted for use in SBML Level 3 models. =item Unit::isBecquerel Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isCandela Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isCelsius Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. @warning The predefined unit C was removed from the list of predefined units in SBML Level 2 Version 2 at the same time that the "offset" attribute was removed from Unit definitions. LibSBML methods such as this one related to C are retained in order to support SBML Level 2 Version 1, but their use is strongly discouraged. =item Unit::isCoulomb Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isDimensionless Predicate for testing whether this Unit is of the kind C. @return C if the kind of this Unit is C, C otherwise. =item Unit::isFarad Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isGram Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isGray Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isHenry Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isHertz Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isItem Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isJoule Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isKatal Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isKelvin Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isKilogram Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isLitre Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C or 'liter', C otherwise. =item Unit::isLumen Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isLux Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isMetre Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C or 'meter', C otherwise. =item Unit::isMole Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isNewton Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isOhm Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isPascal Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isRadian Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isSecond Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isSiemens Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isSievert Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isSteradian Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isTesla Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isVolt Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isWatt Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isWeber Predicate for testing whether this Unit is of the kind C @return C if the kind of this Unit is C, C otherwise. =item Unit::isSetKind Predicate to test whether the "kind" attribute of this Unit is set. @return C if the "kind" attribute of this Unit is set, C otherwise. =item Unit::isSetExponent Predicate to test whether the "exponent" attribute of this Unit is set. @return C if the "exponent" attribute of this Unit is set, C otherwise. =item Unit::isSetScale Predicate to test whether the "scale" attribute of this Unit is set. @return C if the "scale" attribute of this Unit is set, C otherwise. =item Unit::isSetMultiplier Predicate to test whether the "multiplier" attribute of this Unit is set. @return C if the "multiplier" attribute of this Unit is set, C otherwise. =item Unit::isSetOffset Predicate to test whether the "offset" attribute of this Unit is set. @return C if the "offset" attribute of this Unit is set, C otherwise. C doc_warning_unit_offset_only_l2v1 =item Unit::setKind Sets the "kind" attribute value of this Unit. @if clike @param kind a value from the UnitKind_t enumeration. @endif@if java @param kind a unit identifier chosen from the set of constants whose names begin with C in libsbmlConstants. @endif@if python @param kind a unit identifier chosen from the set of constants whose names begin with C in @link libsbml libsbml@endlink. @endif@~ C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Unit::setExponent Sets the "exponent" attribute value of this Unit. @param value the integer to which the attribute "exponent" should be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Unit::setExponent Sets the "exponent" attribute value of this Unit. @param value the double to which the attribute "exponent" should be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item Unit::setScale Sets the "scale" attribute value of this Unit. @param value the integer to which the attribute "scale" should be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item Unit::setMultiplier Sets the "multipler" attribute value of this Unit. @param value the floating-point value to which the attribute "multiplier" should be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item Unit::setOffset Sets the "offset" attribute value of this Unit. @param value the floating point value to which the attribute "offset" should set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_unit_offset_only_l2v1 =item Unit::unsetKind Unsets the "kind" attribute value of this Unit. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Unit::unsetExponent Unsets the "exponent" attribute value of this Unit. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Unit::unsetScale Unsets the "scale" attribute value of this Unit. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item Unit::unsetMultiplier Unsets the "multipler" attribute value of this Unit. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item Unit::unsetOffset Unsets the "offset" attribute value of this Unit. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_unit_offset_only_l2v1 =item Unit::getTypeCode Returns the libSBML type code of this object instance. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_UNIT SBML_UNIT@endlink (default). C doc_warning_typecodes_not_unique @see getPackageName() @see getElementName() =item Unit::getElementName Returns the XML element name of this object, which for Unit, is always C<"unit">. @return the name of this element, i.e., C<"unit">. =item Unit::writeElements @internal =item Unit::isBuiltIn Predicate to test whether a given string is the name of a built-in SBML unit, depending on the SBML level, since new predefined units were added between level 2 versions 1 and 2, and then all predefined units were removed again in SBML Level 3. @param name a string to be tested against the built-in unit names. @param level the level of SBML one is checking. @return C if C is one of C<"substance">, C<"volume">, or C<"time"> and the C is C<1>; or if C is one of C<"substance">, C<"volume">, C<"area">, C<"length">, or C<"time"> and the C is C<2>; C otherwise (including all values when C is C<3>). C doc_note_static_methods =item Unit::isUnitKind Predicate to test whether a given string is the name of a valid base unit in SBML (such as C<"gram"> or C<"mole">). This method exists because prior to SBML Level 2 Version 3, an enumeration called C was defined by SBML. This enumeration was removed in SBML Level 2 Version 3 and its values were folded into the space of values of a type called C. This method therefore has less significance in SBML Level 2 Version 3 and Level 2 Version 4, but remains for backward compatibility and support for reading models in older Versions of Level 2. @param name a string to be tested. @param level an unsigned int representing the SBML specification Level. @param version an unsigned int representing the SBML specification Version. @return C if name is a valid SBML UnitKind, C otherwise. @note The allowed unit names differ between SBML Levels 1 and 2 and again slightly between Level 2 Versions 1 and 2. C doc_note_static_methods =item Unit::areIdentical Predicate returning C if two Unit objects are identical. Two Unit objects are considered to be I if they match in all attributes. (Contrast this to the method areEquivalent(@if java Unit u1, Unit u2@endif), which compares Unit objects only with respect to certain attributes.) @param unit1 the first Unit object to compare. @param unit2 the second Unit object to compare. @return C if all the attributes of unit1 are identical to the attributes of unit2, C otherwise. C doc_note_static_methods @see @if clike areEquivalent() @else Unit::areEquivalent(Unit u1, Unit u2) @endif@~ =item Unit::areEquivalent Predicate returning C if Unit objects are equivalent. Two Unit objects are considered to be I either if (1) both have a "kind" attribute value of C, or (2) their "kind", "exponent" and (for SBML Level 2 Version 1) "offset" attribute values are equal. (Contrast this to the method areIdentical(@if java Unit, Unit@endif), which compares Unit objects with respect to all attributes, not just the "kind" and "exponent".) @param unit1 the first Unit object to compare. @param unit2 the second Unit object to compare. @return C if the "kind" and "exponent" attributes of unit1 are identical to the kind and exponent attributes of unit2, or if the kind attributes of both are C; C otherwise. C doc_note_static_methods @see @if clike areIdentical() @else Unit::areIdentical(Unit u1, Unit u2) @endif@~ =item Unit::removeScale Manipulates the attributes of the Unit to express the unit with the value of the scale attribute reduced to zero. For example, 1 millimetre can be expressed as a Unit with kind= C<"metre"> multiplier=C<"1"> scale=C<"-3"> exponent=C<"1">. It can also be expressed as a Unit with kind=C<"metre"> multiplier=C<"0.001"> scale=C<"0"> exponent=C<"1">. @param unit the Unit object to manipulate. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink C doc_note_static_methods @see @if clike convertToSI() @else Unit::convertToSI(Unit u) @endif@~ @see @if clike merge() @else Unit::merge(Unit u1, Unit u2) @endif@~ =item Unit::merge Merges two Unit objects with the same "kind" attribute value into a single Unit. For example, the following, @verbatim @endverbatim would be merged to become @verbatim @endverbatim @param unit1 the first Unit object; the result of the operation is left as a new version of this unit, modified in-place. Not modified if the two units have different kinds. @param unit2 the second Unit object to merge with the first. C doc_note_static_methods @see @if clike convertToSI() @else Unit::convertToSI(Unit u) @endif@~ @see @if clike removeScale() @else Unit::removeScale(Unit u) @endif@~ =item Unit::convertToSI Returns a UnitDefinition object containing the given C converted to the appropriate SI unit. This method exists because some units can be expressed in terms of others when the same physical dimension is involved. For example, one hertz is identical to 1 sec-1, one litre is equivalent to 1 cubic decametre, and so on. @param unit the Unit object to convert to SI. @return a UnitDefinition object containing the SI unit. C doc_note_static_methods @see @if clike merge() @else Unit::merge(Unit u1, Unit u2) @endif@~ =item Unit::hasRequiredAttributes Predicate returning C if all the required attributes for this Unit object have been set. The required attributes for a Unit object are: @li "kind" @li "exponent" (required in SBML Level 3; optional in Level 2) @li "multiplier" (required in SBML Level 3; optional in Level 2) @li "scale" (required in SBML Level 3; optional in Level 2) @return C if the required attributes have been set, C otherwise. =item Unit::setExponentUnitChecking @internal =item Unit::getExponentUnitChecking @internal =item Unit::getExponentUnitChecking @internal =item Unit::isUnitChecking @internal =item Unit::isUnitChecking @internal =item Unit::addExpectedAttributes @internal =item Unit::readAttributes @internal =item Unit::readL1Attributes @internal =item Unit::readL2Attributes @internal =item Unit::readL3Attributes @internal =item Unit::writeAttributes @internal =item Unit::isL1UnitKind @internal =item Unit::isL2V1UnitKind @internal =item Unit::isL2UnitKind @internal =item Unit::isL3UnitKind @internal =item Unit::isExplicitlySetExponent @internal =item Unit::isExplicitlySetMultiplier @internal =item Unit::isExplicitlySetScale @internal =item Unit::isExplicitlySetOffset @internal =item ListOfUnits::ListOfUnits Creates a new ListOfUnits object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfUnits::ListOfUnits Creates a new ListOfUnits object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfUnits object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfUnits::clone Creates and returns a deep copy of this ListOfUnits object. @return the (deep) copy of this ListOfUnits object. =item ListOfUnits::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., Unit objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for objects contained in this list: @link SBMLTypeCode_t#SBML_UNIT SBML_UNIT@endlink (default). @see getElementName() @see getPackageName() =item ListOfUnits::getElementName Returns the XML element name of this object. For ListOfUnits, the XML element name is C<"listOfUnits">. @return the name of this element, i.e., C<"listOfUnits">. =item ListOfUnits::get Get a Unit from the ListOfUnits. @param n the index number of the Unit to get. @return the nth Unit in this ListOfUnits. If the index C is invalid, C is returned. @see size() =item ListOfUnits::get Get a Unit from the ListOfUnits. @param n the index number of the Unit to get. @return the nth Unit in this ListOfUnits. If the index C is invalid, C is returned. @see size() =item ListOfUnits::remove Removes the nth item from this ListOfUnits items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfUnits::getElementPosition @internal =item ListOfUnits::createObject @internal =back =head2 UnitDefinition @sbmlpackage{core} @htmlinclude pkg-marker-core.html A definition of a unit used in an SBML model. Units of measurement may be supplied in a number of contexts in an SBML model. The SBML unit definition facility uses two classes of objects, UnitDefinition and Unit. The approach to defining units in SBML is compositional; for example, meter second –2 is constructed by combining a Unit object representing meter with another Unit object representing second –2. The combination is wrapped inside a UnitDefinition, which provides for assigning an identifier and optional name to the combination. The identifier can then be referenced from elsewhere in a model. Thus, the UnitDefinition class is the container, and Unit instances are placed inside UnitDefinition instances. Two points are worth discussing in the context of SBML units. First, unit declarations in SBML models are I. The consequence of this is that a model must be numerically self-consistent independently of unit declarations, for the benefit of software tools that cannot interpret or manipulate units. Unit declarations in SBML are thus more akin to a type of annotation; they can indicate intentions, and can be used by model readers for checking the consistency of the model, labeling simulation output, etc., but any transformations of values implied by different units must be incorporated I into a model. Second, the vast majority of situations that require new SBML unit definitions involve simple multiplicative combinations of base units and factors. An example is moles per litre per second. What distinguishes these sorts of unit definitions from more complex ones is that they may be expressed without the use of an additive offset from a zero point. The use of offsets complicates all unit definition systems, yet in the domain of SBML, the real-life cases requiring offsets are few (and in fact, to the best of our knowledge, only involve temperature). Consequently, the SBML unit system has been consciously designed to simplify implementation of unit support for the most common cases in systems biology. The cost of this simplification is to require units with offsets to be handled explicitly by the modeler. @section unitdef-summary Summary of the UnitDefinition construct UnitDefinition has two attributes and one subelement. The two attributes are "id" and "name", and the subelement is ListOfUnits. The required attribute "id" and optional attribute "name" are both strings. The "id" attribute is used to give the defined unit a unique identifier by which other parts of an SBML model definition can refer to it. The "name" attribute is intended to be used for giving the unit definition an optional human-readable name. Please see the next section for information about the values permitted for "id". A UnitDefinition may contain exactly one ListOfUnits, and this list may contain one or more Unit definitions; see the definitions of these other object classes for more information about them. In SBML Level 2 and SBML Level 3 Version 1, if the ListOfUnits was present, it must have one or more Unit definitions. In SBML Level 3 Version 2, this restriction was relaxed, and a ListOfUnits was allowed to be empty. In either case, if a UnitDefinition had no child Unit elements, the unit was considered to be undefined. The following example illustrates a complete unit definition (when written in XML) when all the pieces are combined together. This defines "mmls" to be millimoles per litre per second. @verbatim @endverbatim @section unitdef-id Special considerations for Unit object identifiers The attribute "id" in UnitDefinition cannot be given simply any value, and the precise details of the values permitted differ slightly between Levels of SBML: \n=over\n \n=item\n\nThe "id" of a UnitDefinition must I contain a value from the list of SBML's predefined base unit names (i.e., the strings C, C, etc.). In SBML Level 3, this list consists of the following: C doc_base_units This list of predefined base units is nearly identical in SBML Level 2 Version 4, the exception being that Level 2 does not define C. SBML Level 2 Version 1 (and I this Level+Version combination) provides an additional predefined unit name, C, not available in Level 3. Finally, SBML Level 1 Versions 2–3 provide two more additional predefined unit names, C and C. This is explained in somewhat greater detail in the description of the Unit class. \n=over\n \n=item\n\nIn SBML Level 2 (all Versions), there is an additional set of reserved identifiers: C, C, C, C, and C
  • (For SBML Level 3 Version 2 only) In the case of an object from an SBML Level 3 package, an InitialAssignment sets the referenced object's initial value (however such values are defined by the package) to the value of the formula in math. The unit of measurement associated with the value produced by the formula should be the same as that object's units attribute value (if it has such an attribute), or be equal to the units of model components of that type (if objects of that class are defined by the package as having the same units). \n=back\n If the symbol attribute of an InitialAssignment object references an object in an SBML namespace that is not understood by the interpreter reading a given SBML document (that is, if the object is defined by an SBML Level 3 package that the software does not support), the assignment must be ignored--the object's initial value will not need to be set, as the interpreter could not understand that package. If an interpreter cannot establish whether a referenced object is missing from the model or instead is defined in an SBML namespace not understood by the interpreter, it may produce a warning to the user. (The latter situation may only arise if an SBML package is present in the SBML document with a package:required attribute of "true".) In the context of a simulation, initial assignments establish values that are in effect prior to and including the start of simulation time, i.e., t \f$\leq\f$ 0. Section 3.4.8 in the SBML Level 2 Version 4 and SBML Level 3 specifications provides information about the interpretation of assignments, rules, and entity values for simulation time up to and including the start time t = 0; this is important for establishing the initial conditions of a simulation if the model involves expressions containing the delay "csymbol". There cannot be two initial assignments for the same symbol in a model; that is, a model must not contain two or more InitialAssignment objects that both have the same identifier as their "symbol" attribute value. A model must also not define initial assignments and assignment rules for the same entity. That is, there cannot be both an InitialAssignment and an AssignmentRule for the same symbol in a model, because both kinds of constructs apply prior to and at the start of simulated time---allowing both to exist for a given symbol would result in indeterminism). The ordering of InitialAssignment objects is not significant. The combined set of InitialAssignment, AssignmentRule and KineticLaw objects form a set of assignment statements that must be considered as a whole. The combined set of assignment statements should not contain algebraic loops: a chain of dependency between these statements should terminate. (More formally, consider the directed graph of assignment statements where nodes are a model's assignment statements and directed arcs exist for each occurrence of a symbol in an assignment statement "math" attribute. The directed arcs in this graph start from the statement assigning the symbol and end at the statement that contains the symbol in their math elements. Such a graph must be acyclic.) Finally, it is worth being explicit about the expected behavior in the following situation. Suppose (1) a given symbol has a value x assigned to it in its definition, and (2) there is an initial assignment having the identifier as its "symbol" value and reassigning the value to y, and (3) the identifier is also used in the mathematical formula of a second initial assignment. What value should the second initial assignment use? It is y, the value assigned to the symbol by the first initial assignment, not whatever value was given in the symbol's definition. This follows directly from the behavior described above: if an InitialAssignment object exists for a given symbol, then the symbol's value is overridden by that initial assignment. =over =back =head2 ListOfInitialAssignments @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of InitialAssignment objects. C doc_what_is_listof =over =item InitialAssignment::InitialAssignment Creates a new InitialAssignment using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this InitialAssignment. @param version an unsigned int, the SBML Version to assign to this InitialAssignment. C doc_throw_exception_lv C doc_note_setting_lv =item InitialAssignment::InitialAssignment Creates a new InitialAssignment using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item InitialAssignment::InitialAssignment Copy constructor; creates a copy of this InitialAssignment. @param orig the object to copy. =item InitialAssignment::accept @internal =item InitialAssignment::clone Creates and returns a deep copy of this InitialAssignment object. @return the (deep) copy of this InitialAssignment object. =item InitialAssignment::getSymbol Get the value of the "symbol" attribute of this InitialAssignment. @return the identifier string stored as the "symbol" attribute value in this InitialAssignment. =item InitialAssignment::getMath Get the mathematical formula of this InitialAssignment. @return an ASTNode, the value of the "math" subelement of this InitialAssignment, or C if the math is not set. =item InitialAssignment::isSetSymbol Predicate returning C if this InitialAssignment's "symbol" attribute is set. @return C if the "symbol" attribute of this InitialAssignment is set, C otherwise. =item InitialAssignment::isSetMath Predicate returning C if this InitialAssignment's "math" subelement contains a value. @return C if the "math" for this InitialAssignment is set, C otherwise. =item InitialAssignment::setSymbol Sets the "symbol" attribute value of this InitialAssignment. @param sid the identifier of an element defined in this model whose value can be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item InitialAssignment::unsetSymbol Unsets the "symbol" attribute value of this InitialAssignment. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item InitialAssignment::setMath Sets the "math" subelement of this InitialAssignment. The AST passed in C is copied. @param math an AST containing the mathematical expression to be used as the formula for this InitialAssignment. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item InitialAssignment::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this InitialAssignment. C doc_initialassignment_units C doc_note_unit_inference_depends_on_model C doc_warning_initialassignment_math_literals @return a UnitDefinition that expresses the units of the math expression of this InitialAssignment, or C if one cannot be constructed. @see containsUndeclaredUnits() =item InitialAssignment::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this InitialAssignment. C doc_initialassignment_units C doc_note_unit_inference_depends_on_model C doc_warning_initialassignment_math_literals @return a UnitDefinition that expresses the units of the math expression of this InitialAssignment, or C if one cannot be constructed. @see containsUndeclaredUnits() =item InitialAssignment::containsUndeclaredUnits Predicate returning C if the math expression of this InitialAssignment contains parameters/numbers with undeclared units. @return C if the math expression of this InitialAssignment includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by InitialAssignment::getDerivedUnitDefinition may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item InitialAssignment::containsUndeclaredUnits Predicate returning C if the math expression of this InitialAssignment contains parameters/numbers with undeclared units. @return C if the math expression of this InitialAssignment includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by InitialAssignment::getDerivedUnitDefinition may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item InitialAssignment::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_INITIAL_ASSIGNMENT SBML_INITIAL_ASSIGNMENT@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item InitialAssignment::getElementName Returns the XML element name of this object, which for InitialAssignment, is always C<"initialAssignment">. @return the name of this element, i.e., C<"initialAssignment">. =item InitialAssignment::writeElements @internal =item InitialAssignment::hasRequiredAttributes Predicate returning C if all the required attributes for this InitialAssignment object have been set. The required attributes for an InitialAssignment object are: @li "symbol" @return C if the required attributes have been set, C otherwise. =item InitialAssignment::hasRequiredElements Predicate returning C if all the required elements for this InitialAssignment object have been set. @note The required elements for a InitialAssignment object are: @li "math" inSBML Level 2 and Level 3 Version 1. (In SBML Level 3 Version 2+, it is no longer required.) @return a boolean value indicating whether all the required elements for this object have been defined. =item InitialAssignment::getId Returns the value of the "symbol" attribute of this InitialAssignment (NOT the "id"). @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() or InitialAssignment::getSymbol() functions instead. The "symbol" attribute of an InitialAssignment indicates the element which the results of the "math" are to be applied. @return the symbol of this InitialAssignment. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() @see getSymbol() =item InitialAssignment::renameSIdRefs C doc_renamesidref_common =item InitialAssignment::renameUnitSIdRefs C doc_renameunitsidref_common =item InitialAssignment::replaceSIDWithFunction @internal =item InitialAssignment::divideAssignmentsToSIdByFunction @internal =item InitialAssignment::multiplyAssignmentsToSIdByFunction @internal =item InitialAssignment::readOtherXML @internal =item InitialAssignment::addExpectedAttributes @internal =item InitialAssignment::readAttributes @internal =item InitialAssignment::readL2Attributes @internal =item InitialAssignment::readL3Attributes @internal =item InitialAssignment::writeAttributes @internal =item ListOfInitialAssignments::ListOfInitialAssignments Creates a new ListOfInitialAssignments object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfInitialAssignments::ListOfInitialAssignments Creates a new ListOfInitialAssignments object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfInitialAssignments object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfInitialAssignments::clone Creates and returns a deep copy of this ListOfInitialAssignments object. @return the (deep) copy of this ListOfInitialAssignments object. =item ListOfInitialAssignments::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., InitialAssignment objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for the objects contained in this ListOf: @link SBMLTypeCode_t#SBML_INITIAL_ASSIGNMENT SBML_INITIAL_ASSIGNMENT@endlink (default). @see getElementName() @see getPackageName() =item ListOfInitialAssignments::getElementName Returns the XML element name of this object. For ListOfInitialAssignments, the XML element name is C<"listOfInitialAssignments">. @return the name of this element, i.e., C<"listOfInitialAssignments">. =item ListOfInitialAssignments::get Get a InitialAssignment from the ListOfInitialAssignments. @param n the index number of the InitialAssignment to get. @return the nth InitialAssignment in this ListOfInitialAssignments. If the index C is invalid, C is returned. @see size() =item ListOfInitialAssignments::get Get a InitialAssignment from the ListOfInitialAssignments. @param n the index number of the InitialAssignment to get. @return the nth InitialAssignment in this ListOfInitialAssignments. If the index C is invalid, C is returned. @see size() =item ListOfInitialAssignments::get Get a InitialAssignment from the ListOfInitialAssignments based on its identifier. @param sid a string representing the identifier of the InitialAssignment to get. @return InitialAssignment in this ListOfInitialAssignments with the given C or C if no such InitialAssignment exists. @see get(unsigned int n) @see size() =item ListOfInitialAssignments::get Get a InitialAssignment from the ListOfInitialAssignments based on its identifier. @param sid a string representing the identifier of the InitialAssignment to get. @return InitialAssignment in this ListOfInitialAssignments with the given C or C if no such InitialAssignment exists. @see get(unsigned int n) @see size() =item ListOfInitialAssignments::remove Removes the nth item from this ListOfInitialAssignments items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfInitialAssignments::remove Removes item in this ListOfInitialAssignments items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then C is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfInitialAssignments::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. Note that InitialAssignments do not actually have IDs, though the libsbml interface pretends that they do: no initial assignment is returned by this function. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item ListOfInitialAssignments::getElementPosition @internal =item ListOfInitialAssignments::createObject @internal =back =head2 Rule @sbmlpackage{core} @htmlinclude pkg-marker-core.html Parent class for SBML rules in libSBML. In SBML, I provide additional ways to define the values of variables in a model, their relationships, and the dynamical behaviors of those variables. They enable encoding relationships that cannot be expressed using Reaction nor InitialAssignment objects alone. The libSBML implementation of rules mirrors the SBML Level 3 definition (which is in turn is very similar to the Level 2 Version 4 definition), with Rule being the parent class of three subclasses as explained below. The Rule class itself cannot be instantiated by user programs and has no constructor; only the subclasses AssignmentRule, AlgebraicRule and RateRule can be instantiated directly. C doc_rules_general_summary =over =back =head2 ListOfRules @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of Rule objects. C doc_what_is_listof =over =item Rule::Rule Copy constructor; creates a copy of this Rule. @param orig the object to copy. =item Rule::accept @internal =item Rule::clone Creates and returns a deep copy of this Rule object. @return the (deep) copy of this Rule object. =item Rule::getFormula Returns the mathematical expression of this Rule in text-string form. The text string is produced by @sbmlfunction{formulaToString, ASTNode}; please consult the documentation for that function to find out more about the format of the text-string formula. @return the formula text string for this Rule. @note The attribute "formula" is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named "math". However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see getMath() @see @sbmlfunction{formulaToL3String, ASTNode} =item Rule::getMath Get the mathematical formula of this Rule as an ASTNode tree. @return an ASTNode, the value of the "math" subelement of this Rule, or C if the math is not set. @note The subelement "math" is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named "formula". LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see getFormula() =item Rule::getVariable Get the value of the "variable" attribute of this Rule object. C doc_rule_level_1 The "variable" attribute of a Rule indicates the element which the results of the "math" are to be applied. An AlgebraicRule has no "variable", and will always return an empty string. @return the identifier string stored as the "variable" attribute value in this Rule, or C if this object is an AlgebraicRule object, or if the attribute is unset. =item Rule::getUnits Returns the units for the mathematical formula of this Rule. @return the identifier of the units for the expression of this Rule. @note The attribute "units" exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3. =item Rule::isSetFormula Predicate returning C if this Rule's mathematical expression is set. This method is equivalent to isSetMath(). This version is present for easier compatibility with SBML Level 1, in which mathematical formulas were written in text-string form. @return C if the mathematical formula for this Rule is set, C otherwise. @note The attribute "formula" is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named "math". However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see isSetMath() =item Rule::isSetMath Predicate returning C if this Rule's mathematical expression is set. This method is equivalent to isSetFormula(). @return C if the formula (or equivalently the math) for this Rule is set, C otherwise. @note The subelement "math" is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named "formula". LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see isSetFormula() =item Rule::isSetVariable Predicate returning C if this Rule's "variable" attribute is set. C doc_rule_level_1 @return C if the "variable" attribute value of this Rule is set, C otherwise. =item Rule::isSetUnits Predicate returning C if this Rule's "units" attribute is set. @return C if the units for this Rule is set, C otherwise. @note The attribute "units" exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3. =item Rule::setFormula Sets the "math" subelement of this Rule to an expression in text-string form. This is equivalent to setMath(const ASTNode math). The provision of using text-string formulas is retained for easier SBML Level 1 compatibility. The formula is converted to an ASTNode internally. @param formula a mathematical formula in text-string form. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note The attribute "formula" is specific to SBML Level 1; in higher Levels of SBML, it has been replaced with a subelement named "math". However, libSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see setMath(const ASTNode math) =item Rule::setMath Sets the "math" subelement of this Rule to a copy of the given ASTNode. @param math the AST structure of the mathematical formula. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note The subelement "math" is present in SBML Levels 2 and 3. In SBML Level 1, the equivalent construct is the attribute named "formula". LibSBML provides a unified interface to the underlying math expression and this method can be used for models of all Levels of SBML. @see setFormula(const std::string& formula) =item Rule::setVariable Sets the "variable" attribute value of this Rule object. C doc_rule_level_1 @param sid the identifier of a Compartment, Species or Parameter elsewhere in the enclosing Model object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item Rule::setUnits Sets the units for this Rule. @param sname the identifier of the units. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "units" exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3. =item Rule::unsetVariable Unsets the value of the "variable" attribute of this Rule object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @see setVariable(const std::string& sid) @see isSetVariable() @see getVariable() =item Rule::unsetUnits Unsets the "units" for this Rule. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "units" exists on SBML Level 1 ParameterRule objects only. It is not present in SBML Levels 2 and 3. =item Rule::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this Rule. C doc_rule_units C doc_note_unit_inference_depends_on_model C doc_warning_rule_math_literals @return a UnitDefinition that expresses the units of the math expression of this Rule, or C if one cannot be constructed. @see containsUndeclaredUnits() =item Rule::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this Rule. C doc_rule_units C doc_note_unit_inference_depends_on_model C doc_warning_rule_math_literals @return a UnitDefinition that expresses the units of the math expression of this Rule, or C if one cannot be constructed. @see containsUndeclaredUnits() =item Rule::containsUndeclaredUnits Predicate returning C if the math expression of this Rule contains parameters/numbers with undeclared units. @return C if the math expression of this Rule includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item Rule::containsUndeclaredUnits Predicate returning C if the math expression of this Rule contains parameters/numbers with undeclared units. @return C if the math expression of this Rule includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item Rule::getType Returns a code representing the type of rule this is. @return the rule type, which will be one of the following three possible values: @li @link RuleType_t#RULE_TYPE_RATE RULE_TYPE_RATE@endlink @li @link RuleType_t#RULE_TYPE_SCALAR RULE_TYPE_SCALAR@endlink @li @link RuleType_t#RULE_TYPE_INVALID RULE_TYPE_INVALID@endlink @note The attribute "type" on Rule objects is present only in SBML Level 1. In SBML Level 2 and later, the type has been replaced by subclassing the Rule object. =item Rule::isAlgebraic Predicate returning C if this Rule is an AlgebraicRule. @return C if this Rule is an AlgebraicRule, C otherwise. =item Rule::isAssignment Predicate returning C if this Rule is an AssignmentRule. @return C if this Rule is an AssignmentRule, C otherwise. =item Rule::isCompartmentVolume Predicate returning C if this Rule is an CompartmentVolumeRule or equivalent. This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit CompartmentVolumeRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns C if the symbol is the identifier of a Compartment object defined in the model. @return C if this Rule is a CompartmentVolumeRule, C otherwise. =item Rule::isParameter Predicate returning C if this Rule is an ParameterRule or equivalent. This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit ParameterRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns C if the symbol is the identifier of a Parameter object defined in the model. @return C if this Rule is a ParameterRule, C otherwise. =item Rule::isRate Predicate returning C if this Rule is a RateRule (SBML Levels 2–3) or has a "type" attribute value of C<"rate"> (SBML Level 1). @return C if this Rule is a RateRule (Level 2) or has type "rate" (Level 1), C otherwise. =item Rule::isScalar Predicate returning C if this Rule is an AssignmentRule (SBML Levels 2–3) or has a "type" attribute value of C<"scalar"> (SBML Level 1). @return C if this Rule is an AssignmentRule (Level 2) or has type "scalar" (Level 1), C otherwise. =item Rule::isSpeciesConcentration Predicate returning C if this Rule is a SpeciesConcentrationRule or equivalent. This libSBML method works for SBML Level 1 models (where there is such a thing as an explicit SpeciesConcentrationRule), as well as other Levels of SBML. For Levels above Level 1, this method checks the symbol being affected by the rule, and returns C if the symbol is the identifier of a Species object defined in the model. @return C if this Rule is a SpeciesConcentrationRule, C otherwise. =item Rule::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object, either @link SBMLTypeCode_t#SBML_ASSIGNMENT_RULE SBML_ASSIGNMENT_RULE@endlink, @link SBMLTypeCode_t#SBML_RATE_RULE SBML_RATE_RULE@endlink, or @link SBMLTypeCode_t#SBML_ALGEBRAIC_RULE SBML_ALGEBRAIC_RULE@endlink for SBML Core. C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Rule::getL1TypeCode Returns the SBML Level 1 type code for this Rule object. This method only applies to SBML Level 1 model objects. If this is not an SBML Level 1 rule object, this method will return @link SBMLTypeCode_t#SBML_UNKNOWN SBML_UNKNOWN@endlink. @return the SBML Level 1 type code for this Rule (namely, @link SBMLTypeCode_t#SBML_COMPARTMENT_VOLUME_RULE SBML_COMPARTMENT_VOLUME_RULE@endlink, @link SBMLTypeCode_t#SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, @link SBMLTypeCode_t#SBML_SPECIES_CONCENTRATION_RULE SBML_SPECIES_CONCENTRATION_RULE@endlink, or @link SBMLTypeCode_t#SBML_UNKNOWN SBML_UNKNOWN@endlink). =item Rule::getElementName Returns the XML element name of this object. The returned value can be any of a number of different strings, depending on the SBML Level in use and the kind of Rule object this is. The rules as of libSBML version @htmlinclude libsbml-version.html are the following: \n=over\n \n=item\n\n(Level 2 and 3) RateRule: returns C<"rateRule"> \n=item\n\n(Level 2 and 3) AssignmentRule: returns C<"assignmentRule"> \n=item\n\n(Level 2 and 3) AlgebraicRule: returns C<"algebraicRule"> \n=item\n\n(Level 1 Version 1) SpecieConcentrationRule: returns C<"specieConcentrationRule"> \n=item\n\n(Level 1 Version 2) SpeciesConcentrationRule: returns C<"speciesConcentrationRule"> \n=item\n\n(Level 1) CompartmentVolumeRule: returns C<"compartmentVolumeRule"> \n=item\n\n(Level 1) ParameterRule: returns C<"parameterRule"> \n=item\n\nUnknown rule type: returns C<"unknownRule"> \n=back\n Beware that the last (C<"unknownRule">) is not a valid SBML element name. @return the name of this element. =item Rule::writeElements @internal =item Rule::setL1TypeCode Sets the SBML Level 1 type code for this Rule. @param type the SBML Level 1 type code for this Rule. The allowable values are @link SBMLTypeCode_t#SBML_COMPARTMENT_VOLUME_RULE SBML_COMPARTMENT_VOLUME_RULE@endlink, @link SBMLTypeCode_t#SBML_PARAMETER_RULE SBML_PARAMETER_RULE@endlink, and @link SBMLTypeCode_t#SBML_SPECIES_CONCENTRATION_RULE SBML_SPECIES_CONCENTRATION_RULE@endlink. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink if given C value is not one of the above. =item Rule::hasRequiredElements Predicate returning C if all the required elements for this Rule object have been set. The only required element for a Rule object is the "math" subelement in SBML Level 2 and Level 3 Version 1. In SBML Level 3 Version 2+, it is no longer required. @return a boolean value indicating whether all the required elements for this object have been defined. =item Rule::hasRequiredAttributes Predicate returning C if all the required attributes for this Rule object have been set. The required attributes for a Rule object depend on the type of Rule it is. For AssignmentRule and RateRule objects (and SBML Level 1's SpeciesConcentrationRule, CompartmentVolumeRule, and ParameterRule objects), the required attribute is "variable"; for AlgebraicRule objects, there is no required attribute. @return C if the required attributes have been set, C otherwise. =item Rule::renameSIdRefs C doc_renamesidref_common =item Rule::renameUnitSIdRefs C doc_renameunitsidref_common =item Rule::getInternalId @internal =item Rule::setInternalId @internal =item Rule::getId Returns the value of the "variable" attribute of this Rule (NOT the "id"). @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() or the getVariable() function instead. The "variable" attribute of a Rule indicates the element which the results of the "math" are to be applied. An AlgebraicRule has no "variable", and will always return an empty string. @return the variable of this Rule. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() @see getVariable() =item Rule::replaceSIDWithFunction @internal =item Rule::divideAssignmentsToSIdByFunction @internal =item Rule::multiplyAssignmentsToSIdByFunction @internal =item Rule::Rule @internal =item Rule::Rule @internal =item Rule::readOtherXML @internal =item Rule::addExpectedAttributes @internal =item Rule::readAttributes @internal =item Rule::readL1Attributes @internal =item Rule::readL2Attributes @internal =item Rule::readL3Attributes @internal =item Rule::writeAttributes @internal =item ListOfRules::ListOfRules Creates a new ListOfRules object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfRules::ListOfRules Creates a new ListOfRules object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfRules object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfRules::clone Creates and returns a deep copy of this ListOfRules object. @return the (deep) copy of this ListOfRules object. =item ListOfRules::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., Rule objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for objects contained in this list: @link SBMLTypeCode_t#SBML_RULE SBML_RULE@endlink (default). @see getElementName() @see getPackageName() =item ListOfRules::getElementName Returns the XML element name of this object. For ListOfRules, the XML element name is C<"listOfRules">. @return the name of this element, i.e., C<"listOfRules">. =item ListOfRules::get Get a Rule from the ListOfRules. @param n the index number of the Rule to get. @return the nth Rule in this ListOfRules. If the index C is invalid, C is returned. @see size() =item ListOfRules::get Get a Rule from the ListOfRules. @param n the index number of the Rule to get. @return the nth Rule in this ListOfRules. If the index C is invalid, C is returned. @see size() =item ListOfRules::get Get a Rule from the ListOfRules based on its identifier. @param sid a string representing the identifier of the Rule to get. @return Rule in this ListOfRules with the given C or C if no such Rule exists. @see get(unsigned int n) @see size() =item ListOfRules::get Get a Rule from the ListOfRules based on its identifier. @param sid a string representing the identifier of the Rule to get. @return Rule in this ListOfRules with the given C or C if no such Rule exists. @see get(unsigned int n) @see size() =item ListOfRules::remove Removes the nth item from this ListOfRules items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfRules::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. Note that AssignmentRules and RateRules do not actually have IDs, but the libsbml interface pretends that they do: no assignment rule or rate rule is returned by this function. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item ListOfRules::remove Removes item in this ListOfRules items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then C is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfRules::getElementPosition @internal =item ListOfRules::createObject @internal =item ListOfRules::isValidTypeForList @internal =back =head2 AlgebraicRule @sbmlpackage{core} @htmlinclude pkg-marker-core.html An SBML algebraic rule representing 0 = f(B). The rule type AlgebraicRule is derived from the parent class Rule. It is used to express equations that are neither assignments of model variables nor rates of change. AlgebraicRule does not add any attributes to the basic Rule; its role is simply to distinguish this case from the other cases. In the context of a simulation, algebraic rules are in effect at all times, t \f$\geq\f$ 0. For purposes of evaluating expressions that involve the delay "csymbol" (see the SBML specification), algebraic rules are considered to apply also at t \f$\leq\f$ 0. Please consult the relevant SBML specification for additional information about the semantics of assignments, rules, and entity values for simulation time t \f$\leq\f$ 0. An SBML model must not be overdetermined. The ability to define arbitrary algebraic expressions in an SBML model introduces the possibility that a model is mathematically overdetermined by the overall system of equations constructed from its rules, reactions and events. Therefore, if an algebraic rule is introduced in a model, for at least one of the entities referenced in the rule's "math" element the value of that entity must not be completely determined by other constructs in the model. This means that at least this entity must not have the attribute "constant"=C and there must also not be a rate rule or assignment rule for it. Furthermore, if the entity is a Species object, its value must not be determined by reactions, which means that it must either have the attribute "boundaryCondition"=C or else not be involved in any reaction at all. These restrictions are explained in more detail in the SBML specification documents. In SBML Levels 2 and 3, Reaction object identifiers can be referenced in the "math" expression of an algebraic rule, but reaction rates can never be determined by algebraic rules. This is true even when a reaction does not contain a KineticLaw @if conly structure @else object@endif. (In such cases of missing kinetic law definitions, the model is valid but incomplete; the rates of reactions lacking kinetic laws are simply undefined, and not determined by the algebraic rule.) In SBML Level 2 and Level 3 Version 1, the "math" subelement of the AlgebraicRule is required. In SBML Level 3 Version 2, this rule is relaxed, and the subelement is optional. If an AlgebraicRule with no "math" child is present in the model, no additional mathematical constraints on the model are added by the rule. This may represent a situation where the model itself is unfinished, or the missing information may be provided by an SBML Level 3 package. Finally, any symbol that appears as the target of a rateOf csymbol (@link ASTNodeType_t#AST_FUNCTION_RATE_OF AST_FUNCTION_RATE_OF@endlink, introduced in SBML Level 3 Version 2) may not be determined by an AlgebraicRule. This is because the rateOf csymbol is defined as applying only to symbols whose rates of change are easily determinable. Users should note that these rules about what symbols may not be determined by an AlgebraicRule may be used to discover what symbol is being determined by an AlgebraicRule. If three symbols appear in the math element of an AlgebraicRule, the first of which is flagged constant=C, and the second of which appears as the target of a rateOf csymbol, one may conclude that the AlgebraicRule must be used to determine the value of the third symbol. This is, in fact, a principle use (outside of validation) of the constant attribute: its use in allowing software to properly identify the dependent variable in an AlgebraicRule. C doc_rules_general_summary =over =item AlgebraicRule::AlgebraicRule Creates a new AlgebraicRule object using the given SBML C and @p version values. @param level the SBML Level to assign to this AlgebraicRule object. @param version the SBML Version to assign to this AlgebraicRule object. C doc_throw_exception_lv C doc_note_setting_lv =item AlgebraicRule::AlgebraicRule Creates a new AlgebraicRule object using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item AlgebraicRule::clone Creates and returns a deep copy of this AlgebraicRule object. @return the (deep) copy of this Rule object. =item AlgebraicRule::accept @internal =item AlgebraicRule::setInternalIdOnly @internal =item AlgebraicRule::getInternalIdOnly @internal =item AlgebraicRule::hasRequiredAttributes Predicate returning C if all the required attributes for this AlgebraicRule object have been set. In SBML Levels 2–3, there is no required attribute for an AlgebraicRule object. For Level 1, the only required attribute is "formula". @return C if the required attributes have been set, C otherwise. =back =head2 AssignmentRule @sbmlpackage{core} @htmlinclude pkg-marker-core.html An SBML assignment rule representing x = f(B). The rule type AssignmentRule is derived from the parent class Rule. It is used to express equations that set the values of variables. The left-hand side (the attribute named "variable") of an assignment rule must refer to the identifier of a Species, SpeciesReference (in SBML Level 3), Compartment, or global Parameter @if conly structure @else object@endif@~ in the model (but not a Reaction). In SBML Level 3 Version 2, it may also refer to the SId of an element defined in an SBML Level 3 package with mathematical meaning and the ability to be assigned. The entity identified must have its "constant" attribute set to C. The effects of an assignment rule construct are in general terms the same, but differ in the precise details depending on the type of SBML component being set: \n=over\n \n=item\n\nIn the case of a species, an SBML assignment rule sets the referenced species' quantity (whether a "concentration" or "amount") to the value determined by the formula in the MathML subelement "math". The unit associated with the value produced by the "math" formula @em should (in SBML Level 2 Version 4 and in SBML Level 3) or I (in SBML releases prior to Level 2 version 4) be equal to the unit associated with the species' quantity. Restrictions: There must not be both an AssignmentRule "variable" attribute and a SpeciesReference "species" attribute having the same value in a model, unless the referenced Species @if conly structure @else object@endif@~ has its "boundaryCondition" attribute set to C. In other words, an assignment rule cannot be defined for a species that is created or destroyed in a reaction unless that species is defined as a boundary condition in the model. \n=item\n\n(For SBML Level 3 only) In the case of a species reference, an assignment rule sets the stoichiometry of the referenced reactant or product to the value determined by the formula in "math". The unit associated with the value produced by the "math" formula should be consistent with the unit "dimensionless", because reactant and product stoichiometries in reactions are dimensionless quantities. \n=item\n\nIn the case of a compartment, an SBML assignment rule sets the referenced compartment's size to the value determined by the formula in the "math" subelement of the AssignmentRule @if conly structure @else object@endif@~. The overall units of the formula in "math" I (in SBML Level 2 Version 4 and in SBML Level 3) or I (in SBML releases prior to Level 2 version 4) be the same as the units of the size of the compartment. \n=item\n\nIn the case of a parameter, an assignment rule sets the referenced parameter's value to that determined by the formula in the "math" subelement of the AssignmentRule @if conly structure @else object@endif@~. The overall units of the formula in the "math" subelement I (in SBML Level 2 Version 4 and in SBML Level 3) or I (in SBML releases prior to Level 2 version 4) be the same as the units defined for the parameter. \n=item\n\n(For SBML Level 3 Version 2 only) In the case of an object from an SBML Level 3 package, an AssignmentRule sets the referenced object's value (as defined by that package) to the value of the formula in math. The unit of measurement associated with the value produced by the formula should be the same as that object's units attribute value (if it has such an attribute), or be equal to the units of model components of that type (if objects of that class are defined by the package as having the same units). \n=back\n In SBML Level 2 and Level 3 Version 1, the "math" subelement of the AssignmentRule is required. In SBML Level 3 Version 2, this rule is relaxed, and the subelement is optional. If an AssignmentRule with no "math" child is present in the model, the value of its referenced "variable" is undefined. This may represent a situation where the model itself is unfinished, or the missing information may be provided by an SBML Level 3 package. If the variable attribute of an AssignmentRule object references an object in an SBML namespace not understood by the interpreter reading a given SBML document (that is, if the object is defined by an SBML Level 3 package that the software does not support), the assignment rule must be ignored--the object's value will not need to be set, as the interpreter could not understand that package. If an interpreter cannot establish whether a referenced object is missing from the model or instead is defined in an SBML namespace not understood by the interpreter, it may produce a warning to the user. (The latter situation may only arise if an SBML package is present in the SBML document with a package:required attribute of "true".) In the context of a simulation, assignment rules are in effect at all times, t \f$\geq\f$ 0. For purposes of evaluating expressions that involve the delay "csymbol" (see the SBML Level 2 specification), assignment rules are considered to apply also at t \f$\leq\f$ 0. Please consult the relevant SBML specification for additional information about the semantics of assignments, rules, and entity values for simulation time t \f$\leq\f$ 0. A model must not contain more than one AssignmentRule or RateRule @if conly structure @else object@endif@~ having the same value of "variable"; in other words, in the set of all assignment rules and rate rules in an SBML model, each variable appearing in the left-hand sides can only appear once. This simply follows from the fact that an indeterminate system would result if a model contained more than one assignment rule for the same variable or both an assignment rule and a rate rule for the same variable. Similarly, a model must also not contain both an AssignmentRule and an InitialAssignment definition for the same variable, because both kinds of constructs apply prior to and at the start of simulation time, i.e., t \f$\leq\f$ 0. If a model contained both an initial assignment and an assignment rule for the same variable, an indeterminate system would result. The value calculated by an AssignmentRule @if conly structure @else object@endif@~ overrides the value assigned to the given symbol by the model component defining that symbol. For example, if a Compartment @if conly structure @else object@endif's "size" attribute value is set in its definition, and the model also contains an AssignmentRule @if conly structure @else object@endif@~ having that compartment's "id" as its "variable" value, then the "size" assigned in the Compartment @if conly structure @else object@endif@~ definition is ignored and the value assigned based on the computation defined in the AssignmentRule. This does not mean that a definition for a given symbol can be omitted if there is an AssignmentRule @if conly structure @else object@endif@~ involving it. For example, there must be a Parameter @if conly structure @else object@endif@~ definition for a given parameter if there is an AssignmentRule definition for that parameter. It is only a question of which value definition takes precedence. C doc_rules_general_summary =over =item AssignmentRule::AssignmentRule Creates a new AssignmentRule using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this AssignmentRule. @param version an unsigned int, the SBML Version to assign to this AssignmentRule. C doc_throw_exception_lv C doc_note_setting_lv =item AssignmentRule::AssignmentRule Creates a new AssignmentRule using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item AssignmentRule::clone Creates and returns a deep copy of this AssignmentRule object. @return the (deep) copy of this Rule object. =item AssignmentRule::accept @internal =item AssignmentRule::hasRequiredAttributes Predicate returning C if all the required attributes for this AssignmentRule object have been set. In SBML Levels 2–3, the only required attribute for an AssignmentRule object is "variable". For Level 1, where the equivalent attribute is known by different names ("compartment", "species", or "name", depending on the type of object), there is an additional required attribute called "formula". @return C if the required attributes have been set, C otherwise. =item AssignmentRule::renameSIdRefs C doc_renamesidref_common =back =head2 RateRule @sbmlpackage{core} @htmlinclude pkg-marker-core.html An SBML rate rule representing dx/dt = f(B). The rule type RateRule is derived from the parent class Rule. It is used to express equations that determine the rates of change of variables. The left-hand side (the "variable" attribute) can refer to the identifier of a species, compartment, or parameter (but not a reaction). The entity identified must have its "constant" attribute set to C. The effects of a RateRule are in general terms the same, but differ in the precise details depending on which variable is being set: \n=over\n \n=item\n\nIn the case of a species, a RateRule sets the rate of change of the species' quantity (concentration or amount of substance) to the value determined by the formula in the "math" subelement of the RateRule object. The overall units of the formula in "math" I (in SBML Level 2 Version 4 and in SBML Level 3) or @em must (in SBML releases prior to Level 2 version 4) be equal to the unit of species quantity divided by the model-wide unit of time. Restrictions: There must not be both a RateRule "variable" attribute and a SpeciesReference "species" attribute having the same value, unless that species has its "boundaryCondition" attribute is set to C. This means a rate rule cannot be defined for a species that is created or destroyed in a reaction, unless that species is defined as a boundary condition in the model. \n=item\n\n(For SBML Level 3 only) In the case of a species reference, a RateRule sets the rate of change of the stoichiometry of the referenced reactant or product to the value determined by the formula in "math". The unit associated with the value produced by the "math" formula should be consistent with the unit "dimensionless" divided by the model-wide unit of time. \n=item\n\nIn the case of a compartment, a RateRule sets the rate of change of the compartment's size to the value determined by the formula in the "math" subelement of the RateRule object. The overall units of the formula I (in SBML Level 2 Version 4 and in SBML Level 3) or I (in SBML releases prior to Level 2 version 4) be the units of the compartment's size divided by the model-wide unit of time. \n=item\n\nIn the case of a parameter, a RateRule sets the rate of change of the parameter's value to that determined by the formula in the "math" subelement of the RateRule object. The overall units of the formula I (in SBML Level 2 Version 4 and in SBML Level 3) or I (in SBML releases prior to Level 2 version 4) be the Parameter object's "unit" attribute value divided by the model-wide unit of time. \n=item\n\n(For SBML Level 3 Version 2 only) In the case of an object from an SBML Level 3 package, a RateRule sets the rate of change of the referenced object's value (as defined by that package) to the value of the formula in "math". The unit of measurement associated with the value produced by the formula should be the same as that object's units attribute value (if it has such an attribute) divided by the model-wide unit of ISBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "notes" content. Constraint was introduced in SBML Level 2 Version 2. It is not available in earlier versions of Level 2 nor in any version of Level 1. @section constraint-semantics Semantics of Constraints In the context of a simulation, a Constraint has effect at all times t \f$\geq\f$ 0. Each Constraint's "math" subelement is first evaluated after any InitialAssignment definitions in a model at t = 0 and can conceivably trigger at that point. (In other words, a simulation could fail a constraint immediately.) Constraint structures cannot and should not be used to compute the dynamical behavior of a model as part of, for example, simulation. Constraints may be used as input to non-dynamical analysis, for instance by expressing flux constraints for flux balance analysis. The results of a simulation of a model containing a constraint are invalid from any simulation time at and after a point when the function given by the "math" subelement returns a value of C. Invalid simulation results do not make a prediction of the behavior of the biochemical reaction network represented by the model. The precise behavior of simulation tools is left undefined with respect to constraints. If invalid results are detected with respect to a given constraint, the "message" subelement may optionally be displayed to the user. The simulation tool may also halt the simulation or clearly delimit in output data the simulation time point at which the simulation results become invalid. SBML does not impose restrictions on duplicate Constraint definitions or the order of evaluation of Constraint objects in a model. It is possible for a model to define multiple constraints all with the same mathematical expression. Since the failure of any constraint indicates that the model simulation has entered an invalid state, a system is not required to attempt to detect whether other constraints in the model have failed once any one constraint has failed. =over =back =head2 ListOfConstraints @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of Constraint objects. C doc_what_is_listof =over =item Constraint::Constraint Creates a new Constraint using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Constraint. @param version an unsigned int, the SBML Version to assign to this Constraint. C doc_throw_exception_lv C doc_note_setting_lv =item Constraint::Constraint Creates a new Constraint using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Constraint::Constraint Copy constructor; creates a copy of this Constraint. @param orig the object to copy. =item Constraint::accept @internal =item Constraint::clone Creates and returns a deep copy of this Constraint object. @return the (deep) copy of this Constraint object. =item Constraint::getMessage Get the message, if any, associated with this Constraint @return the message for this Constraint, as an XMLNode. =item Constraint::getMessageString Get the message string, if any, associated with this Constraint @return the message for this Constraint, as a string. =item Constraint::getMath Get the mathematical expression of this Constraint @return the math for this Constraint, as an ASTNode, or C if the math is not set. =item Constraint::isSetMessage Predicate returning C if a message is defined for this Constraint. @return C if the message of this Constraint is set, C otherwise. =item Constraint::isSetMath Predicate returning C if a mathematical formula is defined for this Constraint. @return C if the "math" subelement for this Constraint is set, C otherwise. =item Constraint::setMessage Sets the message of this Constraint. The XMLNode tree passed in C is copied. @param xhtml an XML tree containing XHTML content. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item Constraint::setMessage Sets the message of this Constraint. @param message an XML string that is to be used as the content of the "message" subelement of this object. @param addXHTMLMarkup a boolean indicating whether to wrap the contents of the C argument with XHTML paragraph (C<<p>>) tags. This is appropriate when the string in C does not already containg the appropriate XHTML markup. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item Constraint::setMath Sets the mathematical expression of this Constraint to a copy of the AST given as C. @param math an ASTNode expression to be assigned as the "math" subelement of this Constraint. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item Constraint::unsetMessage Unsets the "message" subelement of this Constraint. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Constraint::renameSIdRefs C doc_renamesidref_common =item Constraint::renameUnitSIdRefs C doc_renameunitsidref_common =item Constraint::replaceSIDWithFunction @internal =item Constraint::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_CONSTRAINT SBML_CONSTRAINT@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Constraint::getElementName Returns the XML element name of this object, which for Constraint, is always C<"constraint">. @return the name of this element, i.e., C<"constraint">. =item Constraint::writeElements @internal =item Constraint::hasRequiredElements Predicate returning C if all the required elements for this Constraint object have been set. @note The required elements for a Constraint object are: @li 'math' (through SBML Level 3 Version 1 only; not required in Level 3 Version 2+.) @return a boolean value indicating whether all the required elements for this object have been defined. =item Constraint::getInternalId @internal =item Constraint::setInternalId @internal =item Constraint::readOtherXML @internal =item Constraint::addExpectedAttributes @internal =item Constraint::readAttributes @internal =item Constraint::readL2Attributes @internal =item Constraint::readL3Attributes @internal =item Constraint::writeAttributes @internal =item ListOfConstraints::ListOfConstraints Creates a new ListOfConstraints object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfConstraints::ListOfConstraints Creates a new ListOfConstraints object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfConstraints object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfConstraints::clone Creates and returns a deep copy of this ListOfConstraints object. @return the (deep) copy of this ListOfConstraints object. =item ListOfConstraints::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., Constraint objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for the objects contained in this ListOf instance: @link SBMLTypeCode_t#SBML_CONSTRAINT SBML_CONSTRAINT@endlink (default). @see getElementName() @see getPackageName() =item ListOfConstraints::getElementName Returns the XML element name of this object. For ListOfConstraints, the XML element name is C<"listOfConstraints">. @return the name of this element. =item ListOfConstraints::get Get a Constraint from the ListOfConstraints. @param n the index number of the Constraint to get. @return the nth Constraint in this ListOfConstraints. If the index C is invalid, C is returned. @see size() =item ListOfConstraints::get Get a Constraint from the ListOfConstraints. @param n the index number of the Constraint to get. @return the nth Constraint in this ListOfConstraints. If the index C is invalid, C is returned. @see size() =item ListOfConstraints::remove Removes the nth item from this ListOfConstraints items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfConstraints::getElementPosition @internal =item ListOfConstraints::createObject @internal =back =head2 Reaction @sbmlpackage{core} @htmlinclude pkg-marker-core.html An SBML reaction between species in an SBML model. A I represents any transformation, transport or binding process, typically a chemical reaction, that can change the quantity of one or more species. In SBML, a reaction is defined primarily in terms of the participating reactants and products (and their corresponding stoichiometries), along with optional modifier species, an optional rate at which the reaction takes place, and optional parameters. As with other major objects in SBML, Reaction has a mandatory attribute, "id", used to give the reaction an identifier. The identifier must be a text string conforming to the identifer syntax permitted in SBML. In SBML Level 2 and Level 3, the reaction "id" identifier can be used in mathematical formulas elsewhere in an SBML model to represent the rate of that reaction; this usage is explained below. Reaction also has an optional "name" attribute, of type C. The "id" and "name" must be used according to the guidelines described in the SBML specification. The species participating as reactants, products, and/or modifiers in a reaction are declared using lists of SpeciesReference and/or ModifierSpeciesReference instances stored in subelements "listOfReactants", "listOfProducts" and "listOfModifiers". Certain restrictions are placed on the appearance of species in reaction definitions: \n=over\n \n=item\n\nThe ability of a species to appear as a reactant or product of any reaction in a model is governed by certain flags in that species' definition; see the definition of Species for more information. \n=item\n\nAny species appearing in the mathematical formula of the subelement "kineticLaw" (described below) of a Reaction must be declared in at least one of that Reaction's lists of reactants, products, and/or modifiers. Put another way, it is an error for a reaction's kinetic law formula to refer to species that have not been declared for that reaction. \n=item\n\nFor SBML Levels 1, 2, and SBML Level 3 Version 1, a reaction definition can contain an empty list of reactants or an empty list of products, but it must have at least one reactant or product; in other words, a reaction without any reactant or product species is not permitted. (This restriction does not apply to modifier species, which remain optional in all cases.) In SBML Level 3 Version 2, this requirement was dropped, allowing the creation of reactions with neither reactants nor products. \n=back\n A reaction can contain up to one KineticLaw object in a subelement named "kineticLaw". It defines the speed at which the process defined by the reaction takes place. The description of KineticLaw provides more details about its use. Note that although the inclusion of a KineticLaw object in an instance of a Reaction component is optional, there is no useful default that can be substituted in place of a missing rate expression in a reaction. Moreover, a reaction's rate cannot be defined in any other way in SBML---InitialAssignment, AssignmentRule, RateRule, AlgebraicRule, Event, and other constructs in SBML cannot be used to set the reaction rate separately. Nevertheless, for some modeling applications, reactions without any defined rate can be perfectly acceptable. Reaction also has a boolean attribute named "reversible" for indicating whether the reaction is reversible. This attribute is optional in SBML Level 2, with a default of C; it is mandatory in SBML Level 3 (with no default value). To say that a reaction is @em reversible is to say it can proceed in either the forward or the reverse direction. Although the reversibility of a reaction can sometimes be deduced by inspecting its rate expression, this is not always the case, especially for complicated expressions. Moreover, the need in SBML to allow rate expressions (i.e., KineticLaw) to be optional leads to the need for a separate flag indicating reversibility. Note that labeling a reaction as irreversible is an assertion that the reaction always proceeds in the given forward direction. (Why else would it be flagged as irreversible?) This implies the rate expression in the KineticLaw always has a non-negative value during simulations. Software tools could provide a means of optionally testing that this condition holds. The presence of reversibility information in two places (i.e., the rate expression and the "reversible" attribute on Reaction) leaves open the possibility that a model could contain contradictory information, but the creation of such a model would be an error on the part of the software generating it. The Reaction object class has another boolean attribute called "fast". This attribute is optional in SBML Level 2, with a default of C; it is mandatory in SBML Level 3 (with no default value). In SBML Level 3 Version 2, a value of C for the "fast" attribute is deprecated in favor of all reactions having a "fast" value of C. It is used to indicate that a reaction occurs on a vastly faster time scale than others in a system. Readers are directed to the SBML Level 2 Version 4 specification, which provides more detail about the conditions under which a reaction can be considered to be fast in this sense. SBML Level 1 and Level 2 Version 1 incorrectly claimed that software tools could ignore this attribute if they did not implement support for the corresponding concept; however, further research in SBML has revealed that this is not true, and "fast" cannot be ignored if it is set to C. SBML Level 2 Versions 2–4 therefore stipulate that if a model has any reactions with "fast" set to C, a software tool must be able to respect the attribute or else indicate to the user that it does not have the capacity to do so. Analysis software cannot ignore the value of the "fast" attribute because doing so may lead to different results as compared to a software system that does make use of "fast". C doc_fast_attribute_removed In SBML Level 3, the Reaction object has an additional optional attribute named "compartment", whose value must be the identifier of a compartment defined in the enclosing Model object. The "compartment" attribute can be used to indicate the compartment in which the reaction is assumed to take place. If the attribute is present, its value must be the identifier of a Compartment object defined in the enclosing Model object. Similar to the "reversible" attribute, the value of the "compartment" attribute has no direct impact on the construction of mathematical equations for the SBML model. When a kinetic law is given for a reaction, the compartment location may already be implicit in the kinetic law (although this cannot always be guaranteed). Nevertheless, software tools may find the "compartment" attribute value useful for such purposes as analyzing the structure of the model, guiding the modeler in constructing correct rate formulas, and visualization purposes. Readers are urged to read the SBML specification for more details about the proper use of Reaction. =over =back =head2 ListOfReactions @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of Reaction objects. C doc_what_is_listof =over =item Reaction::Reaction Creates a new Reaction using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Reaction. @param version an unsigned int, the SBML Version to assign to this Reaction. C doc_throw_exception_lv C doc_note_setting_lv =item Reaction::Reaction Creates a new Reaction using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Reaction::Reaction Copy constructor; creates a copy of this Reaction. @param orig the object to copy. =item Reaction::accept @internal =item Reaction::clone Creates and returns a deep copy of this Reaction object. @return the (deep) copy of this Reaction object. =item Reaction::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item Reaction::getElementByMetaId Returns the first child element it can find with the given C, or C if no such object is found. @param metaid string representing the metaid of the object to find. @return pointer to the first element found with the given C. =item Reaction::getAllElements Returns a List of all child SBase objects, including those nested to an arbitrary depth @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item Reaction::renameSIdRefs C doc_renamesidref_common =item Reaction::initDefaults Initializes the fields of this Reaction object to "typical" default values. The SBML Reaction component has slightly different aspects and default attribute values in different SBML Levels and Versions. This method sets the values to certain common defaults, based mostly on what they are in SBML Level 2. Specifically: @li Sets the "reversible" attribute to C @li Sets the "fast" attribute to C @li Marks the "fast" attribute as I having been set for SBML Level 2, but I having been set for SBML Level 1 and SBML Level 3. C doc_warning_reaction_cant_ignore_fast =item Reaction::getId Returns the value of the "id" attribute of this Reaction. @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() function instead. C doc_id_attribute @return the id of this Reaction. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item Reaction::getName Returns the value of the "name" attribute of this Reaction object. C doc_get_name =item Reaction::getKineticLaw Returns the KineticLaw object contained in this Reaction. @return the KineticLaw instance. =item Reaction::getKineticLaw Returns the KineticLaw object contained in this Reaction. @return the KineticLaw instance. =item Reaction::getReversible Returns the value of the "reversible" attribute on the Reaction as a boolean value. @return the reversibility status of this Reaction. =item Reaction::getFast Returns the value of the "fast" attribute of this Reaction. C doc_fast_attribute_removed @return the "fast" status of this Reaction. C doc_warning_reaction_cant_ignore_fast =item Reaction::getCompartment (SBML Level 3 only) Returns the value of the "compartment" attribute on the Reaction. @return the compartment of this Reaction. @note The "compartment" attribute is available in SBML Level 3, but is not present on Reaction in lower Levels of SBML. =item Reaction::isSetId Predicate returning C if this Reaction's "id" attribute is set. C doc_isset_id =item Reaction::isSetName Predicate returning C if this Reaction's "name" attribute is set. C doc_isset_name =item Reaction::isSetKineticLaw Predicate returning C if this Reaction contains a kinetic law object. @return C if a KineticLaw is present in this Reaction,, C otherwise. =item Reaction::isSetFast Predicate returning C if the value of the "fast" attribute on this Reaction is set. C doc_fast_attribute_removed @return C if the "fast" attribute is set, C otherwise. C doc_warning_reaction_cant_ignore_fast =item Reaction::isSetCompartment Predicate returning C if this Reaction's "compartment" attribute is set. @return C if the "compartment" attribute of this Reaction is set, C otherwise. @note The "compartment" attribute is available in SBML Level 3, but is not present on Reaction in lower Levels of SBML. =item Reaction::isSetReversible Predicate returning C if this Reaction's "reversible" attribute is set. @return C if the "reversible" attribute of this Reaction is set, C otherwise. =item Reaction::setId Sets the value of the "id" attribute of this Reaction. C doc_set_id =item Reaction::setName Sets the value of the "name" attribute of this Reaction. C doc_set_name =item Reaction::setKineticLaw Sets the "kineticLaw" subelement of this Reaction to a copy of the given KineticLaw object. @param kl the KineticLaw object to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink =item Reaction::setReversible Sets the value of the "reversible" attribute of this Reaction. @param value the value of the "reversible" attribute. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item Reaction::setFast Sets the value of the "fast" attribute of this Reaction. C doc_fast_attribute_removed Calling this function with an argument of C for an SBML Level 3 Version 2 Reaction will not set the value, as the attribute does not exist for that level/version. @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @param value the value of the "fast" attribute. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_reaction_cant_ignore_fast =item Reaction::setCompartment Sets the value of the "compartment" attribute of this Reaction. The string C is copied. @param sid the string to use as the compartment of this Reaction. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The "compartment" attribute is available in SBML Level 3, but is not present on Reaction in lower Levels of SBML. =item Reaction::unsetName Unsets the value of the "name" attribute of this Reaction. C doc_unset_name =item Reaction::unsetKineticLaw Unsets the "kineticLaw" subelement of this Reaction. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Reaction::unsetFast Unsets the value of the "fast" attribute of this Reaction. C doc_fast_attribute_removed C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_reaction_cant_ignore_fast =item Reaction::unsetCompartment Unsets the value of the "compartment" attribute of this Reaction. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The "compartment" attribute is available in SBML Level 3, but is not present on Reaction in lower Levels of SBML. =item Reaction::unsetReversible Unsets the value of the "reversible" attribute of this Reaction. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Reaction::addReactant Adds a given SpeciesReference object as a reactant in this Reaction. The SpeciesReference instance in C is copied. @param sr a SpeciesReference object referring to a Species in the enclosing Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createReactant() =item Reaction::addReactant Adds the given species as a reactant with the given stoichiometry @param species the species to be added as reactant. @param stoichiometry an optional parameter specifying the stoichiometry of the added reactant (defaulting to 1). @param id an optional id to be given to the species reference that will be created. (defaulting to empty string, i.e. not set). @param constant an attribute specifying whether the species reference is constant or not (defaulting to true). C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink C doc_note_object_is_copied @note the Species object itself is NOT added to the model @see createProduct() =item Reaction::addProduct Adds a given SpeciesReference object as a product in this Reaction. The SpeciesReference instance in C is copied. @param sr a SpeciesReference object referring to a Species in the enclosing Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createProduct() =item Reaction::addProduct Adds the given species as a product with the given stoichiometry @param species the species to be added as product. @param stoichiometry an optional parameter specifying the stoichiometry of the added product (defaulting to 1). @param id an optional id to be given to the species reference that will be created. (defaulting to empty string, i.e. not set). @param constant an attribute specifying whether the species reference is constant or not (defaulting to true). C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink C doc_note_object_is_copied @note the Species object itself is NOT added to the model @see createProduct() =item Reaction::addModifier Adds a given ModifierSpeciesReference object as a product in this Reaction. The ModifierSpeciesReference instance in C is copied. @param msr a ModifierSpeciesReference object referring to a Species in the enclosing Model. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createModifier() =item Reaction::addModifier Adds the given species as a modifier to this reaction @param species the species to be added as modifier. @param id an optional id to be given to the species reference that will be created. (defaulting to empty string, i.e. not set). C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink C doc_note_object_is_copied @note the Species object itself is NOT added to the model @see createModifier() =item Reaction::createReactant Creates a new SpeciesReference, adds it to this Reaction's list of reactants, and returns it. @return a new SpeciesReference object. =item Reaction::createProduct Creates a new SpeciesReference, adds it to this Reaction's list of products, and returns it. @return a new SpeciesReference object. =item Reaction::createModifier Creates a new ModifierSpeciesReference, adds it to this Reaction's list of modifiers and returns it. @return a new ModifierSpeciesReference object. =item Reaction::createKineticLaw Creates a new KineticLaw object, installs it as this Reaction's "kineticLaw" subelement, and returns it. If this Reaction had a previous KineticLaw, it will be destroyed. @return the new KineticLaw object. =item Reaction::getListOfReactants Returns the list of reactants in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as reactants in this reaction. =item Reaction::getListOfReactants Returns the list of reactants in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as reactants in this reaction. =item Reaction::getListOfProducts Returns the list of products in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as products in this reaction. =item Reaction::getListOfProducts Returns the list of products in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as products in this reaction. =item Reaction::getListOfModifiers Returns the list of modifiers in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as modifiers in this reaction. =item Reaction::getListOfModifiers Returns the list of modifiers in this Reaction object. @return the ListOfSpeciesReferences containing the references to the species acting as modifiers in this reaction. =item Reaction::getReactant Returns the nth reactant species (as a SpeciesReference object) in the list of reactants in this Reaction. Callers should first call getNumReactants() to find out how many reactants there are, to avoid using an invalid index number. @param n the index of the reactant sought. @return the nth reactant (as a SpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getReactant Returns the nth reactant species (as a SpeciesReference object) in the list of reactants in this Reaction. Callers should first call getNumReactants() to find out how many reactants there are, to avoid using an invalid index number. @param n the index of the reactant sought. @return the nth reactant (as a SpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getReactant Returns the reactant species (as a SpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the reactant Species ("species" attribute of the reactant SpeciesReference object). @return a SpeciesReference object, or C if no species with the given identifier C appears as a reactant in this Reaction. =item Reaction::getReactant Returns the reactant species (as a SpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the reactant Species ("species" attribute of the reactant SpeciesReference object). @return a SpeciesReference object, or C if no species with the given identifier C appears as a reactant in this Reaction. =item Reaction::getProduct Returns the nth product species (as a SpeciesReference object) in the list of products in this Reaction. Callers should first call getNumProducts() to find out how many products there are, to avoid using an invalid index number. @param n the index of the product sought. @return the nth product (as a SpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getProduct Returns the nth product species (as a SpeciesReference object) in the list of products in this Reaction. Callers should first call getNumProducts() to find out how many products there are, to avoid using an invalid index number. @param n the index of the product sought. @return the nth product (as a SpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getProduct Returns the product species (as a SpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the product Species ("species" attribute of the product SpeciesReference object). @return a SpeciesReference object, or C if no species with the given identifier C appears as a product in this Reaction. =item Reaction::getProduct Returns the product species (as a SpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the product Species ("species" attribute of the product SpeciesReference object). @return a SpeciesReference object, or C if no species with the given identifier C appears as a product in this Reaction. =item Reaction::getModifier Returns the nth modifier species (as a ModifierSpeciesReference object) in the list of modifiers of this Reaction. Callers should first call getNumModifiers() to find out how many modifiers there are, to avoid using an invalid index number. @param n the index of the modifier species sought. @return the nth modifier (as a ModifierSpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getModifier Returns the nth modifier species (as a ModifierSpeciesReference object) in the list of modifiers of this Reaction. Callers should first call getNumModifiers() to find out how many modifiers there are, to avoid using an invalid index number. @param n the index of the modifier species sought. @return the nth modifier (as a ModifierSpeciesReference object) of this Reaction. If the index C is invalid, C is returned. =item Reaction::getModifier Returns the modifier species (as a ModifierSpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the modifier Species ("species" attribute of the ModifierSpeciesReference object). @return a ModifierSpeciesReference object, or C if no species with the given identifier C appears as a modifier in this Reaction. =item Reaction::getModifier Returns the modifier species (as a ModifierSpeciesReference object) having a specific identifier in this Reaction. @param species the identifier of the modifier Species ("species" attribute of the ModifierSpeciesReference object). @return a ModifierSpeciesReference object, or C if no species with the given identifier C appears as a modifier in this Reaction. =item Reaction::getNumReactants Returns the number of reactant species in this Reaction. @return the number of reactants in this Reaction. =item Reaction::getNumProducts Returns the number of product species in this Reaction. @return the number of products in this Reaction. =item Reaction::getNumModifiers Returns the number of modifier species in this Reaction. @return the number of modifiers in this Reaction. =item Reaction::removeReactant Removes the nth reactant species (SpeciesReference object) in the list of reactants in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. The caller should first call getNumReactants() to find out how many reactants there are, to avoid using an invalid index number. @param n the index of the reactant SpeciesReference object to remove. @return the removed reactant SpeciesReference object, or C if the given index is out of range. =item Reaction::removeReactant Removes the reactant species (SpeciesReference object) having the given "species" attribute in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param species the "species" attribute of the reactant SpeciesReference object. @return the removed reactant SpeciesReference object, or C if no reactant SpeciesReference object with the given "species" attribute C exists in this Reaction. =item Reaction::removeProduct Removes the nth product species (SpeciesReference object) in the list of products in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. The caller should first call getNumProducts() to find out how many products there are, to avoid using an invalid index number. @param n the index of the product SpeciesReference object to remove. @return the removed product SpeciesReference object, or C if the given index is out of range. =item Reaction::removeProduct Removes the product species (SpeciesReference object) having the given "species" attribute in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param species the "species" attribute of the product SpeciesReference object. @return the removed product SpeciesReference object, or C if no product SpeciesReference object with the given "species" attribute C exists in this Reaction. =item Reaction::removeModifier Removes the nth modifier species (ModifierSpeciesReference object) in the list of modifiers in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. The caller should first call getNumModifiers() to find out how many modifiers there are, to avoid using an invalid index number. @param n the index of the ModifierSpeciesReference object to remove. @return the removed ModifierSpeciesReference object, or C if the given index is out of range. =item Reaction::removeModifier Removes the modifier species (ModifierSpeciesReference object) having the given "species" attribute in this Reaction and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param species the "species" attribute of the ModifierSpeciesReference object. @return the removed ModifierSpeciesReference object, or C if no ModifierSpeciesReference object with the given "species" attribute @p species exists in this Reaction. =item Reaction::setSBMLDocument @internal =item Reaction::enablePackageInternal @internal =item Reaction::updateSBMLNamespace @internal =item Reaction::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_REACTION SBML_REACTION@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Reaction::getElementName Returns the XML element name of this object, which for Reaction, is always C<"reaction">. @return the name of this element, i.e., C<"reaction">. =item Reaction::writeElements @internal =item Reaction::hasRequiredAttributes Predicate returning C if all the required attributes for this Reaction object have been set. The required attributes for a Reaction object are: @li "id" (or "name" in SBML Level 1) @li "fast" (in Level 3 Version 1 only, where it is defined as a required attribute) @li "reversible" (in Level 3 only, where it is defined as a required attribute) @return C if the required attributes have been set, C otherwise. =item Reaction::createObject @internal =item Reaction::addExpectedAttributes @internal =item Reaction::readAttributes @internal =item Reaction::readL1Attributes @internal =item Reaction::readL2Attributes @internal =item Reaction::readL3Attributes @internal =item Reaction::writeAttributes @internal =item Reaction::isExplicitlySetReversible @internal =item Reaction::isExplicitlySetFast @internal =item ListOfReactions::ListOfReactions Creates a new ListOfReactions object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfReactions::ListOfReactions Creates a new ListOfReactions object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfReactions object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfReactions::clone Creates and returns a deep copy of this ListOfReactions object. @return the (deep) copy of this ListOfReactions object. =item ListOfReactions::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., Reaction objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for objects contained in this list: @link SBMLTypeCode_t#SBML_REACTION SBML_REACTION@endlink (default). @see getElementName() @see getPackageName() =item ListOfReactions::getElementName Returns the XML element name of this object For ListOfReactions, the XML element name is C<"listOfReactions">. @return the name of this element, i.e., C<"listOfReactions">. =item ListOfReactions::get Get a Reaction from the ListOfReactions. @param n the index number of the Reaction to get. @return the nth Reaction in this ListOfReactions. If the index C is invalid, C is returned. @see size() =item ListOfReactions::get Get a Reaction from the ListOfReactions. @param n the index number of the Reaction to get. @return the nth Reaction in this ListOfReactions. If the index C is invalid, C is returned. @see size() =item ListOfReactions::get Get a Reaction from the ListOfReactions based on its identifier. @param sid a string representing the identifier of the Reaction to get. @return Reaction in this ListOfReactions with the given C or C if no such Reaction exists. @see get(unsigned int n) @see size() =item ListOfReactions::get Get a Reaction from the ListOfReactions based on its identifier. @param sid a string representing the identifier of the Reaction to get. @return Reaction in this ListOfReactions with the given C or C if no such Reaction exists. @see get(unsigned int n) @see size() =item ListOfReactions::remove Removes the nth item from this ListOfReactions items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfReactions::remove Removes item in this ListOfReactions items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then NULL is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfReactions::getElementPosition @internal =item ListOfReactions::createObject @internal =back =head2 KineticLaw @sbmlpackage{core} @htmlinclude pkg-marker-core.html The rate expression for an SBML reaction. An object of class KineticLaw is used to describe the rate at which the process defined by a given Reaction takes place. KineticLaw has subelements called "math" (for MathML content) and "listOfParameters" (of class ListOfParameters), in addition to the attributes and subelements it inherits from SBase. KineticLaw's "math" subelement for holding a MathML formula (required through SBML Level 3 Version 1, but optional as of SBML Level 3 Version 2) defines the rate of the reaction. The formula may refer to other entities in a model as well as local parameter definitions within the scope of the Reaction (see below). It is important to keep in mind, however, that the only Species identifiers that can be used in this formula are those declared in the lists of reactants, products and modifiers in the Reaction structure. (In other words, before a species can be referenced in the KineticLaw, it must be declared in one of those lists.) KineticLaw provides a way to define I parameters whose identifiers can be used in the "math" formula of that KineticLaw instance. Prior to SBML Level 3, these parameter definitions are stored inside a "listOfParameters" subelement containing Parameter objects; in SBML Level 3, this is achieved using a specialized object class called LocalParameter and the containing subelement is called "listOfLocalParameters". In both cases, the parameters so defined are only visible within the KineticLaw (or, as of SBML Level 3 Version 2, only visible within the parent Reaction); they cannot be accessed outside. A local parameter within one reaction is not visible from within another reaction, nor is it visible to any other construct outside of the KineticLaw in which it is defined. In addition, another important feature is that if such a Parameter (or in Level 3, LocalParameter) object has the same identifier as another object in the scope of the enclosing Model, the definition inside the KineticLaw takes precedence. In other words, within the KineticLaw's "math" formula, references to local parameter identifiers shadow any identical global identifiers. The values of local parameters defined within KineticLaw objects cannot change. In SBML Level 3, this quality is built into the LocalParameter construct. In Level 2, where the same kind of Parameter object class is used as for global parameters, the Parameter objects' "constant" attribute must always have a value of C (either explicitly or left to its default value). @section shadowing-warning A warning about identifier shadowing A common misconception is that different classes of objects (e.g., species, compartments, parameters) in SBML have different identifier scopes. They do not. The implication is that if a KineticLaw's local parameter definition uses an identifier identical to I other identifier defined in the model outside the KineticLaw, even if the other identifier does I belong to a parameter type of object, the local parameter's identifier takes precedence within that KineticLaw's "math" formula. It is not an error in SBML for identifiers to shadow each other this way, but can lead to confusing and subtle errors. @section version-diffs SBML Level/Version differences In SBML Level 2 Version 1, the SBML specification included two additional attributes on KineticLaw called "substanceUnits" and "timeUnits". They were removed beginning with SBML Level 2 Version 2 because further research determined they introduced many problems. The most significant problem was that their use could easily lead to the creation of valid models whose reactions nevertheless could not be integrated into a system of equations without outside knowledge for converting the quantities used. Examination of real-life models revealed that a common reason for using "substanceUnits" on KineticLaw was to set the units of all reactions to the same set of substance units, something that is better achieved by using UnitDefinition to redefine C<"substance"> for the whole Model. As mentioned above, in SBML Level 2 Versions 2–4, local parameters are of class Parameter. In SBML Level 3, the class of object is LocalParameter. In SBML Level 3 Version 2, the scope of the LocalParameter was expanded to the entire Reaction, instead of just the KineticLaw. This introduced a single new restriction: an L3v2 LocalParameter may not now shadow the C of any Species referenced by a SpeciesReference in the same Reaction. Other than that, there is no difference in any core construct. However, packages may take advantage of this new scope by adding elements to the Reaction that may now reference a LocalParameter defined in the same Reaction. =over =item KineticLaw::KineticLaw Creates a new KineticLaw using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this KineticLaw. @param version an unsigned int, the SBML Version to assign to this KineticLaw. C doc_throw_exception_lv C doc_note_setting_lv =item KineticLaw::KineticLaw Creates a new KineticLaw using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item KineticLaw::KineticLaw Copy constructor; creates a copy of this KineticLaw. @param orig the object to copy. =item KineticLaw::accept @internal =item KineticLaw::clone Creates and returns a deep copy of this KineticLaw object. @return the (deep) copy of this KineticLaw object. =item KineticLaw::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item KineticLaw::getElementByMetaId Returns the first child element it can find with the given C, or C if no such object is found. @param metaid string representing the metaid of the object to find. @return pointer to the first element found with the given C. =item KineticLaw::getAllElements Returns a List of all child SBase objects, including those nested to an arbitrary depth @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item KineticLaw::getFormula Returns the mathematical formula for this KineticLaw object and return it as as a text string. This is fundamentally equivalent to @if java KineticLaw::getMath()@else getMath()@endif. This variant is provided principally for compatibility compatibility with SBML Level 1. @return a string representing the formula of this KineticLaw. @note @htmlinclude level-1-uses-text-string-math.html @see getMath() =item KineticLaw::getMath Returns the mathematical formula for this KineticLaw object and return it as as an AST. This is fundamentally equivalent to @if java KineticLaw::getFormula()@else getFormula()@endif. The latter is provided principally for compatibility compatibility with SBML Level 1, which represented mathematical formulas in text-string form. @return the ASTNode representation of the mathematical formula, or C if the math is not set. @see getFormula() =item KineticLaw::getTimeUnits (SBML Level 2 Version 1 only) Returns the value of the "timeUnits" attribute of this KineticLaw object. @return the "timeUnits" attribute value. C doc_note_timeunits_substanceunits =item KineticLaw::getSubstanceUnits (SBML Level 2 Version 1 only) Returns the value of the "substanceUnits" attribute of this KineticLaw object. @return the "substanceUnits" attribute value. C doc_note_timeunits_substanceunits =item KineticLaw::isSetFormula Predicate returning C if this KineticLaw's "formula" attribute is set. This is functionally identical to the method @if java KineticLaw::isSetMath()@else isSetMath()@endif. It is provided in order to mirror the parallel between @if java KineticLaw::getFormula()@else getFormula()@endif@~ and @if java KineticLaw::getMath()@else getMath()@endif. @return C if the formula (meaning the C subelement) of this KineticLaw is set, C otherwise. @note @htmlinclude level-1-uses-text-string-math.html @see isSetMath() =item KineticLaw::isSetMath Predicate returning C if this Kinetic's "math" subelement is set. This is identical to the method @if java KineticLaw::isSetFormula()@else isSetFormula()@endif. It is provided in order to mirror the parallel between @if java KineticLaw::getFormula()@else getFormula()@endif@~ and @if java KineticLaw::getMath()@else getMath()@endif. @return C if the formula (meaning the C subelement) of this KineticLaw is set, C otherwise. @see isSetFormula() =item KineticLaw::isSetTimeUnits (SBML Level 2 Version 1 only) Predicate returning C if this SpeciesReference's "timeUnits" attribute is set. @return C if the "timeUnits" attribute of this KineticLaw object is set, C otherwise. C doc_note_timeunits_substanceunits =item KineticLaw::isSetSubstanceUnits (SBML Level 2 Version 1 only) Predicate returning C if this SpeciesReference's "substanceUnits" attribute is set. @return C if the "substanceUnits" attribute of this KineticLaw object is set, C otherwise. C doc_note_timeunits_substanceunits =item KineticLaw::setFormula Sets the mathematical expression of this KineticLaw instance to the given C. The given C string is copied. Internally, libSBML stores the mathematical expression as an ASTNode. @param formula the mathematical expression to use, represented in text-string form. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note @htmlinclude level-1-uses-text-string-math.html @see setMath(const ASTNode math) =item KineticLaw::setMath Sets the mathematical expression of this KineticLaw instance to a copy of the given ASTNode. This is fundamentally identical to @if java KineticLaw::setFormula(String formula)@else getFormula()@endif. The latter is provided principally for compatibility compatibility with SBML Level 1, which represented mathematical formulas in text-string form. @param math an ASTNode representing a formula tree. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @see setFormula(const std::string& formula) =item KineticLaw::setTimeUnits (SBML Level 2 Version 1 only) Sets the "timeUnits" attribute of this KineticLaw object to a copy of the identifier in C. @param sid the identifier of the units to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_note_timeunits_substanceunits =item KineticLaw::setSubstanceUnits (SBML Level 2 Version 1 only) Sets the "substanceUnits" attribute of this KineticLaw object to a copy of the identifier given in C. @param sid the identifier of the units to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_note_timeunits_substanceunits =item KineticLaw::unsetTimeUnits (SBML Level 2 Version 1 only) Unsets the "timeUnits" attribugte of this KineticLaw object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_note_timeunits_substanceunits =item KineticLaw::unsetSubstanceUnits (SBML Level 2 Version 1 only) Unsets the "substanceUnits" attribute of this KineticLaw object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_note_timeunits_substanceunits =item KineticLaw::addParameter Adds a copy of the given Parameter object to the list of local parameters in this KineticLaw. C doc_use_param_in_l2 @param p the Parameter to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createParameter() =item KineticLaw::addLocalParameter Adds a copy of the given LocalParameter object to the list of local parameters in this KineticLaw. C doc_use_localparam_in_l3 @param p the LocalParameter to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createLocalParameter() =item KineticLaw::createParameter Creates a new Parameter object, adds it to this KineticLaw's list of parameters, and returns the Parameter object created. C doc_use_param_in_l2 @return a new Parameter object instance. @see addParameter(const Parameter p) =item KineticLaw::createLocalParameter Creates a new LocalParameter object, adds it to this KineticLaw's list of local parameters, and returns the LocalParameter object created. C doc_use_localparam_in_l3 @return a new LocalParameter object instance. @see addLocalParameter(const LocalParameter p) =item KineticLaw::getListOfParameters Returns the list of parameters in this KineticLaw object. C doc_use_param_in_l2 @return the list of Parameters for this KineticLaw. =item KineticLaw::getListOfParameters Returns the list of parameters in this KineticLaw object. C doc_use_param_in_l2 @return the list of Parameters for this KineticLaw. =item KineticLaw::getListOfLocalParameters Returns the list of local parameters in this KineticLaw object. C doc_use_localparam_in_l3 @return the list of LocalParameters for this KineticLaw. =item KineticLaw::getListOfLocalParameters Returns the list of local parameters in this KineticLaw object. C doc_use_localparam_in_l3 @return the list of LocalParameters for this KineticLaw. =item KineticLaw::getParameter Returns the nth Parameter object in the list of parameters in this KineticLaw instance. C doc_use_param_in_l2 @param n the index of the Parameter object sought. @return the nth Parameter of this KineticLaw. If the index C is invalid, C is returned. =item KineticLaw::getParameter Returns the nth Parameter object in the list of parameters in this KineticLaw instance. C doc_use_param_in_l2 @param n the index of the Parameter object sought. @return the nth Parameter of this KineticLaw. If the index C is invalid, C is returned. =item KineticLaw::getLocalParameter Returns the nth LocalParameter object in the list of local parameters in this KineticLaw instance. C doc_use_localparam_in_l3 @param n the index of the LocalParameter object sought. @return the nth LocalParameter of this KineticLaw. If the index C is invalid, C is returned. =item KineticLaw::getLocalParameter Returns the nth LocalParameter object in the list of local parameters in this KineticLaw instance. C doc_use_localparam_in_l3 @param n the index of the LocalParameter object sought. @return the nth LocalParameter of this KineticLaw. If the index C is invalid, C is returned. =item KineticLaw::getParameter Returns a parameter based on its identifier. C doc_use_param_in_l2 @param sid the identifier of the Parameter being sought. @return the Parameter object in this KineticLaw instace having the given "id", or C if no such Parameter exists. =item KineticLaw::getParameter Returns a parameter based on its identifier. C doc_use_param_in_l2 @param sid the identifier of the Parameter being sought. @return the Parameter object in this KineticLaw instace having the given "id", or C if no such Parameter exists. =item KineticLaw::getLocalParameter Returns a local parameter based on its identifier. C doc_use_localparam_in_l3 @param sid the identifier of the LocalParameter being sought. @return the LocalParameter object in this KineticLaw instace having the given "id", or C if no such LocalParameter exists. =item KineticLaw::getLocalParameter Returns a local parameter based on its identifier. C doc_use_localparam_in_l3 @param sid the identifier of the LocalParameter being sought. @return the LocalParameter object in this KineticLaw instace having the given "id", or C if no such LocalParameter exists. =item KineticLaw::getNumParameters Returns the number of parameters in this KineticLaw instance. C doc_use_param_in_l2 @return the number of Parameters in this KineticLaw. =item KineticLaw::getNumLocalParameters Returns the number of local parameters in this KineticLaw instance. C doc_use_localparam_in_l3 @return the number of LocalParameters in this KineticLaw. =item KineticLaw::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this KineticLaw. C doc_kineticlaw_units C doc_note_unit_inference_depends_on_model C doc_warning_kineticlaw_math_literals @return a UnitDefinition that expresses the units of the math expression of this KineticLaw, or C if one cannot be constructed. @see containsUndeclaredUnits() =item KineticLaw::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this KineticLaw. C doc_kineticlaw_units C doc_note_unit_inference_depends_on_model C doc_warning_kineticlaw_math_literals @return a UnitDefinition that expresses the units of the math expression of this KineticLaw, or C if one cannot be constructed. @see containsUndeclaredUnits() =item KineticLaw::containsUndeclaredUnits Predicate returning C if the math expression of this KineticLaw contains parameters/numbers with undeclared units. @return C if the math expression of this KineticLaw includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by @if java KineticLaw::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item KineticLaw::containsUndeclaredUnits Predicate returning C if the math expression of this KineticLaw contains parameters/numbers with undeclared units. @return C if the math expression of this KineticLaw includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by @if java KineticLaw::getDerivedUnitDefinition()@else getDerivedUnitDefinition()@endif@~ may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item KineticLaw::removeParameter Removes the nth Parameter object in the list of parameters in this KineticLaw instance and returns a pointer to it. C doc_use_param_in_l2 The caller owns the returned object and is responsible for deleting it. @param n the index of the Parameter object to remove. @return the Parameter object removed. As mentioned above, the caller owns the returned item. C is returned if the given index is out of range. =item KineticLaw::removeLocalParameter Removes the nth LocalParameter object in the list of local parameters in this KineticLaw instance and returns a pointer to it. C doc_use_localparam_in_l3 The caller owns the returned object and is responsible for deleting it. @param n the index of the LocalParameter object to remove. @return the LocalParameter object removed. As mentioned above, the caller owns the returned item. C is returned if the given index is out of range. =item KineticLaw::removeParameter Removes a Parameter object with the given identifier in the list of parameters in this KineticLaw instance and returns a pointer to it. C doc_use_param_in_l2 The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the Parameter to remove. @return the Parameter object removed. As mentioned above, the caller owns the returned object. C is returned if no Parameter object with the identifier exists in this KineticLaw instance. =item KineticLaw::removeLocalParameter Removes a LocalParameter object with the given identifier in the list of local parameters in this KineticLaw instance and returns a pointer to it. C doc_use_localparam_in_l3 The caller owns the returned object and is responsible for deleting it. @param sid the identifier of the LocalParameter to remove. @return the LocalParameter object removed. As mentioned above, the caller owns the returned object. C is returned if no LocalParameter object with the identifier exists in this KineticLaw instance. =item KineticLaw::setSBMLDocument @internal =item KineticLaw::enablePackageInternal @internal =item KineticLaw::updateSBMLNamespace @internal =item KineticLaw::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_KINETIC_LAW SBML_KINETIC_LAW@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item KineticLaw::getElementName Returns the XML element name of this object, which for Species, is always C<"kineticLaw">. @return the name of this element, i.e., C<"kineticLaw">. =item KineticLaw::getElementPosition @internal =item KineticLaw::writeElements @internal =item KineticLaw::hasRequiredAttributes Predicate returning C if all the required attributes for this KineticLaw object have been set. The required attributes for a KineticLaw object are: @li "formula" (SBML Level 1 only) @return C if the required attributes have been set, C otherwise. =item KineticLaw::hasRequiredElements Predicate returning C if all the required elements for this KineticLaw object have been set. @note The required elements for a KineticLaw object are: @li "math" inSBML Level 2 and Level 3 Version 1. (In SBML Level 3 Version 2+, it is no longer required.) @return a boolean value indicating whether all the required elements for this object have been defined. =item KineticLaw::removeFromParentAndDelete Finds this KineticLaw's Reaction parent and calls unsetKineticLaw() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item KineticLaw::renameSIdRefs C doc_renamesidref_common =item KineticLaw::renameUnitSIdRefs C doc_renameunitsidref_common =item KineticLaw::getInternalId @internal =item KineticLaw::setInternalId @internal =item KineticLaw::replaceSIDWithFunction @internal =item KineticLaw::divideAssignmentsToSIdByFunction @internal =item KineticLaw::multiplyAssignmentsToSIdByFunction @internal =item KineticLaw::createObject @internal =item KineticLaw::readOtherXML @internal =item KineticLaw::addExpectedAttributes @internal =item KineticLaw::readAttributes @internal =item KineticLaw::readL1Attributes @internal =item KineticLaw::readL2Attributes @internal =item KineticLaw::readL3Attributes @internal =item KineticLaw::writeAttributes @internal =back =head2 SimpleSpeciesReference @sbmlpackage{core} @htmlinclude pkg-marker-core.html Abstract class for references to species in reactions. As mentioned in the description of Reaction, every species that enters into a given reaction must appear in that reaction's lists of reactants, products and/or modifiers. In an SBML model, all species that may participate in any reaction are listed in the "listOfSpecies" element of the top-level Model object. Lists of products, reactants and modifiers in Reaction objects do not introduce new species, but rather, they refer back to those listed in the model's top-level "listOfSpecies". For reactants and products, the connection is made using SpeciesReference objects; for modifiers, it is made using ModifierSpeciesReference objects. SimpleSpeciesReference is an abstract type that serves as the parent class of both SpeciesReference and ModifierSpeciesReference. It is used simply to hold the attributes and elements that are common to the latter two structures. The SimpleSpeciesReference structure has a mandatory attribute, "species", which must be a text string conforming to the identifer syntax permitted in SBML. This attribute is inherited by the SpeciesReference and ModifierSpeciesReference subclasses derived from SimpleSpeciesReference. The value of the "species" attribute must be the identifier of a species defined in the enclosing Model. The species is thereby declared as participating in the reaction being defined. The precise role of that species as a reactant, product, or modifier in the reaction is determined by the subclass of SimpleSpeciesReference (i.e., either SpeciesReference or ModifierSpeciesReference) in which the identifier appears. SimpleSpeciesReference also contains an optional attribute, "id", allowing instances to be referenced from other structures. No SBML structures currently do this; however, such structures are anticipated in future SBML Levels. =over =item SimpleSpeciesReference::SimpleSpeciesReference Creates a new SimpleSpeciesReference using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this SimpleSpeciesReference. @param version an unsigned int, the SBML Version to assign to this SimpleSpeciesReference. C doc_throw_exception_lv C doc_note_setting_lv =item SimpleSpeciesReference::SimpleSpeciesReference Copy constructor; creates a copy of this SimpleSpeciesReference. @param orig the object to copy. =item SimpleSpeciesReference::accept @internal =item SimpleSpeciesReference::getId Returns the value of the "id" attribute of this SimpleSpeciesReference. @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() function instead. C doc_id_attribute @return the id of this SimpleSpeciesReference. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item SimpleSpeciesReference::getName Returns the value of the "name" attribute of this SimpleSpeciesReference object. C doc_get_name =item SimpleSpeciesReference::getSpecies Get the value of the "species" attribute. @return the value of the attribute "species" for this SimpleSpeciesReference. =item SimpleSpeciesReference::isSetId Predicate returning C if this SimpleSpeciesReference's "id" attribute is set. C doc_isset_id =item SimpleSpeciesReference::isSetName Predicate returning C if this SimpleSpeciesReference's "name" attribute is set. C doc_isset_name =item SimpleSpeciesReference::isSetSpecies Predicate returning C if this SimpleSpeciesReference's "species" attribute is set. @return C if the "species" attribute of this SimpleSpeciesReference is set, C otherwise. =item SimpleSpeciesReference::setSpecies Sets the "species" attribute of this SimpleSpeciesReference. The identifier string passed in C is copied. @param sid the identifier of a species defined in the enclosing Model's ListOfSpecies. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item SimpleSpeciesReference::setId Sets the value of the "id" attribute of this SimpleSpeciesReference. C doc_set_id =item SimpleSpeciesReference::setName Sets the value of the "name" attribute of this SimpleSpeciesReference. C doc_set_name =item SimpleSpeciesReference::unsetId Unsets the value of the "id" attribute of this SimpleSpeciesReference. C doc_unset_id =item SimpleSpeciesReference::unsetName Unsets the value of the "name" attribute of this SimpleSpeciesReference. C doc_unset_name =item SimpleSpeciesReference::unsetSpecies Unsets the value of the "species" attribute of this SimpleSpeciesReference. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item SimpleSpeciesReference::isModifier Predicate returning C if this is a ModifierSpeciesReference. @return C if this SimpleSpeciesReference's subclass is ModiferSpeciesReference, C if it is a plain SpeciesReference. =item SimpleSpeciesReference::renameSIdRefs C doc_renamesidref_common =item SimpleSpeciesReference::hasRequiredAttributes @internal =item SimpleSpeciesReference::SimpleSpeciesReference @internal =item SimpleSpeciesReference::addExpectedAttributes @internal =item SimpleSpeciesReference::readAttributes @internal =item SimpleSpeciesReference::readL1Attributes @internal =item SimpleSpeciesReference::readL2Attributes @internal =item SimpleSpeciesReference::readL3Attributes @internal =item SimpleSpeciesReference::writeAttributes @internal =back =head2 SpeciesReference @sbmlpackage{core} @htmlinclude pkg-marker-core.html A reference to an SBML species in a reaction. The Reaction structure provides a way to express which species act as reactants and which species act as products in a reaction. In a given reaction, references to those species acting as reactants and/or products are made using instances of SpeciesReference structures in a Reaction object's lists of reactants and products. A species can occur more than once in the lists of reactants and products of a given Reaction instance. The effective stoichiometry for a species in a reaction is the sum of the stoichiometry values given on the SpeciesReference object in the list of products minus the sum of stoichiometry values given on the SpeciesReference objects in the list of reactants. A positive value indicates the species is effectively a product and a negative value indicates the species is effectively a reactant. SBML places no restrictions on the effective stoichiometry of a species in a reaction; for example, it can be zero. In the following SBML fragment, the two reactions have the same effective stoichiometry for all their species: @verbatim @endverbatim The precise structure of SpeciesReference differs between SBML Level 2 and Level 3. We discuss the two variants in separate sections below. @section spr-l2 SpeciesReference in SBML Level 2 The mandatory "species" attribute of SpeciesReference must have as its value the identifier of an existing species defined in the enclosing Model. The species is thereby designated as a reactant or product in the reaction. Which one it is (i.e., reactant or product) is indicated by whether the SpeciesReference appears in the Reaction's "reactant" or "product" lists. Product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The "stoichiometry" attribute is of type double and should contain values greater than C<0> (false). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). When the stoichiometry is a rational number, or when it is a more complicated formula, "stoichiometryMath" must be used. The MathML expression in "stoichiometryMath" may also refer to identifiers of entities in a model (except reaction identifiers). However, the only species identifiers that can be used in "stoichiometryMath" are those referenced in the Reaction list of reactants, products and modifiers. The following is a simple example of a species reference for species C, with stoichiometry C<2>, in a list of reactants within a reaction having the identifier C: @verbatim ... ... ... ... @endverbatim The following is a more complex example of a species reference for species X0, with a stoichiometry formula consisting of the parameter C: @verbatim ... x ... ... ... @endverbatim @section spr-l3 SpeciesReference in SBML Level 3 In Level 2's definition of a reaction, the stoichiometry attribute of a SpeciesReference is actually a combination of two factors, the standard biochemical stoichiometry and a conversion factor that may be needed to translate the units of the species quantity to the units of the reaction rate. Unfortunately, Level 2 offers no direct way of decoupling these two factors, or for explicitly indicating the units. The only way to do it in Level 2 is to use the StoichiometryMath object associated with SpeciesReferences, and to reference SBML Parameter objects from within the StoichiometryMath formula. This works because Parameter offers a way to attach units to a numerical value, but the solution is indirect and awkward for something that should be a simple matter. Moreover, the question of how to properly encode stoichiometries in SBML reactions has caused much confusion among implementors of SBML software. SBML Level 3 approaches this problem differently. It (1) extends the the use of the SpeciesReference identifier to represent the value of the "stoichiometry" attribute, (2) makes the "stoichiometry" attribute optional, (3) removes StoichiometryMath, and (4) adds a new "constant" boolean attribute on SpeciesReference. As in Level 2, the "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). A missing "stoichiometry" implies that the stoichiometry is either unknown, or to be obtained from an external source, or determined by an InitialAssignment object or other SBML construct elsewhere in the model. A species reference's stoichiometry is set by its "stoichiometry" attribute exactly once. If the SpeciesReference object's "constant" attribute has the value C, then the stoichiometry is fixed and cannot be changed except by an InitialAssignment object. These two methods of setting the stoichiometry (i.e., using "stoichiometry" directly, or using InitialAssignment) differ in that the "stoichiometry" attribute can only be set to a literal floating-point number, whereas InitialAssignment allows the value to be set using an arbitrary mathematical expression. (As an example, the approach could be used to set the stoichiometry to a rational number of the form I

    /I, where I

    and I are integers, something that is occasionally useful in the context of biochemical reaction networks.) If the species reference's "constant" attribute has the value C, the species reference's value may be overridden by an InitialAssignment or changed by AssignmentRule or AlgebraicRule, and in addition, for simulation time t > 0, it may also be changed by a RateRule or Event objects. (However, some of these constructs are mutually exclusive; see the SBML Level 3 Core specifiation for more details.) It is not an error to define "stoichiometry" on a species reference and also redefine the stoichiometry using an InitialAssignment, but the "stoichiometry" attribute in that case is ignored. The value of the "id" attribute of a SpeciesReference can be used as the content of a C<<ci>> element in MathML formulas elsewhere in the model. When the identifier appears in a MathML C<<ci>> element, it represents the stoichiometry of the corresponding species in the reaction where the SpeciesReference object instance appears. More specifically, it represents the value of the "stoichiometry" attribute on the SpeciesReference object. In SBML Level 3, the unit of measurement associated with the value of a species' stoichiometry is always considered to be C. This has the following implications: \n=over\n \n=item\n\nWhen a species reference's identifier appears in mathematical formulas elsewhere in the model, the unit associated with that value is C. \n=item\n\nThe units of the "math" elements of AssignmentRule, InitialAssignment and EventAssignment objects setting the stoichiometry of the species reference should be C. \n=item\n\nIf a species reference's identifier is the subject of a RateRule, the unit associated with the RateRule object's value should be C/time, where time is the model-wide unit of time set on the Model object. \n=back\n =over =back =head2 ListOfSpeciesReferences @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of SpeciesReference objects. C doc_what_is_listof =over =item SpeciesReference::SpeciesReference Creates a new SpeciesReference using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this SpeciesReference. @param version an unsigned int, the SBML Version to assign to this SpeciesReference. C doc_throw_exception_lv C doc_note_setting_lv =item SpeciesReference::SpeciesReference Creates a new SpeciesReference using the given SBMLNamespaces object C. @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item SpeciesReference::SpeciesReference Copy constructor; creates a copy of this SpeciesReference. @param orig the SpeciesReference instance to copy. =item SpeciesReference::accept @internal =item SpeciesReference::clone Creates and returns a deep copy of this SpeciesReference object. @return the (deep) copy of this SpeciesReference object. =item SpeciesReference::initDefaults Initializes the fields of this SpeciesReference object to "typical" default values. The SBML SpeciesReference component has slightly different aspects and default attribute values in different SBML Levels and Versions. This method sets the values to certain common defaults, based mostly on what they are in SBML Level 2. Specifically: \n=over\n \n=item\n\nSets attribute "stoichiometry" to C<1>.0 \n=item\n\n(Applies to Level 1 models only) Sets attribute "denominator" to C<1> \n=back\n @see getDenominator() @see setDenominator(int value) @see getStoichiometry() @see setStoichiometry(double value) @see getStoichiometryMath() @see setStoichiometryMath(const StoichiometryMath math) =item SpeciesReference::getStoichiometry Get the value of the "stoichiometry" attribute. In SBML Level 2, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). In SBML Level 3, there is no StoichiometryMath, and SpeciesReference objects have only the "stoichiometry" attribute. @return the value of the (scalar) "stoichiometry" attribute of this SpeciesReference. @see getStoichiometryMath() =item SpeciesReference::getStoichiometryMath Get the content of the "stoichiometryMath" subelement as an ASTNode tree. The "stoichiometryMath" element exists only in SBML Level 2. There, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). @return the content of the "stoichiometryMath" subelement of this SpeciesReference. =item SpeciesReference::getStoichiometryMath Get the content of the "stoichiometryMath" subelement as an ASTNode tree. The "stoichiometryMath" element exists only in SBML Level 2. There, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). @return the content of the "stoichiometryMath" subelement of this SpeciesReference. @see getStoichiometry() =item SpeciesReference::getDenominator Get the value of the "denominator" attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1. The "denominator" attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the "stoichiometryMath" subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode object. LibSBML will write out the appropriate constructs (either a combination of "stoichiometry" and "denominator" in the case of SBML Level 1, or a "stoichiometryMath" subelement in the case of SBML Level 2). However, as the "stoichiometryMath" subelement was removed in SBML Level 3, automatic translation of the "denominator" attribute is no longer supported for that level. @return the value of the "denominator" attribute of this SpeciesReference. =item SpeciesReference::getConstant Get the value of the "constant" attribute. @return the value of the "constant" attribute of this SpeciesReference. =item SpeciesReference::isSetStoichiometryMath Predicate returning C if this SpeciesReference's "stoichiometryMath" subelement is set @return C if the "stoichiometryMath" subelement of this SpeciesReference is set, C otherwise. =item SpeciesReference::isSetConstant Predicate returning C if this SpeciesReference's "constant" attribute is set @return C if the "constant" attribute of this SpeciesReference is set, C otherwise. =item SpeciesReference::isSetStoichiometry Predicate returning C if this SpeciesReference's "stoichiometry" attribute is set. @return C if the "stoichiometry" attribute of this SpeciesReference is set, C otherwise. =item SpeciesReference::setStoichiometry Sets the value of the "stoichiometry" attribute of this SpeciesReference. In SBML Level 2, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). In SBML Level 3, there is no StoichiometryMath, and SpeciesReference objects have only the "stoichiometry" attribute. @param value the new value of the "stoichiometry" attribute. @note In SBML Level 2, the "stoichiometryMath" subelement of this SpeciesReference object will be unset because the "stoichiometry" attribute and the stoichiometryMath" subelement are mutually exclusive. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SpeciesReference::setStoichiometryMath Sets the "stoichiometryMath" subelement of this SpeciesReference. The Abstract Syntax Tree in C is copied. In SBML Level 2, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). In SBML Level 3, there is no StoichiometryMath, and SpeciesReference objects have only the "stoichiometry" attribute. @param math the StoichiometryMath expression that is to be copied as the content of the "stoichiometryMath" subelement. @note In SBML Level 2, the "stoichiometry" attribute of this SpeciesReference object will be unset (isSetStoichiometry() will return C although getStoichiometry() will return C<1>.0) if the given math is not null because the "stoichiometry" attribute and the stoichiometryMath" subelement are mutually exclusive. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink =item SpeciesReference::setDenominator Set the value of the "denominator" attribute, for the case of a rational-numbered stoichiometry or a model in SBML Level 1. The "denominator" attribute is only actually written out in the case of an SBML Level 1 model. In SBML Level 2, rational-number stoichiometries are written as MathML elements in the "stoichiometryMath" subelement. However, as a convenience to users, libSBML allows the creation and manipulation of rational-number stoichiometries by supplying the numerator and denominator directly rather than having to manually create an ASTNode object. LibSBML will write out the appropriate constructs (either a combination of "stoichiometry" and "denominator" in the case of SBML Level 1, or a "stoichiometryMath" subelement in the case of SBML Level 2). However, as the "stoichiometryMath" subelement was removed in SBML Level 3, automatic translation of the "denominator" attribute is no longer supported for that level. @param value the scalar value. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item SpeciesReference::setConstant Sets the "constant" attribute of this SpeciesReference to the given boolean C. @param flag a boolean, the value for the "constant" attribute of this SpeciesReference instance. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item SpeciesReference::unsetStoichiometryMath Unsets the "stoichiometryMath" subelement of this SpeciesReference. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink In SBML Level 2, product and reactant stoichiometries can be specified using either "stoichiometry" or "stoichiometryMath" in a SpeciesReference object. The former is to be used when a stoichiometry is simply a scalar number, while the latter is for occasions when it needs to be a rational number or it needs to reference other mathematical expressions. The "stoichiometry" attribute is of type C and should contain values greater than zero (C<0>). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the SpeciesReference instance defaults to C<1>. For maximum interoperability between different software tools, the "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). In SBML Level 3, there is no StoichiometryMath, and SpeciesReference objects have only the "stoichiometry" attribute. @note In SBML Level 2, the "stoichiometry" attribute of this SpeciesReference object will be reset to a default value (C<1>.0) if the "stoichiometry" attribute has not been set. =item SpeciesReference::unsetStoichiometry Unsets the "stoichiometry" attribute of this SpeciesReference. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note In SBML Level 1, the "stoichiometry" attribute of this SpeciesReference object will be just reset to a default value (C<1>.0) and isSetStoichiometry() will still return C. In SBML Level 2, the "stoichiometry" attribute of this object will be unset (which will result in isSetStoichiometry() returning C, although getStoichiometry() will return C<1>.0) if the "stoichiometryMath" subelement is set, otherwise the attribute will be just reset to the default value (C<1>.0) (and isSetStoichiometry() will still return C). In SBML Level 3, the "stoichiometry" attribute of this object will be set to C and isSetStoichiometry() will return C. =item SpeciesReference::unsetConstant Unsets the "constant" attribute of this SpeciesReference. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item SpeciesReference::createStoichiometryMath Creates a new, empty StoichiometryMath object, adds it to this SpeciesReference, and returns it. @return the newly created StoichiometryMath object instance. @note This function has no effect on SBML Level 1 or Level 3 SpeciesReference objects, neither of which have StoichiometryMath children. @see Reaction::addReactant(const SpeciesReference sr) @see Reaction::addProduct(const SpeciesReference sr) =item SpeciesReference::setAnnotation Sets the value of the "annotation" subelement of this SBML object to a copy of C. Any existing content of the "annotation" subelement is discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the C that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use appendAnnotation(). @param annotation an XML structure that is to be used as the content of the "annotation" subelement of this object. C doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) =item SpeciesReference::setAnnotation Sets the value of the "annotation" subelement of this SBML object to a copy of C. Any existing content of the "annotation" subelement is discarded. Unless you have taken steps to first copy and reconstitute any existing annotations into the C that is about to be assigned, it is likely that performing such wholesale replacement is unfriendly towards other software applications whose annotations are discarded. An alternative may be to use appendAnnotation(). @param annotation an XML string that is to be used as the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see appendAnnotation(const XMLNode annotation) @see appendAnnotation(const std::string& annotation) =item SpeciesReference::appendAnnotation Appends annotation content to any existing content in the "annotation" subelement of this object. The content in C is copied. Unlike SpeciesReference::setAnnotation(@if java String@endif), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML structure that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see setAnnotation(const std::string& annotation) @see setAnnotation(const XMLNode annotation) =item SpeciesReference::appendAnnotation Appends annotation content to any existing content in the "annotation" subelement of this object. The content in C is copied. Unlike SpeciesReference::setAnnotation(@if java String@endif), this method allows other annotations to be preserved when an application adds its own data. @param annotation an XML string that is to be copied and appended to the content of the "annotation" subelement of this object. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see setAnnotation(const std::string& annotation) @see setAnnotation(const XMLNode annotation) =item SpeciesReference::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_SPECIES_REFERENCE SBML_SPECIES_REFERENCE@endlink (default). @see getElementName() @see getPackageName() =item SpeciesReference::getElementName Returns the XML element name of this object, which for SpeciesReference, is always C<"speciesReference">. @return the name of this element, i.e., C<"speciesReference">. =item SpeciesReference::writeElements @internal =item SpeciesReference::sortMath @internal =item SpeciesReference::hasRequiredAttributes Predicate returning C if all the required attributes for this SpeciesReference object have been set. The required attributes for a SpeciesReference object are: @li "species" @li "constant" (only available SBML Level 3) @return C if the required attributes have been set, C otherwise. =item SpeciesReference::createObject @internal =item SpeciesReference::readOtherXML @internal =item SpeciesReference::addExpectedAttributes @internal =item SpeciesReference::readAttributes @internal =item SpeciesReference::readL1Attributes @internal =item SpeciesReference::readL2Attributes @internal =item SpeciesReference::readL3Attributes @internal =item SpeciesReference::writeAttributes @internal =item SpeciesReference::syncAnnotation @internal =item SpeciesReference::isExplicitlySetStoichiometry @internal =item SpeciesReference::isExplicitlySetDenominator @internal =item ListOfSpeciesReferences::ListOfSpeciesReferences Creates a new, empty ListOfSpeciesReferences object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfSpeciesReferences::ListOfSpeciesReferences Creates a new ListOfSpeciesReferences object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfSpeciesReferences object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfSpeciesReferences::clone Creates and returns a deep copy of this ListOfSpeciesReferences object. @return the (deep) copy of this ListOfSpeciesReferences object. =item ListOfSpeciesReferences::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., SpeciesReference objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for objects contained in this list: @link SBMLTypeCode_t#SBML_SPECIES_REFERENCE SBML_SPECIES_REFERENCE@endlink (default). @see getElementName() @see getPackageName() =item ListOfSpeciesReferences::getElementName Returns the XML element name of this object. For ListOfSpeciesReferences, the XML element name is C<"listOfSpeciesReferences">. @return the name of this element, i.e., C<"listOfSpeciesReferences">. =item ListOfSpeciesReferences::get Get a SpeciesReference from the ListOfSpeciesReferences. @param n the index number of the SpeciesReference to get. @return the nth SpeciesReference in this ListOfSpeciesReferences. If the index C is invalid, C is returned. @see size() =item ListOfSpeciesReferences::get Get a SpeciesReference from the ListOfSpeciesReferences. @param n the index number of the SpeciesReference to get. @return the nth SpeciesReference in this ListOfSpeciesReferences. If the index C is invalid, C is returned. @see size() =item ListOfSpeciesReferences::get Get a SpeciesReference from the ListOfSpeciesReferences based on its identifier. @param sid a string representing the identifier of the SpeciesReference to get. @return SpeciesReference in this ListOfSpeciesReferences with the given C or C if no such SpeciesReference exists. @see get(unsigned int n) @see size() =item ListOfSpeciesReferences::get Get a SpeciesReference from the ListOfSpeciesReferences based on its identifier. @param sid a string representing the identifier of the SpeciesReference to get. @return SpeciesReference in this ListOfSpeciesReferences with the given C or C if no such SpeciesReference exists. @see get(unsigned int n) @see size() =item ListOfSpeciesReferences::remove Removes the nth item from this ListOfSpeciesReferences items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfSpeciesReferences::remove Removes item in this ListOfSpeciesReferences items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then C is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfSpeciesReferences::getElementPosition @internal =item ListOfSpeciesReferences::getType @internal =item ListOfSpeciesReferences::setType @internal =item ListOfSpeciesReferences::createObject @internal =back =head2 ModifierSpeciesReference @sbmlpackage{core} @htmlinclude pkg-marker-core.html A reference to an SBML modifier species. Sometimes a species appears in the kinetic rate formula of a reaction but is itself neither created nor destroyed in that reaction (for example, because it acts as a catalyst or inhibitor). In SBML, all such species are simply called I without regard to the detailed role of those species in the model. The Reaction structure provides a way to express which species act as modifiers in a given reaction. This is the purpose of the list of modifiers available in Reaction. The list contains instances of ModifierSpeciesReference structures. The ModifierSpeciesReference structure inherits the mandatory attribute "species" and optional attributes "id" and "name" from the parent class SimpleSpeciesReference. See the description of SimpleSpeciesReference for more information about these. The value of the "species" attribute must be the identifier of a species defined in the enclosing Model; this species is designated as a modifier for the current reaction. A reaction may have any number of modifiers. It is permissible for a modifier species to appear simultaneously in the list of reactants and products of the same reaction where it is designated as a modifier, as well as to appear in the list of reactants, products and modifiers of other reactions in the model. =over =item ModifierSpeciesReference::ModifierSpeciesReference Creates a new ModifierSpeciesReference using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this ModifierSpeciesReference. @param version an unsigned int, the SBML Version to assign to this ModifierSpeciesReference. C doc_throw_exception_lv C doc_note_setting_lv =item ModifierSpeciesReference::ModifierSpeciesReference Creates a new ModifierSpeciesReference using the given SBMLNamespaces object C. @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item ModifierSpeciesReference::accept @internal =item ModifierSpeciesReference::clone Creates and returns a deep copy of this ModifierSpeciesReference object. @return the (deep) copy of this ModifierSpeciesReference object. =item ModifierSpeciesReference::getTypeCode Returns the libSBML type code for this SBML object. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_MODIFIER_SPECIES_REFERENCE SBML_MODIFIER_SPECIES_REFERENCE@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item ModifierSpeciesReference::getElementName Returns the XML element name of this object, which for Species, is always C<"modifierSpeciesReference">. @return the name of this element, i.e., C<"modifierSpeciesReference">. =item ModifierSpeciesReference::hasRequiredAttributes Predicate returning C if all the required attributes for this ModifierSpeciesReference object have been set. The required attributes for a ModifierSpeciesReference object are: species @return C if the required attributes have been set, C otherwise. =back =head2 Event @sbmlpackage{core} @htmlinclude pkg-marker-core.html A discontinuous SBML event. An SBML Event object defines when the event can occur, the variables that are affected by it, how the variables are affected, and the event's relationship to other events. The effect of the event can optionally be delayed after the occurrence of the condition which invokes it. The operation of Event is divided into two phases (even when the event is not delayed): one when the event is I, and the other when the event is I. Trigger objects define the conditions for triggering an event, Delay objects define when the event is actually executed, EventAssignment objects define the effects of executing the event, and (in SBML Level 3) Priority objects influence the order of EventAssignment performance in cases of simultaneous events. Please consult the descriptions of Trigger, Delay, EventAssignment and Priority for more information. @section event-version-diffs SBML Level/Version differences @subsection sbml-l2 SBML Level 2 In SBML Level 2 versions before Version 4, the semantics of Event time delays were defined such that the expressions in the event's assignments were always evaluated at the time the event was triggered. This definition made it difficult to define an event whose assignment formulas were meant to be evaluated at the time the event was executed (i.e., after the time period defined by the value of the Delay element, or after any other simultaneous event may have been executed and changed the model state). In SBML Level 2 Version 4 and in Level 3, the attribute "useValuesFromTriggerTime" on Event was added to allow a model to indicate the time at which the event's assignments are to be calculated, whether at the moment the event is triggered (if the value of the attribute is C), or at the moment of execution (if "useValuesFromTriggerTime"=C). If the event has a delay, the "useValuesFromTriggerTime" is likely to make a significant difference in the values used in the assignment, but the possibility of simultaneous events mean that even zero-delay events can have different results depending on the value of this attribute. The definition of Event in SBML Level 2 Versions 1 and 2 includes an additional attribute called "timeUnits", which allowed the time units of the Delay to be set explicitly. Later Versions of SBML Level 2 as well as SBML Level 3 do not define this attribute. LibSBML supports this attribute for compatibility with previous versions of SBML Level 2; however, if a model in SBML Level 3 or Level 2 Versions 3–4 format sets the attribute, the consistency-checking method SBMLDocument::checkConsistency() will report an error. The attribute "useValuesFromTriggerTime" was introduced in SBML Level 2 Version 4. Models defined in prior Versions of SBML Level 2 cannot use this attribute, and SBMLDocument::checkConsistency() will report an error if they do. @subsection sbml-l3 SBML Level 3 SBML Level 3 introduces several changes to the structure and components of Events compared to SBML Level 2. These changes fall into two main categories: changes to what is optional or required, and additions of new attributes and elements. \n=over\n \n=item\n\nThe attribute "useValuesFromTriggerTime" on Event is mandatory (it was optional in Level 2 and had a default value of C); \n=item\n\nEvent's "listOfEventAssignments" element (of class ListOfEventAssignments) is optional (it was mandatory in Level 2); \n=item\n\nEvent's "priority" element (of class Priority) is new in Level 3; and \n=item\n\nThe Trigger object gains new mandatory attributes (described as part of the definition of Trigger). \n=item\n\nIn SBML Level 3 Version 2, the Trigger object became optional. An Event with no Trigger will simply not fire. \n=back\n The changes to the attributes of Event are described below; the changes to Trigger and Priority are described in their respective sections. @section semantics Semantics of events in SBML Level 3 Version 1 The detailed semantics of events are described in the specification documents for each SBML Level/Version. Here we include the description from the SBML Level 1 Version 1. Any transition of a Trigger object's "math" formula from the value C to C will cause the enclosing Event object to trigger. Such a transition is not possible at the very start of a simulation (i.e., at time t = 0) unless the Trigger object's "initialValue" attribute has a value of C; this defines the value of the trigger formula to be C immediately prior to the start of simulation, thereby giving it the potential to change in value from C to C when the formula is evaluated at t = 0. If "initialValue"=C, then the trigger expression cannot transition from C to C at t = 0 but may do so at some time t E 0. Consider an Event object definition E with delay d in which the Trigger object's "math" formula makes a transition in value from C to C at times t1 and t2. The EventAssignment within the Event object will have effect at t1 + d and t2 + d irrespective of the relative times of t1 and t2. For example, events can "overlap" so that t1 E t2 < t1 + d still causes an event assignments to occur at t1 + d and t2 + d. It is entirely possible for two events to be executed simultaneously, and it is possible for events to trigger other events (i.e., an event assignment can cause an event to trigger). This leads to several points: \n=over\n \n=item\n\nA software package should retest all event triggers after executing an event assignment in order to account for the possibility that the assignment causes another event trigger to transition from C to C. This check should be made after each individual Event object's execution, even when several events are to be executed simultaneously. \n=item\n\nAny Event object whose Trigger "persistent" attribute has the value C must have its trigger expression reevaluated continuously between when the event is triggered and when it is executed. If its trigger expression ever evaluates to C, it must be removed from the queue of events pending execution and treated as any other event whose trigger expression evaluates to C. \n=item\n\nAlthough the precise time at which events are executed is not resolved beyond the given execution point in simulated time, it is assumed that the order in which the events occur is resolved. This order can be significant in determining the overall outcome of a given simulation. When an event X triggers another event Y and event Y has zero delay, then event Y is added to the existing set of simultaneous events that are pending execution. Events X and Y form a cascade of events at the same point in simulation time. An event such as Y may have a special priority if it contains a Priority subobject. \n=item\n\nAll events in a model are open to being in a cascade. The position of an event in the event queue does not affect whether it can be in the cascade: event Y can be triggered whether it is before or after X in the queue of events pending execution. A cascade of events can be potentially infinite (never terminate); when this occurs a simulator should indicate this has occurred---it is incorrect for a simulator to break a cascade arbitrarily and continue the simulation without at least indicating that the infinite cascade occurred. \n=item\n\nSimultaneous events having no defined priorities are executed in an undefined order. This does not mean that the behavior of the simulation is completely undefined; merely that the order of execution of these particular events is undefined. A given simulator may use any algorithm to choose an order as long as every event is executed exactly once. \n=item\n\nEvents with defined priorities are executed in the order implied by their Priority "math" formula values, with events having higher priorities being executed ahead of events with lower priorities, and events with identical priorities being executed in a random order with respect to one another (as determined at run-time by some random algorithm equivalent to coin-flipping). Newly-triggered events that are to be executed immediately (i.e., if they define no delays) should be inserted into the queue of events pending execution according to their priorities: events with higher priority values value must be inserted ahead of events with lower priority values and after any pending events with even higher priorities, and inserted randomly among pending events with the same priority values. Events without Priority objects must be inserted into the queue in some fashion, but the algorithm used to place it in the queue is undefined. Similarly, there is no restriction on the order of a newly-inserted event with a defined Priority with respect to any other pending Event without a defined Priority. \n=item\n\nA model variable that is the target of one or more event assignments can change more than once when simultaneous events are processed at some time point t. The model's behavior (output) for such a variable is the value of the variable at the end of processing all the simultaneous events at time t. \n=back\n @section l3v2_restrictions Restrictions relaxed in SBML Level 3 Version 2 In SBML Level 3 Version 2, several restrictions were lifted that have the potential to affect the semantics of an Event: \n=over\n \n=item\n\nThe Trigger subobject of an Event is optional. If missing, an Event is never I, unless an alternate triggering scheme is introduced by an SBML Level 3 package. \n=item\n\nThe "math" subelements of an Event Trigger, Delay, Priority, and EventAssignment are all optional. If any of these elements lack a "math" subelement, and that information is not supplied in an SBML Level 3 package, it is mathematically equivalent to the Trigger, Delay, Priority, or EventAssignment not being present at all. \n=item\n\nThe ListOfEventAssignments may be empty, which is mathematically equivalent to the Event not having a ListOfEventAssignments at all. \n=item\n\nAny "math" subelement may return a Boolean or a numeric value in any context. If a numeric value is used in a Boolean context, a "0" is interpreted as C, and all other values are interpreted as C. If a Boolean value is used in a numeric context, a C is interpreted as a 1, and a C is interpreted as a 0. This means (for example) that a Trigger value that changes from 0.0 to anything else is equivalent to changing from C to C. \n=back\n @see Trigger @see Priority @see Delay @see EventAssignment =over =back =head2 ListOfEvents @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of Event objects. C doc_what_is_listof =over =item Event::Event Creates a new Event using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Event. @param version an unsigned int, the SBML Version to assign to this Event. C doc_throw_exception_lv C doc_note_setting_lv =item Event::Event Creates a new Event using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Event::Event Copy constructor; creates a copy of this Event. @param orig the object to copy. =item Event::accept @internal =item Event::clone Creates and returns a deep copy of this Event object. @return the (deep) copy of this Event object. =item Event::initDefaults Initializes the fields of this Event object to "typical" default values. The SBML Event component has slightly different aspects and default attribute values in different SBML Levels and Versions. This method sets the values to certain common defaults, based mostly on what they are in SBML Level 2. Specifically: @li Sets attribute "useValuesFromTriggerTime" to C =item Event::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item Event::getElementByMetaId Returns the first child element it can find with the given C, or C if no such object is found. @param metaid string representing the metaid of the object to find. @return pointer to the first element found with the given C. =item Event::getAllElements Returns a List of all child SBase objects, including those nested to an arbitrary depth. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item Event::getId Returns the value of the "id" attribute of this Event. @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() function instead. C doc_id_attribute @return the id of this Event. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() =item Event::getName Returns the value of the "name" attribute of this Event. C doc_get_name =item Event::getTrigger Get the event trigger portion of this Event. @return the Trigger object of this Event, or C if the trigger is not set. =item Event::getTrigger Get the event trigger portion of this Event. @return the Trigger object of this Event. =item Event::getDelay Get the assignment delay portion of this Event, if there is one. @return the delay of this Event if one is defined, or C if none is defined. =item Event::getDelay Get the assignment delay portion of this Event, if there is one. @return the delay of this Event if one is defined, or C if none is defined. =item Event::getPriority (SBML Level 3 only) Get the event priority portion of this Event. @return the Priority object of this Event, or C if the Priority has not been set. @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::getPriority (SBML Level 3 only) Get the event priority portion of this Event. @return the Priority object of this Event, or C if the Priority has not been set. @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::getTimeUnits Get the value of the "timeUnits" attribute of this Event, if it has one. @return the value of the attribute "timeUnits" as a string. C doc_warning_event_timeUnits =item Event::getUseValuesFromTriggerTime Get the value of the "useValuesFromTriggerTime" attribute of this Event. C doc_event_using_useValuesFromTriggerTime @return the value of the attribute "useValuesFromTriggerTime" as a boolean. C doc_warning_useValuesFromTriggerTime =item Event::isSetId Predicate returning C if this Event's "id" attribute is set. C doc_isset_id =item Event::isSetName Predicate returning C if this Event's "name" attribute is set. C doc_isset_name =item Event::isSetTrigger Predicate for testing whether the trigger for this Event is set. @return C if the trigger of this Event is set, C otherwise. =item Event::isSetDelay Predicate for testing whether the delay for this Event is set. @return C if the delay of this Event is set, C otherwise. =item Event::isSetPriority (SBML Level 3 only) Predicate for testing whether the priority for this Event is set. @return C if the priority of this Event is set, C otherwise. @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::isSetTimeUnits Predicate for testing whether the "timeUnits" attribute of this Event is set. @return C if the "timeUnits" attribute of this Event is set, C otherwise. C doc_warning_event_timeUnits =item Event::isSetUseValuesFromTriggerTime Predicate for testing whether the "useValuesFromTriggerTime" attribute of this Event is set. @return C if the "useValuesFromTriggerTime" attribute of this Event is set, C otherwise. @note In SBML Level 2, this attribute is optional and has a default value of C, whereas in Level 3, this optional is mandatory and has no default value. =item Event::setId Sets the value of the "id" attribute of this Event. C doc_set_id =item Event::setName Sets the value of the "name" attribute of this Event. C doc_set_name =item Event::setTrigger Sets the trigger definition of this Event to a copy of the given Trigger object instance. @param trigger the Trigger object instance to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink =item Event::setDelay Sets the delay definition of this Event to a copy of the given Delay object instance. @param delay the Delay object instance to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink =item Event::setPriority (SBML Level 3 only) Sets the priority definition of this Event to a copy of the given Priority object instance. @param priority the Priority object instance to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::setTimeUnits Sets the "timeUnits" attribute of this Event to a copy of C. @param sid the identifier of the time units to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_event_timeUnits =item Event::setUseValuesFromTriggerTime Sets the "useValuesFromTriggerTime" attribute of this Event to a C. C doc_event_using_useValuesFromTriggerTime @param value the value of useValuesFromTriggerTime to use. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink C doc_warning_useValuesFromTriggerTime =item Event::unsetId Unsets the value of the "id" attribute of this Event. C doc_unset_id =item Event::unsetName Unsets the value of the "name" attribute of this Event. C doc_unset_name =item Event::unsetUseValuesFromTriggerTime Unsets the value of the "useValuesFromTriggerTime" attribute of this Event. C doc_event_using_useValuesFromTriggerTime C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_warning_useValuesFromTriggerTime =item Event::unsetDelay Unsets the Delay of this Event. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Event::unsetPriority (SBML Level 3 only) Unsets the Priority of this Event. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::unsetTrigger Unsets the Trigger of this Event. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::unsetTimeUnits Unsets the "timeUnits" attribute of this Event. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_warning_event_timeUnits =item Event::addEventAssignment Appends a copy of the given EventAssignment to this Event. @param ea the EventAssignment object to add. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_LEVEL_MISMATCH LIBSBML_LEVEL_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_VERSION_MISMATCH LIBSBML_VERSION_MISMATCH@endlink @li @link OperationReturnValues_t#LIBSBML_DUPLICATE_OBJECT_ID LIBSBML_DUPLICATE_OBJECT_ID@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C doc_note_object_is_copied @see createEventAssignment() =item Event::createEventAssignment Creates a new, empty EventAssignment, adds it to this Event's list of event assignments and returns the EventAssignment. @return the newly created EventAssignment object instance. @see addEventAssignment(const EventAssignment ea) =item Event::createTrigger Creates a new, empty Trigger, adds it to this Event and returns the Trigger. @return the newly created Trigger object instance. =item Event::createDelay Creates a new, empty Delay, adds it to this Event and returns the Delay. @return the newly created Delay object instance. =item Event::createPriority (SBML Level 3 only) Creates a new, empty Priority, adds it to this Event and returns the Priority. @return the newly created Priority object instance, or C if the SBML level and version used for this Event does not define Priority children. @note The element "priority" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Event::getListOfEventAssignments Returns the list of event assignments for this Event. @return the list of EventAssignments for this Event. =item Event::getListOfEventAssignments Returns the list of event assignments for this Event. @return the list of EventAssignments for this Event. =item Event::getEventAssignment Return a specific EventAssignment object of this Event. @param n an integer, the index of the EventAssignment object to return. @return the Cth EventAssignment of this Event. =item Event::getEventAssignment Return a specific EventAssignment object of this Event. @param n an integer, the index of the EventAssignment object to return. @return the Cth EventAssignment of this Event. =item Event::getEventAssignment Return the event assignment indicated by the given C. @param variable a string, the identifier of the variable whose EventAssignment is being sought. @return the EventAssignment for the given C, or C if no such EventAssignment exists. =item Event::getEventAssignment Return the event assignment indicated by the given C. @param variable a string, the identifier of the variable whose EventAssignment is being sought. @return the EventAssignment for the given C, or C if no such EventAssignment exists. =item Event::getNumEventAssignments Returns the number of EventAssignment objects attached to this Event. @return the number of EventAssignments in this Event. =item Event::removeEventAssignment Removes the nth EventAssignment object from this Event object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. @param n the index of the EventAssignment object to remove. @return the EventAssignment object removed. As mentioned above, the caller owns the returned item. C is returned if the given index is out of range. =item Event::removeEventAssignment Removes the EventAssignment object with the given "variable" attribute from this Event object and returns a pointer to it. The caller owns the returned object and is responsible for deleting it. If none of the EventAssignment objects in this Event object have the "variable" attribute C, then C is returned. @param variable the "variable" attribute of the EventAssignment object to remove. @return the EventAssignment object removed. As mentioned above, the caller owns the returned object. C is returned if no EventAssignment object with the "variable" attribute exists in this Event object. =item Event::setSBMLDocument @internal =item Event::enablePackageInternal @internal =item Event::updateSBMLNamespace @internal =item Event::getTypeCode Returns the libSBML type code of this object instance. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_EVENT SBML_EVENT@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Event::getElementName Returns the XML element name of this object, which for Event, is always C<"event">. @return the name of this element, i.e., C<"event">. =item Event::writeElements @internal =item Event::hasRequiredAttributes Predicate returning C if all the required attributes for this Event object have been set. The required attributes for an Event object are: @li "useValuesfromTriggerTime" (required in SBML Level 3) @return C if the required attributes have been set, C otherwise. =item Event::hasRequiredElements Predicate returning C if all the required elements for this Event object have been set. @note The required elements for an Event object are: @li "trigger" (required in SBML Level 2 and Level 3 Version 1; optional in SBML Level 3 Version 2+ @li "listOfEventAssignments" (required in SBML Level 2; optional in Level 3) =item Event::getInternalId @internal =item Event::setInternalId @internal =item Event::createObject @internal =item Event::addExpectedAttributes @internal =item Event::readAttributes @internal =item Event::readL2Attributes @internal =item Event::readL3Attributes @internal =item Event::writeAttributes @internal =item ListOfEvents::ListOfEvents Creates a new ListOfEvents object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfEvents::ListOfEvents Creates a new ListOfEvents object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfEvents object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfEvents::clone Creates and returns a deep copy of this ListOfEvents object. @return the (deep) copy of this ListOfEvents object. =item ListOfEvents::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., Event objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for the objects contained in this ListOf: @link SBMLTypeCode_t#SBML_EVENT SBML_EVENT@endlink (default). @see getElementName() @see getPackageName() =item ListOfEvents::getElementName Returns the XML element name of this object. For ListOfEvents, the XML element name is C<"listOfEvents">. @return the name of this element, i.e., C<"listOfEvents">. =item ListOfEvents::get Get an Event from the ListOfEvents. @param n the index number of the Event to get. @return the Cth Event in this ListOfEvents. @see size() =item ListOfEvents::get Get an Event from the ListOfEvents. @param n the index number of the Event to get. @return the Cth Event in this ListOfEvents. @see size() =item ListOfEvents::get Get an Event from the ListOfEvents based on its identifier. @param sid a string representing the identifier of the Event to get. @return Event in this ListOfEvents with the given C or C if no such Event exists. @see get(unsigned int n) @see size() =item ListOfEvents::get Get an Event from the ListOfEvents based on its identifier. @param sid a string representing the identifier of the Event to get. @return Event in this ListOfEvents with the given C or C if no such Event exists. @see get(unsigned int n) @see size() =item ListOfEvents::remove Removes the nth item from this ListOfEvents items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfEvents::remove Removes item in this ListOfEvents items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then C is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfEvents::getElementPosition @internal =item ListOfEvents::createObject @internal =back =head2 EventAssignment @sbmlpackage{core} @htmlinclude pkg-marker-core.html An assignment to a variable by an SBML event. Event contains an optional element called "listOfEventAssignments", of class ListOfEventAssignments. In every instance of an event definition in a model, the object's "listOfEventAssignments" element must have a non-empty list of one or more "eventAssignment" elements of class EventAssignment. The object class EventAssignment has one required attribute, "variable", and a required element, "math". Being derived from SBase, it also has all the usual attributes and elements of its parent class. An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The purpose of the EventAssignment object class is to define how variables are affected by an Event. In SBML Level 2, every Event object instance must have a nonempty list of event assignments; in SBML Level 3, the list of assignments is optional. The operation of an Event is divided into two phases (regardless of whether a delay is involved): one phase when the event is I, and the other when the event is I. EventAssignment objects are interpreted when an event is executed. The effects are described below. @section event-variable The attribute "variable" The EventAssignment attribute "variable" must be the identifier of an existing Compartment, Species, SpeciesReference, or Parameter instance defined in the model. In SBML Level 3 Version 2, this list was expanded to include identifiers of SBML Level 3 package variables that have both mathematical meaning and the ability to be assigned. When the event is executed, the value of the model component identified by "variable" is changed by the EventAssignment to the value computed by the "math" element; that is, a species' quantity, species reference's stoichiometry, compartment's size or parameter's value are reset to the value computed by "math". Certain restrictions are placed on what can appear in "variable": \n=over\n \n=item\n\nThe object identified by the value of the EventAssignment attribute "variable" must not have its "constant" attribute set to or default to C. (Constants cannot be affected by events.) \n=item\n\nThe "variable" attribute must not contain the identifier of a reaction. In SBML Level 2 and SBML Level 3 Version 1, only species, species references, compartment and parameter values may be set by an Event. In SBML Level 3 Version 2, the "variable" attribute may also be the identifier of an SBML Level 3 package element with mathematical meaning and the ability to be assigned a value. This situation may only arise if the SBML package is present in the SBML document with a package:required attribute of C \n=item\n\nThe value of every "variable" attribute must be unique among the set of EventAssignment structures within a given Event structure. In other words, a single event cannot have multiple EventAssignment objects assigning the same variable. (All of them would be performed at the same time when that particular Event triggers, resulting in indeterminacy.) However, I Event instances can refer to the same variable. \n=item\n\nA variable cannot be assigned a value in an EventAssignment object instance and also be assigned a value by an AssignmentRule; i.e., the value of an EventAssignment's "variable" attribute cannot be the same as the value of a AssignmentRule' "variable" attribute. (Assignment rules hold at all times, therefore it would be inconsistent to also define an event that reassigns the value of the same variable.) \n=back\n If the variable attribute of an EventAssignment object references an object in an SBML namespace that is not understood by the interpreter reading a given SBML document (that is, if the object is defined by an SBML Level 3 package that the software does not support), the event assignment must be ignored--the object's value will not need to be set, as the interpreter could not understand that package. If an interpreter cannot establish whether a referenced object is missing from the model or instead is defined in an SBML namespace not understood by the interpreter, it may produce a warning to the user. (The latter situation may only arise if an SBML package is present in the SBML document with a package:required attribute of "true".) Note that the time of assignment of the object identified by the value of the "variable" attribute is always the time at which the Event is executed, not when it is triggered. The timing is controlled by the optional Delay in an Event. The time of assignment is not affected by the "useValuesFromTriggerTime" attribute on Event---that attribute affects the time at which the EventAssignment's "math" expression is I. In other words, SBML allows decoupling the time at which the "variable" is assigned from the time at which its value expression is calculated. @section event-math The "math" subelement in an EventAssignment The MathML expression contained in an EventAssignment defines the new value of the variable being assigned by the Event. As mentioned above, the time at which the expression in "math" is evaluated is determined by the attribute "useValuesFromTriggerTime" on Event. If the attribute value is C, the expression must be evaluated when the event is I; more precisely, the values of identifiers occurring in MathML C<<ci>> elements in the EventAssignment's "math" expression are the values they have at the point when the event I. If, instead, "useValuesFromTriggerTime"'s value is C, it means the values at I time should be used; that is, the values of identifiers occurring in MathML C<<ci>> elements in the EventAssignment's "math" expression are the values they have at the point when the event I. @section eventassignment-version-diffs SBML Level/Version differences Between Version 4 and previous versions of SBML Level 2, the requirements regarding the matching of units between an EvengAssignment's formula and the units of the object identified by the "variable" attribute changed. Previous versions required consistency, but in SBML Level 2 Version 4 and in SBML Level 3, unit consistency is only I. More precisely: \n=over\n \n=item\n\nIn the case of a species, an EventAssignment sets the referenced species' quantity (concentration or amount of substance) to the value determined by the formula in the EventAssignment's "math" subelement. The units of the "math" formula should (in SBML Level 2 Version 4 and in Level 3) or must (in previous Versions of Level 2) be identical to the units of the species. \n=item\n\n(SBML Level 3 only.) In the case of a species reference, an EventAssignment sets the stoichiometry of the reactant or product referenced by the SpeciesReference object to the value determined by the formula in the "math" element. The unit associated with the value produced by the "math" formula should be C, because reactant and product stoichiometries in reactions are dimensionless quantities. \n=item\n\nIn the case of a compartment, an EventAssignment sets the referenced compartment's size to the size determined by the formula in the "math" subelement of the EventAssignment. The overall units of the formula should (in SBML Level 2 Version 4 and in Level 3) or must (in previous Versions of Level 2) be identical to the units specified for the size of the compartment identified by the EventAssignment's "variable" attribute. \n=item\n\nIn the case of a parameter, an EventAssignment sets the referenced parameter's value to that determined by the formula in "math". The overall units of the formula should (in SBML Level 2 Version 4 and Level 3) or must (in previous Versions of Level 2) be identical to the units defined for the parameter. \n=item\n\n(For SBML Level 3 Version 2 only) In the case of an object from an SBML Level 3 package, an EventAssignment sets the referenced object's value (as defined by that package) to the value of the formula in "math". The unit of measurement associated with the value produced by the formula should be the same as that object's units attribute value (if it has such an attribute), or be equal to the units of model components of that type (if objects of that class are defined by the package as having the same units). \n=back\n Note that the formula placed in the "math" element has no assumed units. The consistency of the units of the formula, and the units of the entity which the assignment affects, must be explicitly established just as in the case of the value of the Delay subelement. An approach similar to the one discussed in the context of Delay may be used for the formula of an EventAssignment. @section event-asnt-restrictions Restrictions relaxed in SBML Level 3 Version 2 In SBML Level 3 Version 2, the requirement that an EventAssignment have a "math" subelement was relaxed, making it optional. In this case, the EventAssignment remains undefined, and unless that information is provided in some other form (such as with an SBML Level 3 package), the Event behaves as if it had no EventAssignment. @see Event =over =back =head2 ListOfEventAssignments @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of EventAssignment objects. C doc_what_is_listof =over =item EventAssignment::EventAssignment Creates a new EventAssignment using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this EventAssignment. @param version an unsigned int, the SBML Version to assign to this EventAssignment. C doc_throw_exception_lv C doc_note_setting_lv =item EventAssignment::EventAssignment Creates a new EventAssignment using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item EventAssignment::EventAssignment Copy constructor; creates a copy of this EventAssignment. @param orig the object to copy. =item EventAssignment::accept @internal =item EventAssignment::clone Creates and returns a deep copy of this EventAssignment object. @return the (deep) copy of this EventAssignment object. =item EventAssignment::getVariable Get the value of this EventAssignment's "variable" attribute. @return the identifier stored in the "variable" attribute of this EventAssignment. =item EventAssignment::getMath Get the mathematical expression in this EventAssignment's "math" subelement. @return the top ASTNode of an abstract syntax tree representing the mathematical formula in this EventAssignment, or C if the math is not set. =item EventAssignment::isSetVariable Predicate for testing whether the attribute "variable" of this EventAssignment is set. @return C if the "variable" attribute of this EventAssignment is set, C otherwise. =item EventAssignment::isSetMath Predicate for testing whether the "math" subelement of this EventAssignment is set. @return C if this EventAssignment has a "math" subelement, C otherwise. =item EventAssignment::setVariable Sets the attribute "variable" of this EventAssignment to a copy of the given identifier string. @param sid the identifier of an element defined in this model that can vary over time. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item EventAssignment::unsetVariable Unsets the attribute "variable" of this EventAssignment. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item EventAssignment::setMath Sets the "math" subelement of this EventAssignment to a copy of the given ASTNode. @param math an ASTNode that will be copied and stored as the mathematical formula for this EventAssignment. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item EventAssignment::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this EventAssignment. C doc_eventassignment_units C doc_note_unit_inference_depends_on_model C doc_warning_eventassignment_math_literals @return a UnitDefinition that expresses the units of the math expression of this EventAssignment, or C if one cannot be constructed. @see containsUndeclaredUnits() =item EventAssignment::getDerivedUnitDefinition Calculates and returns a UnitDefinition that expresses the units of measurement assumed for the "math" expression of this EventAssignment. C doc_eventassignment_units C doc_note_unit_inference_depends_on_model C doc_warning_eventassignment_math_literals @return a UnitDefinition that expresses the units of the math expression of this EventAssignment, or C if one cannot be constructed. @see containsUndeclaredUnits() =item EventAssignment::containsUndeclaredUnits Predicate returning C if the math expression of this EventAssignment contains literal numbers or parameters with undeclared units. C doc_eventassignment_units If the expression contains literal numbers or parameters with undeclared units, libSBML may not be able to compute the full units of the expression and will only return what it can compute. Callers should always use containsUndeclaredUnits() when using getDerivedUnitDefinition() to decide whether the returned units may be incomplete. @return C if the math expression of this EventAssignment includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item EventAssignment::containsUndeclaredUnits Predicate returning C if the math expression of this EventAssignment contains literal numbers or parameters with undeclared units. C doc_eventassignment_units If the expression contains literal numbers or parameters with undeclared units, libSBML may not be able to compute the full units of the expression and will only return what it can compute. Callers should always use containsUndeclaredUnits() when using getDerivedUnitDefinition() to decide whether the returned units may be incomplete. @return C if the math expression of this EventAssignment exists and includes parameters/numbers with undeclared units, C otherwise. @note A return value of C indicates that the UnitDefinition returned by getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item EventAssignment::getTypeCode Returns the libSBML type code of this object instance. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_EVENT_ASSIGNMENT SBML_EVENT_ASSIGNMENT@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item EventAssignment::getElementName Returns the XML element name of this object, which for EventAssignment, is always C<"eventAssignment">. @return the name of this element, i.e., C<"eventAssignment">. =item EventAssignment::writeElements @internal =item EventAssignment::hasRequiredAttributes Predicate returning C if all the required attributes for this EventAssignment object have been set. The required attributes for a EventAssignment object are: @li "variable" @return C if the required attributes have been set, C otherwise. =item EventAssignment::hasRequiredElements Predicate returning C if all the required elements for this EventAssignment object have been set. @note The required elements for an EventAssignment object are: @li "math" in SBML Level 2 and Level 3 Version 1. (In SBML Level 3 Version 2+, it is no longer required.) @return a boolean value indicating whether all the required elements for this object have been defined. =item EventAssignment::getId Returns the value of the "variable" attribute of this EventAssignment (NOT the "id"). @note Because of the inconsistent behavior of this function with respect to assignments and rules, it is now recommended to use the getIdAttribute() or getVariable() instead. The "variable" attribute of an EventAssignment indicates the element which the results of the "math" are to be applied upon Event execution. @return the variable of this EventAssignment. @see getIdAttribute() @see setIdAttribute(const std::string& sid) @see isSetIdAttribute() @see unsetIdAttribute() @see getVariable() =item EventAssignment::renameSIdRefs C doc_renamesidref_common =item EventAssignment::renameUnitSIdRefs C doc_renameunitsidref_common =item EventAssignment::replaceSIDWithFunction @internal =item EventAssignment::divideAssignmentsToSIdByFunction @internal =item EventAssignment::multiplyAssignmentsToSIdByFunction @internal =item EventAssignment::readOtherXML @internal =item EventAssignment::addExpectedAttributes @internal =item EventAssignment::readAttributes @internal =item EventAssignment::readL2Attributes @internal =item EventAssignment::readL3Attributes @internal =item EventAssignment::writeAttributes @internal =item ListOfEventAssignments::ListOfEventAssignments Creates a new ListOfEventAssignments object. The object is constructed such that it is valid for the given SBML Level and Version combination. @param level the SBML Level. @param version the Version within the SBML Level. C doc_throw_exception_lv C doc_note_setting_lv =item ListOfEventAssignments::ListOfEventAssignments Creates a new ListOfEventAssignments object. The object is constructed such that it is valid for the SBML Level and Version combination determined by the SBMLNamespaces object in @p sbmlns. @param sbmlns an SBMLNamespaces object that is used to determine the characteristics of the ListOfEventAssignments object to be created. C doc_throw_exception_namespace C doc_note_setting_lv =item ListOfEventAssignments::clone Creates and returns a deep copy of this ListOfEventAssignments object. @return the (deep) copy of this ListOfEventAssignments object. =item ListOfEventAssignments::getItemTypeCode Returns the libSBML type code for the objects contained in this ListOf (i.e., EventAssignment objects, if the list is non-empty). C doc_what_are_typecodes @return the SBML type code for the objects contained in this ListOf: @link SBMLTypeCode_t#SBML_EVENT_ASSIGNMENT SBML_EVENT_ASSIGNMENT@endlink (default). @see getElementName() @see getPackageName() =item ListOfEventAssignments::getElementName Returns the XML element name of this object. For ListOfEventAssignments, the XML element name is C<"listOfEventAssignments">. @return the name of this element, i.e., C<"listOfEventAssignments">. =item ListOfEventAssignments::get Get a EventAssignment from the ListOfEventAssignments. @param n the index number of the EventAssignment to get. @return the nth EventAssignment in this ListOfEventAssignments. If the index C is invalid, C is returned. @see size() =item ListOfEventAssignments::get Get a EventAssignment from the ListOfEventAssignments. @param n the index number of the EventAssignment to get. @return the nth EventAssignment in this ListOfEventAssignments. If the index C is invalid, C is returned. @see size() =item ListOfEventAssignments::get Get a EventAssignment from the ListOfEventAssignments based on its identifier. @param sid a string representing the identifier of the EventAssignment to get. @return EventAssignment in this ListOfEventAssignments with the given C or C if no such EventAssignment exists. @see get(unsigned int n) @see size() =item ListOfEventAssignments::get Get a EventAssignment from the ListOfEventAssignments based on its identifier. @param sid a string representing the identifier of the EventAssignment to get. @return EventAssignment in this ListOfEventAssignments with the given C or C if no such EventAssignment exists. @see get(unsigned int n) @see size() =item ListOfEventAssignments::remove Removes the nth item from this ListOfEventAssignments items and returns a pointer to it. The caller owns the returned item and is responsible for deleting it. @param n the index of the item to remove. @see size() =item ListOfEventAssignments::remove Removes item in this ListOfEventAssignments items with the given identifier. The caller owns the returned item and is responsible for deleting it. If none of the items in this list have the identifier C, then C is returned. @param sid the identifier of the item to remove. @return the item removed. As mentioned above, the caller owns the returned item. =item ListOfEventAssignments::getElementBySId Returns the first child element found that has the given C in the model-wide SId namespace, or C if no such object is found. Note that EventAssignments do not actually have IDs, but the libsbml interface pretends that they do: no event assignment is returned by this function. @param id string representing the id of the object to find. @return pointer to the first element found with the given C. =item ListOfEventAssignments::getElementPosition @internal =item ListOfEventAssignments::createObject @internal =back =head2 Trigger @sbmlpackage{core} @htmlinclude pkg-marker-core.html The trigger expression for an SBML event. An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The Trigger construct in SBML is used to define a mathematical expression that determines when an Event is I. A Trigger object in SBML Level 2 and Level 3 contains one subelement named "math" containing a MathML expression. The expression is evaluated as a value of type C. The exact moment at which the expression evaluates to C is the time point when the Event is I. In SBML Level 3, Trigger has additional attributes that must be assigned values; they are discussed in a separate section below. In SBML Level 2 and SBML Level 3 Version 1, the "math" subelement is required, and it must evaluate to a C expression. In SBML Level 3 Version 2, those restrictions are relaxed: the "math" element is optional, and numeric values are allowed in Boolean contexts (a '0' is interpreted as C, and all other values are interpreted as C). If a Trigger with no "math" is present in an Event, that Event will never I, unless that missing information is included in an SBML Level 3 package. An event only I when its Trigger expression makes the transition in value from C to C. The event will also trigger at any subsequent time points when the trigger makes this transition; in other words, an event can be triggered multiple times during a simulation if its trigger condition makes the transition from C to C more than once. In SBML Level 3, the behavior at the very start of simulation (i.e., at t = 0, where t stands for time) is determined in part by the boolean flag "initialValue". This and other additional features introduced in SBML Level 3 are discussed further below. @section trigger-version-diffs Version differences SBML Level 3 Version 1 introduces two required attributes on the Trigger object: "persistent" and "initialValue". The rest of this introduction describes these two attributes. @subsection trigger-persistent The "persistent" attribute on Trigger In the interval between when an Event object triggers (i.e., its Trigger object expression transitions in value from C to C) and when its assignments are to be executed, conditions in the model may change such that the trigger expression transitions back from C to C. Should the event's assignments still be made if this happens? Answering this question is the purpose of the "persistent" attribute on Trigger. If the boolean attribute "persistent" has a value of C, then once the event is triggered, all of its assignments are always performed when the time of execution is reached. The name I is meant to evoke the idea that the trigger expression does not have to be re-checked after it triggers if "persistent"=C. Conversely, if the attribute value is C, then the trigger expression is not assumed to persist: if the expression transitions in value back to C at any time between when the event triggered and when it is to be executed, the event is no longer considered to have triggered and its assignments are not executed. (If the trigger expression transitions once more to C after that point, then the event is triggered, but this then constitutes a whole new event trigger-and-execute sequence.) The "persistent" attribute can be especially useful when Event objects contain Delay objects, but it is relevant even in a model without delays if the model contains two or more events. As explained in the introduction to this section, the operation of all events in SBML (delayed or not) is conceptually divided into two phases, triggering and execution; however, unless events have priorities associated with them, SBML does not mandate a particular ordering of event execution in the case of simultaneous events. Models with multiple events can lead to situations where the execution of one event affects another event's trigger expression value. If that other event has "persistent"=C, and its trigger expression evaluates to C before it is to be executed, the event must not be executed after all. @subsection trigger-initialvalue The "initialValue" attribute on Trigger As mentioned above, an event triggers when the mathematical expression in its Trigger object transitions in value from C to C. An unanswered question concerns what happens at the start of a simulation: can event triggers make this transition at t = 0, where t stands for time? In order to determine whether an event may trigger at t = 0, it is necessary to know what value the Trigger object's "math" expression had immediately prior to t = 0. This starting value of the trigger expression is determined by the value of the boolean attribute "initialValue". A value of C means the trigger expression is taken to have the value C immediately prior to t = 0. In that case, the trigger cannot transition in value from C to C at the moment simulation begins (because it has the value C both before and after t = 0), and can only make the transition from C to C sometime after t = 0. (To do that, it would also first have to transition to C before it could make the transition from C back to C.) Conversely, if "initialValue"=C, then the trigger expression is assumed to start with the value C, and therefore may trigger at t = 0 if the expression evaluates to C at that moment. @see Event @see Delay @see EventAssignment =over =item Trigger::Trigger Creates a new Trigger using the given SBML C and C values. @param level an unsigned int, the SBML Level to assign to this Trigger. @param version an unsigned int, the SBML Version to assign to this Trigger. C doc_throw_exception_lv C doc_note_setting_lv =item Trigger::Trigger Creates a new Trigger using the given SBMLNamespaces object C. C doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C doc_throw_exception_namespace C doc_note_setting_lv =item Trigger::Trigger Copy constructor; creates a copy of this Trigger. @param orig the object to copy. =item Trigger::accept @internal =item Trigger::clone Creates and returns a deep copy of this Trigger object. @return the (deep) copy of this Trigger object. =item Trigger::getMath Get the mathematical formula for the trigger and return it as an AST. @return the math of this Trigger, or C if the math is not set. =item Trigger::getInitialValue (SBML Level 3 only) Get the value of the "initialValue" attribute of this Trigger. @return the boolean value stored as the "initialValue" attribute value in this Trigger. @note The attribute "initialValue" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::getPersistent (SBML Level 3 only) Get the value of the "persistent" attribute of this Trigger. @return the boolean value stored as the "persistent" attribute value in this Trigger. @note The attribute "persistent" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::isSetMath Predicate to test whether the math for this trigger is set. @return C if the formula (meaning the "math" subelement) of this Trigger is set, C otherwise. =item Trigger::isSetInitialValue (SBML Level 3 only) Predicate to test whether the "initialValue" attribute for this trigger is set. @return C if the initialValue attribute of this Trigger is set, C otherwise. @note The attribute "initialValue" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::isSetPersistent (SBML Level 3 only) Predicate to test whether the "persistent" attribute for this trigger is set. @return C if the persistent attribute of this Trigger is set, C otherwise. @note The attribute "persistent" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::setMath Sets the trigger expression of this Trigger instance to a copy of the given ASTNode. @param math an ASTNode representing a formula tree. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item Trigger::setInitialValue (SBML Level 3 only) Sets the "initialValue" attribute of this Trigger instance. @param initialValue a boolean representing the initialValue to be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "initialValue" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::setPersistent (SBML Level 3 only) Sets the "persistent" attribute of this Trigger instance. @param persistent a boolean representing the persistent value to be set. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "persistent" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::unsetInitialValue (SBML Level 3 only) Unsets the "initialValue" attribute of this Trigger instance. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "initialValue" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::unsetPersistent (SBML Level 3 only) Unsets the "persistent" attribute of this Trigger instance. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @note The attribute "persistent" is available in SBML Level 3, but is not present in lower Levels of SBML. =item Trigger::getTypeCode Returns the libSBML type code of this object instance. C doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_TRIGGER SBML_TRIGGER@endlink (default). C doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item Trigger::getElementName Returns the XML element name of this object, which for Trigger, is always C<"trigger">. @return the name of this element, i.e., C<"trigger">. =item Trigger::renameSIdRefs C doc_renamesidref_common =item Trigger::renameUnitSIdRefs C doc_renameunitsidref_common =item Trigger::replaceSIDWithFunction @internal =item Trigger::getElementPosition @internal =item Trigger::writeElements @internal =item Trigger::hasRequiredElements Predicate returning C if all the required elements for this Trigger object have been set. @note The required elements for a Trigger object are: @li "math" inSBML Level 2 and Level 3 Version 1. (In SBML Level 3 Version 2+, it is no longer required.) @return a boolean value indicating whether all the required elements for this object have been defined. =item Trigger::hasRequiredAttributes Predicate returning C if all the required attributes for this Trigger object have been set. The required attributes for a Trigger object are: @li "persistent" (required in SBML Level 3) @li "initialValue" (required in SBML Level 3) @return a boolean value indicating whether all the required attributes for this object have been defined. =item Trigger::removeFromParentAndDelete Finds this Trigger's Event parent and calls unsetTrigger() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. C doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item Trigger::getInternalId @internal =item Trigger::setInternalId @internal =item Trigger::readOtherXML @internal =item Trigger::addExpectedAttributes @internal =item Trigger::readAttributes @internal =item Trigger::readL2Attributes @internal =item Trigger::readL3Attributes @internal =item Trigger::writeAttributes @internal =back =head2 Delay @sbmlpackage{core} @htmlinclude pkg-marker-core.html A delay on the time of execution of an SBML event. An Event object defines when the event can occur, the variables that are affected by the event, and how the variables are affected. The effect of the event can optionally be delayed after the occurrence of the condition which invokes it. An event delay is defined using an object of class Delay. The object class Delay is derived from SBase and adds a single subelement called "math". This subelement is used to hold MathML content. The mathematical formula represented by "math" must evaluate to a numerical value. It is used as the length of time between when the event is I and when the event's assignments are actually I. If no delay is present on a given Event, a time delay of zero is assumed. The expression in "math" must be evaluated at the time the event is @em triggered. The expression must always evaluate to a nonnegative number (otherwise, a nonsensical situation could arise where an event is defined to execute before it is triggered!). @section delay-units The units of the mathematical expression in a Delay In SBML Level 2 versions before Version 4, the units of the numerical value computed by the Delay's "math" expression are @em required to be in units of time, or the model is considered to have a unit consistency error. In Level 2 Version 4 as well as SBML Level 3, this requirement is relaxed; these specifications only stipulate that the units of the numerical value computed by a Delay instance's "math" expression I match the model's units of time (meaning the definition of the C

    letter ::= 'a'..'z','A'..'Z'
    digit  ::= '0'..'9'
    idChar ::= letter | digit | '_'
    SId    ::= ( letter | '_' ) idChar 
    
    The equality of C and C-derived values in SBML is determined by an exact character sequence match; i.e., comparisons of these identifiers must be performed in a case-sensitive manner. This applies to all uses of C, C, and derived types. C doc_note_static_methods @see @if clike isValidUnitSId(std::string sid) @else SyntaxChecker::isValidUnitSId(std::string sid) @endif@~ @see @if clike isValidXMLID(std::string sid) @else SyntaxChecker::isValidXMLID(std::string sid) @endif@~ =item SyntaxChecker::isValidXMLID Returns C or C depending on whether the argument string conforms to the XML data type C. C doc_what_is_metaid This method provides programs with the ability to test explicitly that the identifier strings they create conform to the SBML identifier syntax. @param id string to be checked for conformance to the syntax of XML ID. @return C if the string is a syntactically-valid value for the XML type ID, C otherwise. @note @htmlinclude xmlid-syntax.html C doc_note_static_methods @see @if clike isValidSBMLSId(std::string sid) @else SyntaxChecker::isValidSBMLSId(std::string sid) @endif@~ @see @if clike isValidUnitSId(std::string sid) @else SyntaxChecker::isValidUnitSId(std::string sid) @endif@~ =item SyntaxChecker::isValidXMLanyURI Returns C or C depending on whether the C argument string conforms to the XML data type C. Type anyURI is defined by XML Schema 1.0. It is a character string data type whose values are interpretable as URIs (Universal Resource Identifiers) as described by the W3C document RFC 3986. LibSBML does not provide an explicit XML C data type; it uses ordinary character strings, which is easier for applications to support. LibSBML does, however, test for anyURI validity at various times, such as when reading in models from files and data streams. This method provides programs with the ability to test explicitly that the strings they create conform to the XML anyURI syntax. @param uri string to be checked for conformance to the syntax of anyURI. @return C if the string is a syntactically-valid value for the XML type anyURI, C otherwise. C doc_note_static_methods =item SyntaxChecker::isValidUnitSId Returns C or C depending on whether the argument string conforms to the syntax of SBML unit identifiers. In SBML, the identifiers of units (of both the predefined units and user-defined units) must conform to a data type called C in the SBML specifications. LibSBML does not provide an explicit C data type; it uses ordinary character strings, which is easier for applications to support. LibSBML does, however, test for identifier validity at various times, such as when reading in models from files and data streams. This method provides programs with the ability to test explicitly that the identifier strings they create conform to the SBML identifier syntax. @param units string to be checked for conformance to SBML unit identifier syntax. @return C if the string conforms to type SBML data type C, C otherwise. @note @htmlinclude unitid-syntax.html C doc_note_static_methods @see @if clike isValidSBMLSId(std::string sid) @else SyntaxChecker::isValidSBMLSId(std::string sid) @endif@~ @see @if clike isValidXMLID(std::string sid) @else SyntaxChecker::isValidXMLID(std::string sid) @endif@~ =item SyntaxChecker::hasExpectedXHTMLSyntax Returns C or C depending on whether the given XMLNode object contains valid XHTML content. C doc_what_are_notes An aspect of XHTML validity is that the content is declared to be in the XML namespace for XHTML 1.0. There is more than one way in which this can be done in XML. In particular, a model might not contain the declaration within the "notes" or "message" subelement itself, but might instead place the declaration on an enclosing element and use an XML namespace prefix within the "notes" element to refer to it. In other words, the following is valid: @verbatim A Simple Mitotic Oscillator A minimal cascade model for the mitotic oscillator. ... rest of model ... @endverbatim Contrast the above with the following, self-contained version, which places the XML namespace declaration within the C<<notes>> element itself: @verbatim </head> <body> <center><h2>A Simple Mitotic Oscillator</h2></center> <p>A minimal cascade model for the mitotic oscillator.</p> </body> </html> </notes> ... rest of model ... </sbml> @endverbatim Both of the above are valid XML. The purpose of the C<sbmlns> argument to this method is to allow callers to check the validity of "notes" and "message" subelements whose XML namespace declarations have been put elsewhere in the manner illustrated above. Callers can can pass in the SBMLNamespaces object of a higher-level model component if the XMLNode object does not itself have the XML namespace declaration for XHTML 1.0. @param xhtml the XMLNode to be checked for conformance. @param sbmlns the SBMLNamespaces associated with the object. @return C<true> if the XMLNode content conforms, C<false> otherwise. C<opydetails> doc_note_static_methods @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SyntaxChecker::isValidInternalSId @internal =item SyntaxChecker::isValidInternalUnitSId @internal =item SyntaxChecker::isAllowedElement @internal =item SyntaxChecker::hasDeclaredNS @internal =item SyntaxChecker::isCorrectHTMLNode @internal =item SyntaxChecker::isUnicodeLetter @internal =item SyntaxChecker::isUnicodeDigit @internal =item SyntaxChecker::isCombiningChar @internal =item SyntaxChecker::isExtender @internal =back =head2 StoichiometryMath @sbmlpackage{core} @htmlinclude pkg-marker-core.html Stochiometry expressions in SBML Level 2 reactions. @section l2-stoichiometries Stoichiometries in SBML Level 2 In SBML Level 2, product and reactant stoichiometries can be specified using I<either> the "stoichiometry" attribute or a "stoichiometryMath" element in a SpeciesReference object. The "stoichiometry" attribute is of type C<double> and should contain values greater than zero (0). The "stoichiometryMath" element is implemented as an element containing a MathML expression. These two are mutually exclusive; only one of "stoichiometry" or "stoichiometryMath" should be defined in a given SpeciesReference instance. When neither the attribute nor the element is present, the value of "stoichiometry" in the enclosing SpeciesReference instance defaults to C<1>. For maximum interoperability, SpeciesReference's "stoichiometry" attribute should be used in preference to "stoichiometryMath" when a species' stoichiometry is a simple scalar number (integer or decimal). When the stoichiometry is a rational number, or when it is a more complicated formula, "stoichiometryMath" must be used. The MathML expression in "stoichiometryMath" may also refer to identifiers of entities in a model (except reaction identifiers). However, the only species identifiers that can be used in "stoichiometryMath" are those referenced in the enclosing Reaction's list of reactants, products and modifiers. The "stoichiometry" attribute and the "stoichiometryMath" element, when either is used, is each interpreted as a factor applied to the reaction rate to produce the rate of change of the species identified by the "species" attribute in the enclosing SpeciesReference. This is the normal interpretation of a stoichiometry, but in SBML, one additional consideration has to be taken into account. The reaction rate, which is the result of the KineticLaw's "math" element, is always in the model's I<substance> per I<time> units. However, the rate of change of the species will involve the species' I<substance> units (i.e., the units identified by the Species object's "substanceUnits" attribute), and these units may be different from the model's default I<substance> units. If the units I<are> different, the stoichiometry must incorporate a conversion factor for converting the model's I<substance> units to the species' I<substance> units. The conversion factor is assumed to be included in the scalar value of the "stoichiometry" attribute if "stoichiometry" is used. If instead "stoichiometryMath" is used, then the product of the model's "substance" units times the "stoichiometryMath" units must match the I<substance> units of the species. Note that in either case, if the species' units and the model's default I<substance> units are the same, the stoichiometry ends up being a dimensionless number and equivalent to the standard chemical stoichiometry found in textbooks. Examples and more explanations of this are given in the SBML specification. The following is a simple example of a species reference for species C<"X0">, with stoichiometry C<2>, in a list of reactants within a reaction having the identifier C<"J1">: @verbatim <model> ... <listOfReactions> <reaction id="J1"> <listOfReactants> <speciesReference species="X0" stoichiometry="2"> </listOfReactants> ... </reaction> ... </listOfReactions> ... </model> @endverbatim The following is a more complex example of a species reference for species C<"X0">, with a stoichiometry formula consisting of a rational number: @verbatim <model> ... <listOfReactions> <reaction id="J1"> <listOfReactants> <speciesReference species="X0"> <stoichiometryMath> <math xmlns="http://www.w3.org/1998/Math/MathML"> <cn type="rational"> 3 <sep/> 2 </cn> </math> </stoichiometryMath> </speciesReference> </listOfReactants> ... </reaction> ... </listOfReactions> ... </model> @endverbatim Additional discussions of stoichiometries and implications for species and reactions are included in the documentation of SpeciesReference class. @section l3-stoichiometries Stoichiometries in SBML Level 3 The StoichiometryMath construct is not defined in SBML Level 3. Instead, Level 3 defines the identifier of SpeciesReference objects as a stand-in for the stoichiometry of the reactant or product being referenced, and allows that identifier to be used elsewhere in SBML models, including (for example) InitialAssignment objects. This makes it possible to achieve the same effect as StoichiometryMath, but with other SBML objects. For instance, to produce a stoichiometry value that is a rational number, a model can use InitialAssignment to assign the identifier of a SpeciesReference object to a MathML expression evaluating to a rational number. This is analogous to the same way that, in Level 2, the model would use StoichiometryMath with a MathML expression evaluating to a rational number. In SBML Level 2, the stoichiometry of a reactant or product is a combination of both a <em>biochemical stoichiometry</em> (meaning, the standard stoichiometry of a species in a reaction) and any necessary unit conversion factors. The introduction of an explicit attribute on the Species object for a conversion factor allows Level 3 to avoid having to overload the meaning of stoichiometry. In Level 3, the stoichiometry given by a SpeciesReference object in a reaction is a "proper" biochemical stoichiometry, meaning a dimensionless number free of unit conversions. @see SpeciesReference @see Reaction =over =item StoichiometryMath::StoichiometryMath Creates a new StoichiometryMath object using the given SBML C<level> values. @param level an unsigned int, the SBML Level to assign to this StoichiometryMath. @param version an unsigned int, the SBML Version to assign to this StoichiometryMath. C<opydetails> doc_throw_exception_lv C<opydetails> doc_note_stoichiometrymath_availability C<opydetails> doc_note_setting_lv =item StoichiometryMath::StoichiometryMath Creates a new StoichiometryMath object using the given SBMLNamespaces object C<sbmlns>. C<opydetails> doc_what_are_sbmlnamespaces @param sbmlns an SBMLNamespaces object. C<opydetails> doc_throw_exception_namespace C<opydetails> doc_note_stoichiometrymath_availability C<opydetails> doc_note_setting_lv =item StoichiometryMath::StoichiometryMath Copy constructor; creates a copy of this StoichiometryMath. @param orig the object to copy. =item StoichiometryMath::accept @internal =item StoichiometryMath::clone Creates and returns a deep copy of this StoichiometryMath object. @return the (deep) copy of this StoichiometryMath object. =item StoichiometryMath::getMath Retrieves the mathematical formula within this StoichiometryMath and return it as an AST. @return the math of this StoichiometryMath, or C<NULL> if the math is not set. C<opydetails> doc_note_stoichiometrymath_availability =item StoichiometryMath::isSetMath Predicate to test whether the math for this StoichiometryMath object is set. @return C<true> if the formula (meaning the C<math> subelement) of this StoichiometryMath is set, C<false> otherwise. C<opydetails> doc_note_stoichiometrymath_availability =item StoichiometryMath::setMath Sets the 'math' expression of this StoichiometryMath instance to a copy of the given ASTNode. @param math an ASTNode representing a formula tree. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink C<opydetails> doc_note_stoichiometrymath_availability =item StoichiometryMath::getDerivedUnitDefinition Calculates and returns a UnitDefinition object that expresses the units returned by the math expression in this StoichiometryMath object. The units are calculated based on the mathematical expression in the StoichiometryMath and the model quantities referenced by C<<ci>> elements used within that expression. The StoichiometryMath::getDerivedUnitDefinition() method returns the calculated units. Note that the functionality that facilitates unit analysis depends on the model as a whole. Thus, in cases where the object has not been added to a model or the model itself is incomplete, unit analysis is not possible and this method will return C<NULL>. @return a UnitDefinition that expresses the units of the math, or C<NULL> if one cannot be constructed. @warning <span class="warning">Note that it is possible the "math" expression in the StoichiometryMath instance contains literal numbers or parameters with undeclared units. In those cases, it is not possible to calculate the units of the overall expression without making assumptions. LibSBML does not make assumptions about the units, and StoichiometryMath::getDerivedUnitDefinition() only returns the units as far as it is able to determine them. For example, in an expression <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and <em>Y</em> does not, it will return the units of <em>X</em>. When using this method, <strong>it is critical that callers also invoke the method</strong> StoichiometryMath::containsUndeclaredUnits() <strong>to determine whether this situation holds</strong>. Callers should take suitable action in those situations.</span> @see containsUndeclaredUnits() =item StoichiometryMath::getDerivedUnitDefinition Calculates and returns a UnitDefinition object that expresses the units returned by the math expression in this StoichiometryMath object. The units are calculated based on the mathematical expression in the StoichiometryMath and the model quantities referenced by C<<ci>> elements used within that expression. The StoichiometryMath::getDerivedUnitDefinition() method returns the calculated units. Note that the functionality that facilitates unit analysis depends on the model as a whole. Thus, in cases where the object has not been added to a model or the model itself is incomplete, unit analysis is not possible and this method will return C<NULL>. @return a UnitDefinition that expresses the units of the math, or C<NULL> if one cannot be constructed. @warning <span class="warning">Note that it is possible the "math" expression in the StoichiometryMath instance contains literal numbers or parameters with undeclared units. In those cases, it is not possible to calculate the units of the overall expression without making assumptions. LibSBML does not make assumptions about the units, and StoichiometryMath::getDerivedUnitDefinition() only returns the units as far as it is able to determine them. For example, in an expression <em>X + Y</em>, if <em>X</em> has unambiguously-defined units and <em>Y</em> does not, it will return the units of <em>X</em>. When using this method, <strong>it is critical that callers also invoke the method</strong> StoichiometryMath::containsUndeclaredUnits() <strong>to determine whether this situation holds</strong>. Callers should take suitable action in those situations.</span> @see containsUndeclaredUnits() =item StoichiometryMath::containsUndeclaredUnits Predicate returning C<true> if the math expression of this StoichiometryMath object contains literal numbers or parameters with undeclared units. The StoichiometryMath::getDerivedUnitDefinition() method returns what libSBML computes the units of the Stoichiometry to be, to the extent that libSBML can compute them. However, if the expression contains literal numbers or parameters with undeclared units, libSBML may not be able to compute the full units of the expression and will only return what it can compute. Callers should always use StoichiometryMath::containsUndeclaredUnits() when using StoichiometryMath::getDerivedUnitDefinition() to decide whether the returned units may be incomplete. @return C<true> if the math expression of this StoichiometryMath includes numbers/parameters with undeclared units, C<false> otherwise. @note A return value of C<true> indicates that the UnitDefinition returned by StoichiometryMath::getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item StoichiometryMath::containsUndeclaredUnits Predicate returning C<true> if the math expression of this StoichiometryMath object contains literal numbers or parameters with undeclared units. The StoichiometryMath::getDerivedUnitDefinition() method returns what libSBML computes the units of the Stoichiometry to be, to the extent that libSBML can compute them. However, if the expression contains literal numbers or parameters with undeclared units, libSBML may not be able to compute the full units of the expression and will only return what it can compute. Callers should always use StoichiometryMath::containsUndeclaredUnits() when using StoichiometryMath::getDerivedUnitDefinition() to decide whether the returned units may be incomplete. @return C<true> if the math expression of this StoichiometryMath includes numbers/parameters with undeclared units, C<false> otherwise. @note A return value of C<true> indicates that the UnitDefinition returned by StoichiometryMath::getDerivedUnitDefinition() may not accurately represent the units of the expression. @see getDerivedUnitDefinition() =item StoichiometryMath::getTypeCode Returns the libSBML type code of this object instance. C<opydetails> doc_what_are_typecodes @return the SBML type code for this object: @link SBMLTypeCode_t#SBML_STOICHIOMETRY_MATH SBML_STOICHIOMETRY_MATH@endlink (default). C<opydetails> doc_warning_typecodes_not_unique @see getElementName() @see getPackageName() =item StoichiometryMath::getElementName Returns the XML element name of this object, which for StoichiometryMath, is always C<"stoichiometryMath">. @return the name of this element, i.e., C<"stoichiometryMath">. =item StoichiometryMath::getElementPosition @internal =item StoichiometryMath::writeElements @internal =item StoichiometryMath::hasRequiredElements Predicate returning C<true> if all the required elements for this StoichiometryMath object have been set. @note The required elements for a StoichiometryMath object are: @li "math" @return a boolean value indicating whether all the required elements for this object have been defined. =item StoichiometryMath::removeFromParentAndDelete Finds this StoichiometryMath's SpeciesReference parent and calls unsetStoichiometryMath() on it, indirectly deleting itself. Overridden from the SBase function since the parent is not a ListOf. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item StoichiometryMath::renameSIdRefs C<opydoc> doc_renamesidref_common =item StoichiometryMath::renameUnitSIdRefs C<opydoc> doc_renameunitsidref_common =item StoichiometryMath::replaceSIDWithFunction @internal =item StoichiometryMath::getInternalId @internal =item StoichiometryMath::setInternalId @internal =item StoichiometryMath::readOtherXML @internal =item StoichiometryMath::addExpectedAttributes @internal =item StoichiometryMath::readAttributes @internal =item StoichiometryMath::readL2Attributes @internal =item StoichiometryMath::writeAttributes @internal =back =head2 SBMLNamespaces @sbmlpackage{core} @htmlinclude pkg-marker-core.html Set of SBML Level + Version + namespace triples. @htmlinclude not-sbml-warning.html There are differences in the definitions of components between different SBML Levels, as well as Versions within Levels. For example, the "sboTerm" attribute was not introduced until Level 2 Version 2, and then only on certain component classes; the SBML Level 2 Version 3 specification moved the "sboTerm" attribute to the SBase class, thereby allowing nearly all components to have SBO annotations. As a result of differences such as those, libSBML needs to track the SBML Level and Version of every object created. The purpose of the SBMLNamespaces object class is to make it easier to communicate SBML Level and Version data between libSBML constructors and other methods. The SBMLNamespaces object class tracks 3-tuples (triples) consisting of SBML Level, Version, and the corresponding SBML XML namespace. The plural name (SBMLNamespaces) is not a mistake, because in SBML Level 3, objects may have extensions added by Level 3 packages used by a given model and therefore may have multiple namespaces associated with them; however, until the introduction of SBML Level 3, the SBMLNamespaces object only records one SBML Level/Version/namespace combination at a time. Most constructors for SBML objects in libSBML take a SBMLNamespaces object as an argument, thereby allowing the constructor to produce the proper combination of attributes and other internal data structures for the given SBML Level and Version. =over =item SBMLNamespaces::SBMLNamespaces Creates a new SBMLNamespaces object corresponding to the given SBML C<level> and C<version>. C<opydetails> doc_sbmlnamespaces_what_is_it @param level the SBML level. @param version the SBML version. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBMLNamespaces::SBMLNamespaces (For extensions) Creates a new SBMLNamespaces object corresponding to the combination of (1) the given SBML C<level> and C<version>, and (2) the given C<package> with the C<package> C<version>. C<opydetails> doc_sbmlnamespaces_what_is_it @param level the SBML Level. @param version the SBML Version. @param pkgName the string of package name (e.g. "layout", "multi"). @param pkgVersion the package version. @param pkgPrefix the prefix of the package namespace (e.g. "layout", "multi") to be added. The package's name will be used if the given string is empty (default). @throws SBMLExtensionException if the extension module that supports the combination of the given SBML Level, SBML Version, package name, and package version has not been registered with libSBML. =item SBMLNamespaces::SBMLNamespaces Copy constructor; creates a copy of a SBMLNamespaces. @param orig the SBMLNamespaces instance to copy. =item SBMLNamespaces::clone Creates and returns a deep copy of this SBMLNamespaces object. @return the (deep) copy of this SBMLNamespaces object. =item SBMLNamespaces::getSBMLNamespaceURI Returns a string representing the SBML XML namespace for the given C<level> and C<version> of SBML. @param level the SBML level. @param version the SBML version. @return a string representing the SBML namespace that reflects the SBML Level and Version specified. C<opydetails> doc_note_static_methods =item SBMLNamespaces::getSupportedNamespaces Returns a list of all supported SBMLNamespaces in this version of libsbml. @return a list with supported SBML namespaces. C<opydetails> doc_note_static_methods =item SBMLNamespaces::freeSBMLNamespaces Frees the list of supported namespaces as generated by getSupportedNamespaces(). @param supportedNS the list to be freed. C<opydetails> doc_note_static_methods =item SBMLNamespaces::getURI Returns a string representing the SBML XML namespace of this object. @return a string representing the SBML namespace that reflects the SBML Level and Version of this object. =item SBMLNamespaces::getLevel Get the SBML Level of this SBMLNamespaces object. @return the SBML Level of this SBMLNamespaces object. =item SBMLNamespaces::getLevel Get the SBML Level of this SBMLNamespaces object. @return the SBML Level of this SBMLNamespaces object. =item SBMLNamespaces::getVersion Get the SBML Version of this SBMLNamespaces object. @return the SBML Version of this SBMLNamespaces object. =item SBMLNamespaces::getVersion Get the SBML Version of this SBMLNamespaces object. @return the SBML Version of this SBMLNamespaces object. =item SBMLNamespaces::getNamespaces Get the XML namespaces list for this SBMLNamespaces object. C<opydetails> doc_sbmlnamespaces_what_is_it @return the XML namespaces of this SBMLNamespaces object. =item SBMLNamespaces::getNamespaces Get the XML namespaces list for this SBMLNamespaces object. C<opydetails> doc_sbmlnamespaces_what_is_it @return the XML namespaces of this SBMLNamespaces object. =item SBMLNamespaces::addNamespaces Add the given XML namespaces list to the set of namespaces within this SBMLNamespaces object. The following code gives an example of how one could add the XHTML namespace to the list of namespaces recorded by the top-level C<<sbml>> element of a model. It gives the new namespace a prefix of C<html>. @if cpp C<ode{>.cpp} SBMLDocument sd; try { sd = new SBMLDocument(3, 1); } catch (SBMLConstructorException e) { // Here, have code to handle a truly exceptional situation. Candidate // causes include invalid combinations of SBML Level and Version // (impossible if hardwired as given here), running out of memory, and // unknown system exceptions. } SBMLNamespaces sn = sd->getNamespaces(); if (sn != NULL) { sn->add("http://www.w3.org/1999/xhtml", "html"); } else { // Handle another truly exceptional situation. } @endcode @endif @if java C<ode{>.java} SBMLDocument sd; try { sd = new SBMLDocument(3, 1); } catch (SBMLConstructorException e) { // Here, have code to handle a truly exceptional situation. Candidate // causes include invalid combinations of SBML Level and Version // (impossible if hardwired as given here), running out of memory, and // unknown system exceptions. } SBMLNamespaces sn = sd.getNamespaces(); if (sn != null) { sn.add("http://www.w3.org/1999/xhtml", "html"); } else { // Handle another truly exceptional situation. } @endcode @endif @if python C<ode{>.py} sbmlDoc = None try: sbmlDoc = SBMLDocument(3, 1) except ValueError: # Do something to handle exceptional situation. Candidate # causes include invalid combinations of SBML Level and Version # (impossible if hardwired as given here), running out of memory, and # unknown system exceptions. namespaces = sbmlDoc.getNamespaces() if namespaces == None: # Do something to handle case of no namespaces. status = namespaces.add("http://www.w3.org/1999/xhtml", "html") if status != LIBSBML_OPERATION_SUCCESS: # Do something to handle failure. @endcode @endif @if csharp C<ode{>.cs} SBMLDocument sd = null; try { sd = new SBMLDocument(3, 1); } catch (SBMLConstructorException e) { // Here, have code to handle a truly exceptional situation. // Candidate causes include invalid combinations of SBML // Level and Version (impossible if hardwired as given here), // running out of memory, and unknown system exceptions. } XMLNamespaces sn = sd.getNamespaces(); if (sn != null) { sn.add("http://www.w3.org/1999/xhtml", "html"); } else { // Handle another truly exceptional situation. } @endcode @endif@~ @param xmlns the XML namespaces to be added. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item SBMLNamespaces::addNamespace Add an XML namespace (a pair of URI and prefix) to the set of namespaces within this SBMLNamespaces object. @param uri the XML namespace to be added. @param prefix the prefix of the namespace to be added. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item SBMLNamespaces::removeNamespace Removes an XML namespace from the set of namespaces within this SBMLNamespaces object. @param uri the XML namespace to be added. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink =item SBMLNamespaces::addPackageNamespace Add an XML namespace (a pair of URI and prefix) of a package extension to the set of namespaces within this SBMLNamespaces object. The SBML Level and SBML Version of this object is used. @param pkgName the string of package name (e.g. "layout", "multi"). @param pkgVersion the package version. @param prefix the prefix of the package namespace to be added. The package's name will be used if the given string is empty (default). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note An XML namespace of a non-registered package extension can't be added by this function (@link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink will be returned). @see addNamespace(@if java String, String@endif) =item SBMLNamespaces::addPackageNamespaces Add the XML namespaces of package extensions in the given XMLNamespace object to the set of namespaces within this SBMLNamespaces object (Non-package XML namespaces are not added by this function). @param xmlns the XML namespaces to be added. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note XML namespaces of a non-registered package extensions are not added (just ignored) by this function. @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink will be returned if the given xmlns is C<NULL>. =item SBMLNamespaces::removePackageNamespace Removes an XML namespace of a package extension from the set of namespaces within this SBMLNamespaces object. @param level the SBML level. @param version the SBML version. @param pkgName the string of package name (e.g. "layout", "multi"). @param pkgVersion the package version. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink =item SBMLNamespaces::addPkgNamespace @internal =item SBMLNamespaces::addPkgNamespaces @internal =item SBMLNamespaces::removePkgNamespace @internal =item SBMLNamespaces::isSBMLNamespace Predicate returning C<true> if the given URL is one of SBML XML namespaces. @param uri the URI of namespace. @return C<true> if the "uri" is one of SBML namespaces, C<false> otherwise. C<opydetails> doc_note_static_methods =item SBMLNamespaces::isValidCombination Predicate returning C<true> if the given set of namespaces represent a valid set @return C<true> if the set of namespaces is valid, C<false> otherwise. =item SBMLNamespaces::setLevel @internal =item SBMLNamespaces::setVersion @internal =item SBMLNamespaces::setNamespaces @internal =item SBMLNamespaces::getPackageName Returns the name of the main package for this namespace. @return the name of the main package for this namespace. "core" will be returned if this namespace is defined in the SBML core. =item SBMLNamespaces::initSBMLNamespace @internal =back =head2 SBMLTransforms @sbmlpackage{core} @htmlinclude pkg-marker-core.html Methods for transform elements of SBML @internal =over =item SBMLTransforms::replaceFD @internal =item SBMLTransforms::replaceFD @internal =item SBMLTransforms::expandInitialAssignments @internal =item SBMLTransforms::evaluateASTNode @internal =item SBMLTransforms::expandL3V2InitialAssignments @internal =back =head2 SBMLConstructorException @sbmlpackage{core} @htmlinclude pkg-marker-core.html Exceptions thrown by some libSBML constructors. In some situations, constructors for SBML objects may need to indicate to callers that the creation of the object failed. The failure may be for different reasons, such as an attempt to use invalid parameters or a system condition such as a memory error. To communicate this to callers, those classes will throw an SBMLConstructorException. In languages that don't have an exception mechanism (e.g., C), the constructors generally try to return an error code instead of throwing an exception. =over =item SBMLConstructorException::SBMLConstructorException @internal =item SBMLConstructorException::SBMLConstructorException @internal =item SBMLConstructorException::SBMLConstructorException @internal =item SBMLConstructorException::getSBMLErrMsg Returns the message associated with this SBML exception. @return the message string. =back =head2 ConversionOption @sbmlpackage{core} @htmlinclude pkg-marker-core.html A single configuration setting for an SBML converter. @htmlinclude libsbml-facility-only-warning.html LibSBML provides a number of converters that can perform transformations on SBML documents. These converters allow their behaviors to be controlled by setting property values. Converter properties are communicated using objects of class ConversionProperties, and within such objects, individual options are encapsulated using ConversionOption objects. A ConversionOption @if conly structure @else object@endif@~ consists of four parts: @li A I<key>, acting as the name of the option. @li A I<value> of this option. @li A I<type> for the value; the type code is chosen from @if clike an enumeration @else a set of integer constants@endif@~ whose names all begin with the prefix C<CNV_TYPE_>. (See the separate <a class="el" href="#ConversionOptionType_t">subsection</a> below for more information.) @li A I<description> consisting of a text string that describes the option in some way. There are no constraints on the values of keys or descriptions; authors of SBML converters are free to choose them as they see fit. @section ConversionOptionType_t Conversion option data types An option in ConversionOption must have a data type declared, to indicate whether it is a string value, an integer, and so forth. The possible types of values are taken from @if clike the enumeration #ConversionOptionType_t @else a set of constants whose symbol names begin with the prefix C<CNV_TYPE_>@endif. The following are the possible values: <p> <center> <table width="90%" cellspacing="1" cellpadding="1" border="0" class="normal-font"> <tr style="background: lightgray" class="normal-font"> <td><strong>Enumerator</strong></td> <td><strong>Meaning</strong></td> </tr> <tr> <td>C<@link ConversionOptionType_t#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink></td> <td>Indicates the value type is a Boolean.</td> </tr> <tr> <td>C<@link ConversionOptionType_t#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink></td> <td>Indicates the value type is a double-sized float.</td> </tr> <tr> <td>C<@link ConversionOptionType_t#CNV_TYPE_INT CNV_TYPE_INT@endlink></td> <td>Indicates the value type is an integer.</td> </tr> <tr> <td>C<@link ConversionOptionType_t#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink></td> <td>Indicates the value type is a float.</td> </tr> <tr> <td>C<@link ConversionOptionType_t#CNV_TYPE_STRING CNV_TYPE_STRING@endlink></td> <td>Indicates the value type is a string.</td> </tr> </table> </center> @see ConversionProperties =over =item ConversionOption::ConversionOption Creates a new ConversionOption. This is the general constructor, taking arguments for all aspects of an option. Other constructors exist with different arguments. C<opydetails> doc_cnv_type @param key the key for this option. @param value an optional value for this option. @param type the type of this option. @param description the description for this option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Creates a new ConversionOption specialized for string-type options. @param key the key for this option. @param value the value for this option. @param description an optional description. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Creates a new ConversionOption specialized for Boolean-type options. @param key the key for this option. @param value the value for this option. @param description an optional description. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Creates a new ConversionOption specialized for double-type options. @param key the key for this option. @param value the value for this option. @param description an optional description. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Creates a new ConversionOption specialized for float-type options. @param key the key for this option. @param value the value for this option. @param description an optional description. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Creates a new ConversionOption specialized for integer-type options. @param key the key for this option. @param value the value for this option. @param description an optional description. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionOption::ConversionOption Copy constructor; creates a copy of an ConversionOption object. @param orig the ConversionOption object to copy. =item ConversionOption::clone Creates and returns a deep copy of this ConversionOption object. @return the (deep) copy of this ConversionOption object. =item ConversionOption::getKey Returns the key for this option. @return the key, as a string. =item ConversionOption::setKey Sets the key for this option. @param key a string representing the key to set. =item ConversionOption::getValue Returns the value of this option. @return the value of this option, as a string. =item ConversionOption::setValue Sets the value for this option. @param value the value to set, as a string. =item ConversionOption::getDescription Returns the description string for this option. @return the description of this option. =item ConversionOption::setDescription Sets the description text for this option. @param description the description to set for this option. =item ConversionOption::getType Returns the type of this option @return the type of this option. =item ConversionOption::setType Sets the type of this option. C<opydetails> doc_cnv_type @param type the type value to use. =item ConversionOption::getBoolValue Returns the value of this option as a Boolean. @return the value of this option. =item ConversionOption::setBoolValue Set the value of this option to a given Boolean value. Invoking this method will also set the type of the option to @link ConversionOptionType_t#CNV_TYPE_BOOL CNV_TYPE_BOOL@endlink. @param value the Boolean value to set. =item ConversionOption::getDoubleValue Returns the value of this option as a C<double>. @return the value of this option. =item ConversionOption::setDoubleValue Set the value of this option to a given C<double> value. Invoking this method will also set the type of the option to @link ConversionOptionType_t#CNV_TYPE_DOUBLE CNV_TYPE_DOUBLE@endlink. @param value the value to set. =item ConversionOption::getFloatValue Returns the value of this option as a C<float>. @return the value of this option as a float. =item ConversionOption::setFloatValue Set the value of this option to a given C<float> value. Invoking this method will also set the type of the option to @link ConversionOptionType_t#CNV_TYPE_SINGLE CNV_TYPE_SINGLE@endlink. @param value the value to set. =item ConversionOption::getIntValue Returns the value of this option as an C<integer>. @return the value of this option, as an int. =item ConversionOption::setIntValue Set the value of this option to a given C<int> value. Invoking this method will also set the type of the option to @link ConversionOptionType_t#CNV_TYPE_INT CNV_TYPE_INT@endlink. @param value the value to set. =back =head2 ConversionProperties @sbmlpackage{core} @htmlinclude pkg-marker-core.html Set of configuration option values for a converter. @htmlinclude libsbml-facility-only-warning.html LibSBML provides a number of converters that can perform transformations on SBML documents. The properties of SBML converters are communicated using objects of class ConversionProperties, and within such objects, individual options are encapsulated using ConversionOption objects. The ConversionProperties class provides numerous methods for setting and getting options. ConversionProperties objects are also used to determine the target SBML namespace when an SBML converter's behavior depends on the intended Level+Version combination of SBML. In addition, it is conceivable that conversions may be affected by SBML Level 3 packages being used by an SBML document; consequently, the packages in use are also communicated by the values of the SBML namespaces set on a ConversionProperties object. C<opydetails> doc_section_using_sbml_converters @see ConversionOption @see SBMLNamespaces =over =item ConversionProperties::ConversionProperties Constructor that initializes the conversion properties with a specific SBML target namespace. @param targetNS the target namespace to convert to. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::ConversionProperties Copy constructor. @param orig the object to copy. =item ConversionProperties::clone Creates and returns a deep copy of this ConversionProperties object. @return the (deep) copy of this ConversionProperties object. =item ConversionProperties::getTargetNamespaces Returns the current target SBML namespace. @return the SBMLNamepaces object expressing the target namespace. =item ConversionProperties::hasTargetNamespaces Returns C<true> if the target SBML namespace has been set. @return C<true> if the target namespace has been set, C<false> otherwise. =item ConversionProperties::setTargetNamespaces Sets the target namespace. @param targetNS the target namespace to use. =item ConversionProperties::getDescription Returns the description string for a given option in this properties object. @param key the key for the option. @return the description text of the option with the given key. =item ConversionProperties::getType Returns the type of a given option in this properties object. @param key the key for the option. @return the type of the option with the given key. =item ConversionProperties::getOption Returns the ConversionOption object for a given key. @param key the key for the option. @return the option with the given key. =item ConversionProperties::getOption Returns the ConversionOption object for the given C<index>. @param index the index for the option. @return the option with the given C<index>. =item ConversionProperties::addOption Adds a copy of the given option to this properties object. @param option the option to add. =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value (optional) the value of that option. @param type (optional) the type of the option (see the documentation for ConversionOption for more information about the types). @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value the string value of that option. @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value the boolean value of that option. @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value the double value of that option. @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value the float value of that option. @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::addOption Adds a new ConversionOption object with the given parameters. @param key the key for the new option. @param value the integer value of that option. @param description (optional) the description for the option. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ConversionProperties::removeOption Removes the option with the given key from this properties object. @param key the key for the new option to remove. @return the removed option. =item ConversionProperties::hasOption Returns C<true> if this properties object contains an option with the given key. @param key the key of the option to find. @return C<true> if an option with the given C<key> exists in this properties object, C<false> otherwise. =item ConversionProperties::getValue Returns the value of the given option as a string. @param key the key for the option. @return the string value of the option with the given key. =item ConversionProperties::setValue Sets the value of the given option to a string. @param key the key for the option. @param value the new value. =item ConversionProperties::getBoolValue Returns the value of the given option as a Boolean. @param key the key for the option. @return the boolean value of the option with the given key. =item ConversionProperties::setBoolValue Sets the value of the given option to a Boolean. @param key the key for the option. @param value the new Boolean value. =item ConversionProperties::getDoubleValue Returns the value of the given option as a C<double>. @param key the key for the option. @return the double value of the option with the given key. =item ConversionProperties::setDoubleValue Sets the value of the given option to a C<double>. @param key the key for the option. @param value the new double value. =item ConversionProperties::getFloatValue Returns the value of the given option as a C<float>. @param key the key for the option. @return the float value of the option with the given key. =item ConversionProperties::setFloatValue Sets the value of the given option to a C<float>. @param key the key for the option. @param value the new float value. =item ConversionProperties::getIntValue Returns the value of the given option as an integer. @param key the key for the option. @return the int value of the option with the given key. =item ConversionProperties::setIntValue Sets the value of the given option to an integer. @param key the key for the option. @param value the new integer value. =item ConversionProperties::getNumOptions Returns the number of options in this Conversion Properties object @return the number of options in this properties object. =back =head2 SBMLConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for SBML converters. @htmlinclude libsbml-facility-only-warning.html The SBMLConverter class is the base class for the various SBML @em converters: classes of objects that transform or convert SBML documents. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. Applications can also create their own converters by subclassing SBMLConverter and following the examples of the existing converters. C<opydetails> doc_section_using_sbml_converters =over =item SBMLConverter::SBMLConverter Creates a new SBMLConverter object. =item SBMLConverter::SBMLConverter Creates a new SBMLConverter object with a given name. @param name the name for the converter to create. =item SBMLConverter::SBMLConverter Copy constructor. This creates a copy of an SBMLConverter object. @param orig the SBMLConverter object to copy. =item SBMLConverter::clone Creates and returns a deep copy of this SBMLConverter object. @return the (deep) copy of this SBMLConverter object. =item SBMLConverter::getDocument Returns the SBML document that is the subject of the conversions. @return the current SBMLDocument object. =item SBMLConverter::getDocument Returns the SBML document that is the subject of the conversions. @return the current SBMLDocument object. =item SBMLConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. The run-time properties of the converter object can be adjusted by using the method SBMLConverter::setProperties(const ConversionProperties props). @return the default properties for the converter. @see setProperties(@if java ConversionProperties@endif) @see matchesProperties(@if java ConversionProperties@endif) =item SBMLConverter::getTargetNamespaces Returns the target SBML namespaces of the currently set properties. SBML namespaces are used by libSBML to express the Level+Version of the SBML document (and, possibly, any SBML Level 3 packages in use). Some converters' behavior is affected by the SBML namespace configured in the converter. For example, in SBMLLevelVersionConverter (the converter for converting SBML documents from one Level+Version combination to another), the actions are fundamentally dependent on the SBML namespaces targeted. @return the SBMLNamespaces object that describes the SBML namespaces in effect, or C<NULL> if none are set. =item SBMLConverter::matchesProperties Returns C<true> if this converter matches the given properties. Given a ConversionProperties object C<props>, this method checks that @p props possesses an option value to enable this converter. If it does, this method returns C<true>. @param props the properties to match. @return C<true> if the properties C<props> would match the necessary properties for this type of converter, C<false> otherwise. =item SBMLConverter::setDocument Sets the SBML document to be converted. @param doc the document to use for this conversion. @return integer value indicating the success/failure of the operation. @if clike The value is drawn from the enumeration #OperationReturnValues_t. @endif@~ The set of possible values that may be returned ultimately depends on the specific subclass of SBMLConverter being used, but the default method can return the following: @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @if cpp @warning Even though the argument C<doc> is 'const', it is immediately cast to a non-const version, which is then usually changed by the converter upon a successful conversion. This variant of the setDocument() method is here solely to preserve backwards compatibility. @endif =item SBMLConverter::setDocument Sets the SBML document to be converted. @param doc the document to use for this conversion. @return integer value indicating the success/failure of the operation. @if clike The value is drawn from the enumeration #OperationReturnValues_t. @endif@~ The set of possible values that may be returned ultimately depends on the specific subclass of SBMLConverter being used, but the default method can return the following: @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SBMLConverter::setProperties Sets the configuration properties to be used by this converter. @param props the ConversionProperties object defining the properties to set. @return integer value indicating the success/failure of the operation. @if clike The value is drawn from the enumeration #OperationReturnValues_t. @endif@~ The set of possible values that may be returned ultimately depends on the specific subclass of SBMLConverter being used, but the default method can return the following values: @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getProperties() @see matchesProperties(@if java ConversionProperties@endif) =item SBMLConverter::getProperties Returns the current properties in effect for this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the current properties for this converter; in other words, the settings in effect at this moment. To change the property values, you can use SBMLConverter::setProperties(const ConversionProperties props). @return the currently set configuration properties. @see setProperties(@if java ConversionProperties@endif) @see matchesProperties(@if java ConversionProperties@endif) =item SBMLConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java const SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java const ConversionProperties@endif). @return integer value indicating the success/failure of the operation. @if clike The value is drawn from the enumeration #OperationReturnValues_t. @endif@~ The set of possible values that may be returned depends on the converter subclass; please consult the documentation for the relevant class to find out what the possibilities are. =item SBMLConverter::getName Returns the name of this converter. @return a string, the name of this converter. =back =head2 SBMLConverterRegistry @sbmlpackage{core} @htmlinclude pkg-marker-core.html Registry of all libSBML SBML converters. @htmlinclude libsbml-facility-only-warning.html LibSBML provides facilities for transforming and converting SBML documents in various ways. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. Converters are implemented as objects derived from the class SBMLConverter. The converter registry, implemented as a singleton object of class SBMLConverterRegistry, maintains a list of known converters and provides methods for discovering them. Callers can use the method SBMLConverterRegistry::getNumConverters() to find out how many converters are registered, then use SBMLConverterRegistry::getConverterByIndex(@if java int@endif) to iterate over each one; alternatively, callers can use SBMLConverterRegistry::getConverterFor(@if java const ConversionProperties@endif) to search for a converter having specific properties. =over =item SBMLConverterRegistry::getInstance Returns the singleton instance for the converter registry. Prior to using the registry, callers have to obtain a copy of the registry. This static method provides the means for doing that. @return the singleton for the converter registry. =item SBMLConverterRegistry::addConverter Adds the given converter to the registry of SBML converters. @param converter the converter to add to the registry. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item SBMLConverterRegistry::getConverterByIndex Returns the converter with the given index number. Converters are given arbitrary index numbers by the registry. Callers can use the method SBMLConverterRegistry::getNumConverters() to find out how many converters are registered, then use this method to iterate over the list and obtain each one in turn. @param index the zero-based index of the converter to fetch. @return the converter with the given index number, or C<NULL> if the number is less than C<0> or there is no converter at the given index position. =item SBMLConverterRegistry::getConverterFor Returns the converter that best matches the given configuration properties. Many converters provide the ability to configure their behavior. This is realized through the use of I<properties> that offer different @em options. The present method allows callers to search for converters that have specific property values. Callers can do this by creating a ConversionProperties object, adding the desired option(s) to the object, then passing the object to this method. @param props a ConversionProperties object defining the properties to match against. @return the converter matching the properties, or C<NULL> if no suitable converter is found. @see getConverterByIndex(@if java int@endif) =item SBMLConverterRegistry::getNumConverters Returns the number of converters known by the registry. @return the number of registered converters. @see getConverterByIndex(@if java int@endif) =item SBMLConverterRegistry::SBMLConverterRegistry @internal =back =head2 SBMLFunctionDefinitionConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter to expand user-defined functions in-line. @htmlinclude libsbml-facility-only-warning.html This converter manipulates user-defined functions in an SBML file. When invoked on a model, it performs the following operations: @li Reads the list of user-defined functions in the model (i.e., the list of FunctionDefinition objects); @li Looks for invocations of the function in mathematical expressions throughout the model; and @li For each invocation found, replaces the invocation with a in-line copy of the function's body, similar to how macro expansions might be performed in scripting and programming languages. For example, suppose the model contains a function definition representing the function C<f(x, y) = x y>. Further suppose this functions invoked somewhere else in the model, in a mathematical formula, as C<f(s, p)>. The outcome of running SBMLFunctionDefinitionConverter on the model will be to replace the call to C<f> with the expression C<s p>. @section usage Configuration and use of SBMLFunctionDefinitionConverter SBMLFunctionDefinitionConverter is enabled by creating a ConversionProperties object with the option C<"expandFunctionDefinitions">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The converter accepts one option: @li C<"skipIds">: if set, it should be a string containing a comma-separated list of identifiers (SBML "id" values) that are to be skipped during function conversion. Functions whose identifiers are found in this list will not be converted. C<opydetails> doc_section_using_sbml_converters =over =item SBMLFunctionDefinitionConverter::init @internal =item SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter Creates a new SBMLFunctionDefinitionConverter object. =item SBMLFunctionDefinitionConverter::SBMLFunctionDefinitionConverter Copy constructor; creates a copy of an SBMLFunctionDefinitionConverter object. @param obj the SBMLFunctionDefinitionConverter object to copy. =item SBMLFunctionDefinitionConverter::clone Creates and returns a deep copy of this SBMLFunctionDefinitionConverter object. @return a (deep) copy of this converter. =item SBMLFunctionDefinitionConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLFunctionDefinitionConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLFunctionDefinitionConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLFunctionDefinitionConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLFunctionDefinitionConverter::expandFD_errors @internal =back =head2 SBMLIdConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter for replacing object identifiers. @htmlinclude libsbml-facility-only-warning.html This converter translates all instances of a given identifier (i.e., SBML object "id" attribute value) of type "SId" in a Model to another identifier. It does this based on a list of source identifiers, translating each one to its corresponding replacement value in a list of replacement identifiers. It also updates all references to the identifiers so replaced. (More technically, it replaces all values known as type C<SIdRef> in the SBML Level 3 specifications.) This converter only searches the global SId namespace for the Model child of the SBMLDocument. It does not replace any IDs or SIdRefs for LocalParameters, nor does it replace any UnitSIds or UnitSIdRefs. It likewise does not replace any IDs in a new namespace introduced by a package, such as the PortSId namespace from the Hierarchical Model Composition package, nor any Model objects that are not the direct child of the SBMLDocument, such as the ModelDefinitions from the Hierarchical Model Composition package. If, however, a package introduces a new element with an "id" attribute of type SId, any attribute of type SIdRef, or child of type SIdRef (such as a new Math child of a package element), those IDs will be replaced if they match a source identifier. @section SBMLIdConverter-usage Configuration and use of SBMLIdConverter SBMLIdConverter is enabled by creating a ConversionProperties object with the option C<"renameSIds">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The converter accepts two options, and both must be set or else no conversion is performed: @li C<"currentIds">: A comma-separated list of identifiers to replace. @li C<"newIds">: A comma-separated list of identifiers to use as the replacements. The values should correspond one-to-one with the identifiers in C<"currentIds"> that should be replaced. C<opydetails> doc_section_using_sbml_converters =over =item SBMLIdConverter::init @internal =item SBMLIdConverter::SBMLIdConverter Creates a new SBMLIdConverter object. =item SBMLIdConverter::SBMLIdConverter Copy constructor; creates a copy of an SBMLIdConverter object. @param obj the SBMLIdConverter object to copy. =item SBMLIdConverter::clone Creates and returns a deep copy of this SBMLIdConverter object. @return a (deep) copy of this converter. =item SBMLIdConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLIdConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLIdConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item SBMLIdConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =back =head2 SBMLInferUnitsConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter for inferring and setting parameter units. @htmlinclude libsbml-facility-only-warning.html This SBML converter takes an SBML document and attempts to infer units for any Parameter objects whose units are undeclared. It then sets the "units" attribute of those parameters to the units inferred (if necessary, creating new UnitDefinition objects on the model in the process). @section SBMLInferUnitsConverter-usage Configuration and use of SBMLInferUnitsConverter SBMLInferUnitsConverter is enabled by creating a ConversionProperties object with the option C<"inferUnits">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The converter offers no other options. C<opydetails> doc_section_using_sbml_converters =over =item SBMLInferUnitsConverter::init @internal =item SBMLInferUnitsConverter::SBMLInferUnitsConverter Creates a new SBMLInferUnitsConverter object. =item SBMLInferUnitsConverter::SBMLInferUnitsConverter Copy constructor; creates a copy of an SBMLInferUnitsConverter object. @param obj the SBMLInferUnitsConverter object to copy. =item SBMLInferUnitsConverter::clone Creates and returns a deep copy of this SBMLInferUnitsConverter object. @return a (deep) copy of this converter. =item SBMLInferUnitsConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLInferUnitsConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLInferUnitsConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLInferUnitsConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLInferUnitsConverter::existsAlready @internal =back =head2 SBMLInitialAssignmentConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter that removes SBML <em>initial assignments</em>. @htmlinclude libsbml-facility-only-warning.html This is an SBML converter for replacing InitialAssignment objects, when possible, by setting the initial value attributes on the model objects being assigned. In other words, for every object that is the target of an initial assignment in the model, the converter evaluates the mathematical expression of the assignment to get a I<numerical> value, and then sets the corresponding attribute of the object to the value. The effects for different kinds of SBML components are as follows: <center> <table border="0" class="text-table width80 normal-font alt-row-colors"> <tr style="background: lightgray; font-size: 14px;"> <th align="left" width="200">Component</th> <th align="left">Effect</th> </tr> <tr> <td>Compartment</td> <td>Sets the value of the C<size> attribute.</td> </tr> <tr> <td>Species</td> <td>Sets the value of either the C<initialAmount> or the C<initialConcentration> attributes, depending on the value of the Species object's C<hasOnlySubstanceUnits> attribute.</td> </tr> <tr> <td>Parameter</td> <td>Sets the value of the C<value> attribute.</td> </tr> <tr> <td>SpeciesReference</td> <td>Sets the value of the C<stoichiometry> attribute in the Reaction object where the SpeciesReference object appears.</td> </tr> </table> </center> @section SBMLInitialAssignmentConverter-usage Configuration and use of SBMLInitialAssignmentConverter SBMLInitialAssignmentConverter is enabled by creating a ConversionProperties object with the option C<"expandInitialAssignments">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The converter offers no other options. C<opydetails> doc_section_using_sbml_converters =over =item SBMLInitialAssignmentConverter::init @internal =item SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter Creates a new SBMLInitialAssignmentConverter object. =item SBMLInitialAssignmentConverter::SBMLInitialAssignmentConverter Copy constructor; creates a copy of an SBMLInitialAssignmentConverter object. @param obj the SBMLInitialAssignmentConverter object to copy. =item SBMLInitialAssignmentConverter::clone Creates and returns a deep copy of this SBMLInitialAssignmentConverter object. @return a (deep) copy of this converter. =item SBMLInitialAssignmentConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLInitialAssignmentConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLInitialAssignmentConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item SBMLInitialAssignmentConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =back =head2 SBMLLevelVersionConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Whole-document SBML Level/Version converter. @htmlinclude libsbml-facility-only-warning.html This SBML converter takes an SBML document having one SBML Level+Version combination, and attempts to convert it to an SBML document having a different Level+Version combination. This class is also the basis for SBMLDocument::setLevelAndVersion(@if java long, long, boolean@endif). @section SBMLLevelVersionConverter-usage Configuration and use of SBMLLevelVersionConverter SBMLLevelVersionConverter is enabled by creating a ConversionProperties object with the option C<"setLevelAndVersion">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The target SBML Level and Version combination are determined by the value of the SBML namespace set on the ConversionProperties object (using ConversionProperties::setTargetNamespaces(SBMLNamespaces targetNS)). In addition, this converter offers the following options: @li C<"strict">: If this option has the value C<true>, then the validity of the SBML document will be strictly preserved. This means that SBML validation will be performed, and if the original model is not valid or semantics cannot be preserved in the converted model, then conversion will not be performed. Conversely, if this option is set to C<false>, model conversion will always be performed; if any errors are detected related to altered semantics, the errors will be logged in the usual way (i.e., the error log on the SBMLDocument object). @li C<"addDefaultUnits">: By default, a conversion from SBML Level 2 to Level 3 will explicitly add UnitDefinition objects and unit attributes on the Model object to define units that are implicitly defined in SBML Level 2. This is usually desirable because in SBML Level 3, there are no default units and a conversion from Level 2 that did I<not> add unit definitions would actually result in a loss of information. However, some users or software tools may not need or want this, or worse, may be fooled into thinking that libSBML has somehow inferred the proper units for model quantities. (It has not; it merely adds generic predefined units.) This option lets callers control this behavior. C<opydetails> doc_section_using_sbml_converters =over =item SBMLLevelVersionConverter::init @internal =item SBMLLevelVersionConverter::SBMLLevelVersionConverter Creates a new SBMLLevelVersionConverter object. =item SBMLLevelVersionConverter::SBMLLevelVersionConverter Copy constructor; creates a copy of an SBMLLevelVersionConverter object. @param obj the SBMLLevelVersionConverter object to copy. =item SBMLLevelVersionConverter::clone Creates and returns a deep copy of this SBMLLevelVersionConverter object. @return a (deep) copy of this converter. =item SBMLLevelVersionConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLLevelVersionConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLLevelVersionConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_TARGET_NAMESPACE LIBSBML_CONV_INVALID_TARGET_NAMESPACE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLLevelVersionConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLLevelVersionConverter::getTargetLevel Returns the target SBML Level for the conversion. @return an integer indicating the SBML Level. =item SBMLLevelVersionConverter::getTargetVersion Returns the target SBML Version for the conversion. @return an integer indicating the Version within the SBML Level. =item SBMLLevelVersionConverter::getValidityFlag Returns the flag indicating whether the conversion has been set to "strict". @return C<true> if strict validity has been requested, C<false> otherwise. =item SBMLLevelVersionConverter::getAddDefaultUnits Returns the flag indicating whether default units should be added when converting to L3 or not. @return C<true> if default units should be added, C<false> otherwise. =item SBMLLevelVersionConverter::conversion_errors @internal =item SBMLLevelVersionConverter::hasStrictUnits @internal =item SBMLLevelVersionConverter::hasStrictSBO @internal =item SBMLLevelVersionConverter::performConversion @internal =item SBMLLevelVersionConverter::updatePackages @internal =item SBMLLevelVersionConverter::validateConvertedDocument @internal =item SBMLLevelVersionConverter::has_fatal_errors @internal =item SBMLLevelVersionConverter::speciesReferenceIdUsed @internal =item SBMLLevelVersionConverter::collectSpeciesReferenceIds @internal =item SBMLLevelVersionConverter::populateMathElements @internal =back =head2 SBMLLevel1Version1Converter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Whole-document SBML Level/Version converter. @htmlinclude libsbml-facility-only-warning.html This SBML converter takes an SBML document having one SBML Level+Version combination, and attempts to convert it to an SBML document having a different Level+Version combination. This converter (SBMLLevel1Version1Converter) converts models to SBML Level 1 Version 1, to the extent possible by the limited features of that Level/Version combination of SBML. @section SBMLLevel1Version1Converter-usage Configuration and use of SBMLLevel1Version1Converter SBMLLevel1Version1Converter is enabled by creating a ConversionProperties object with the option C<"convertToL1V1">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The target SBML Level and Version combination are determined by the value of the SBML namespace set on the ConversionProperties object (using ConversionProperties::setTargetNamespaces(SBMLNamespaces targetNS)). In addition, this converter offers the following options: @li C<"changePow">: Mathematical expressions for exponentiation of the form C<pow(s1, 2)> will be converted to the expression C<s1^2>. @li C<"inlineCompartmentSizes">: Back in the days of SBML Level 1 Version 1, many software tools assumed that the "kinetic laws" of SBML were written in terms of units of <em>concentration</em>/<em>time</em>. These tools would not expect (and thus not handle) rate expressions such as C<CompartmentOfS1 k S1>. When the option C<"inlineCompartmentSizes"> is enabled, libSBML will replace the references to compartments (such as C<"CompartmentOfS1"> in this example) with their initial sizes. This is not strictly correct in all cases; in particular, if the compartment volume varies during simulation, this conversion will not reflect the expected behavior. However, many models do not have time-varying compartment sizes, so this option makes it easy to get modern SBML rate expressions into a form that old software tools may better understand. C<opydetails> doc_section_using_sbml_converters =over =item SBMLLevel1Version1Converter::init @internal =item SBMLLevel1Version1Converter::SBMLLevel1Version1Converter Creates a new SBMLLevel1Version1Converter object. =item SBMLLevel1Version1Converter::SBMLLevel1Version1Converter Copy constructor; creates a copy of an SBMLLevel1Version1Converter object. @param obj the SBMLLevel1Version1Converter object to copy. =item SBMLLevel1Version1Converter::clone Creates and returns a deep copy of this SBMLLevel1Version1Converter object. @return a (deep) copy of this converter. =item SBMLLevel1Version1Converter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLLevel1Version1Converter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLLevel1Version1Converter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_TARGET_NAMESPACE LIBSBML_CONV_INVALID_TARGET_NAMESPACE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLLevel1Version1Converter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLLevel1Version1Converter::inlineCompartmentSizes @internal =item SBMLLevel1Version1Converter::shouldChangePow @internal =back =head2 SBMLLocalParameterConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter to turn local parameters into global ones. @htmlinclude libsbml-facility-only-warning.html This converter essentially promotes local parameters to global parameters. It works by examining every Reaction object for LocalParameter objects, then creating Parameter objects on the model for each one found, and finally removing the original LocalParameter objects. It creates new identifiers for the fresh Parameter objects by concatenating the identifier of the reaction with the identifier of the original LocalParameter object. This converter can be useful for software applications that do not have the ability to handle local parameters on reactions. Such applications could check incoming models for local parameters and run those models through this converter before proceeding with other steps. @section SBMLLocalParameterConverter-usage Configuration and use of SBMLLocalParameterConverter SBMLLocalParameterConverter is enabled by creating a ConversionProperties object with the option C<"promoteLocalParameters">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). The converter offers no other options. C<opydetails> doc_section_using_sbml_converters =over =item SBMLLocalParameterConverter::init @internal =item SBMLLocalParameterConverter::SBMLLocalParameterConverter Creates a new SBMLLocalParameterConverter object. =item SBMLLocalParameterConverter::SBMLLocalParameterConverter Copy constructor; creates a copy of an SBMLLocalParameterConverter object. @param obj the SBMLLocalParameterConverter object to copy. =item SBMLLocalParameterConverter::clone Creates and returns a deep copy of this SBMLLocalParameterConverter object. @return a (deep) copy of this converter. =item SBMLLocalParameterConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLLocalParameterConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLLocalParameterConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item SBMLLocalParameterConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =back =head2 SBMLReactionConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter to replace reactions with SBML <em>rate rules</em>. @htmlinclude libsbml-facility-only-warning.html This converter will take an SBML model and replace the definitions of reactions in the model with definitions of SBML rate rules. Equivalent RateRule objects are only created for species mentioned in reactions that have KineticLaw subobjects, since those are the only reactions that have an effect on the rates of change of species in the model; however, the converter removes all Reaction objects in the model after it is done. @section SBMLReactionConverter-usage Configuration and use of SBMLReactionConverter SBMLReactionConverter is enabled by creating a ConversionProperties object with the option C<"replaceReactions">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). This converter does not offer any additional configuration options. C<opydetails> doc_section_using_sbml_converters =over =item SBMLReactionConverter::init @internal =item SBMLReactionConverter::SBMLReactionConverter Creates a new SBMLReactionConverter object. =item SBMLReactionConverter::SBMLReactionConverter Copy constructor; creates a copy of an SBMLReactionConverter object. @param obj the SBMLReactionConverter object to copy. =item SBMLReactionConverter::clone Creates and returns a deep copy of this SBMLReactionConverter object. @return a (deep) copy of this converter. =item SBMLReactionConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLReactionConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLReactionConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLReactionConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLReactionConverter::setDocument Sets the current SBML document to the given SBMLDocument object. @param doc the document to use for this conversion. @warning Even though the C<doc> is 'const', it is immediately cast to a non-const version, which is then usually changed by the converter upon a successful conversion. This function is here solely to preserve backwards compatibility. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SBMLReactionConverter::setDocument Sets the current SBML document to the given SBMLDocument object. @param doc the document to use for this conversion. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SBMLReactionConverter::createRateRuleMathForSpecies @internal =item SBMLReactionConverter::determineStoichiometryNode @internal =item SBMLReactionConverter::createRateRule @internal =item SBMLReactionConverter::replaceReactions @internal =item SBMLReactionConverter::isDocumentValid @internal =back =head2 SBMLRuleConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter that sorts SBML rules and assignments. @htmlinclude libsbml-facility-only-warning.html This converter reorders assignments in a model. Specifically, it sorts the list of assignment rules (i.e., the AssignmentRule objects contained in the ListOfAssignmentRules within the Model object) and the initial assignments (i.e., the InitialAssignment objects contained in the ListOfInitialAssignments) such that, within each set, assignments that depend on I<prior> values are placed I<after> the values are set. For example, if there is an assignment rule stating <i>a = b + 1</i>, and another rule stating <i>b = 3</i>, the list of rules is sorted and the rules are arranged so that the rule for <i>b = 3</i> appears I<before> the rule for <i>a = b + 1</i>. Similarly, if dependencies of this sort exist in the list of initial assignments in the model, the initial assignments are sorted as well. Beginning with SBML Level 2, assignment rules have no ordering required---the order in which the rules appear in an SBML file has no significance. Software tools, however, may need to reorder assignments for purposes of evaluating them. For example, for simulators that use time integration methods, it would be a good idea to reorder assignment rules such as the following, <i>b = a + 10 seconds</i><br> <i>a = time</i> so that the evaluation of the rules is independent of integrator step sizes. (This is due to the fact that, in this case, the order in which the rules are evaluated changes the result.) SBMLRuleConverter can be used to reorder the SBML objects regardless of whether the input file contained them in the desired order. Note that the two sets of SBML assignments (list of assignment rules on the one hand, and list of initial assignments on the other hand) are handled I<independently>. In an SBML model, these entities are treated differently and no amount of sorting can deal with inter-dependencies between assignments of the two kinds. @section SBMLRuleConverter-usage Configuration and use of SBMLRuleConverter SBMLRuleConverter is enabled by creating a ConversionProperties object with the option C<"sortRules">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). This converter offers no other options. C<opydetails> doc_section_using_sbml_converters =over =item SBMLRuleConverter::init @internal =item SBMLRuleConverter::SBMLRuleConverter Creates a new SBMLLevelVersionConverter object. =item SBMLRuleConverter::SBMLRuleConverter Copy constructor; creates a copy of an SBMLLevelVersionConverter object. @param obj the SBMLLevelVersionConverter object to copy. =item SBMLRuleConverter::clone Creates and returns a deep copy of this SBMLLevelVersionConverter object. @return a (deep) copy of this converter. =item SBMLRuleConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLLevelVersionConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLRuleConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLRuleConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =back =head2 SBMLStripPackageConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converter that removes SBML Level 3 packages. @htmlinclude libsbml-facility-only-warning.html This SBML converter takes an SBML document and removes (strips) an SBML Level 3 package from it. No conversion is performed; the package constructs are simply removed from the SBML document. The package to be stripped is determined by the value of the option C<"package"> on the conversion properties. @section SBMLStripPackageConverter-usage Configuration and use of SBMLStripPackageConverter SBMLStripPackageConverter is enabled by creating a ConversionProperties object with the option C<"stripPackage">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). This converter takes one required option: @li C<"package">: the value of this option should be a text string, the nickname of the SBML Level 3 package to be stripped from the model. In addition, the converter understands an additional optional: @li C<"stripAllUnrecognized">: if set to C<true>, the converter will remove all SBML Level 3 package constructs for Level 3 packages that this copy of libSBML does not recognize. Note that what a given copy of libSBML recognizes is determined by which plug-ins it has been configured to include. If this option is enabled, it may remove SBML Level 3 package constructs that are legitimate in the sense that they are officially defined SBML constructs, but not recognized because the running copy of libSBML has not had support enabled for them. C<opydetails> doc_section_using_sbml_converters =over =item SBMLStripPackageConverter::init @internal =item SBMLStripPackageConverter::SBMLStripPackageConverter Creates a new SBMLStripPackageConverter object. =item SBMLStripPackageConverter::SBMLStripPackageConverter Copy constructor; creates a copy of an SBMLStripPackageConverter object. @param obj the SBMLStripPackageConverter object to copy. =item SBMLStripPackageConverter::clone Creates and returns a deep copy of this SBMLStripPackageConverter object. @return the (deep) copy of this converter object. =item SBMLStripPackageConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLStripPackageConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLStripPackageConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN@endlink =item SBMLStripPackageConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLStripPackageConverter::getPackageToStrip @return the package to be stripped. =item SBMLStripPackageConverter::isStripAllUnrecognizedPackages @return a boolean indicating whether all unrecognized packages should be removed. =item SBMLStripPackageConverter::stripPackage @internal =back =head2 SBMLUnitsConverter @sbmlpackage{core} @htmlinclude pkg-marker-core.html Converts a model's existing units to SI units. @htmlinclude libsbml-facility-only-warning.html This SBML converter converts the units in a model to base SI units, that is, using only the units metre, kilogram, second, ampere, kelvin, mole and candela. Unit conversion will only be performed on models that are fully unit consistent, meaning that all objects have units associated with them and there are no literal numbers with unspecified units. In the case of an SBML Level 3 model involving math expressions, this means that the C<timeUnits> attribute on the Model object must be set, and if there are any reactions in the model, the C<extentUnits> attribute on the Model object must also be set. @section SBMLUnitsConverter-usage Configuration and use of SBMLUnitsConverter SBMLUnitsConverter is enabled by creating a ConversionProperties object with the option C<"units">, and passing this properties object to SBMLDocument::convert(@if java ConversionProperties@endif). This converter takes one optional option: @li C<"removeUnusedUnits">: the value of this property should be a Boolean. If it is C<true>, it tells the unit convert to remove any unused UnitDefinition objects after conversion is complete. ("Unused" units are units that are not referenced by any object in the model.) If the value is C<false>, unused UnitDefinition objects are not removed from the model. The default is C<true>. C<opydetails> doc_section_using_sbml_converters =over =item SBMLUnitsConverter::init @internal =item SBMLUnitsConverter::SBMLUnitsConverter Creates a new SBMLUnitsConverter object. =item SBMLUnitsConverter::SBMLUnitsConverter Copy constructor; creates a copy of an SBMLUnitsConverter object. @param obj the SBMLUnitsConverter object to copy. =item SBMLUnitsConverter::clone Creates and returns a deep copy of this SBMLUnitsConverter object. @return a (deep) copy of this converter. =item SBMLUnitsConverter::matchesProperties Returns C<true> if this converter object's properties match the given properties. A typical use of this method involves creating a ConversionProperties object, setting the options desired, and then calling this method on an SBMLUnitsConverter object to find out if the object's property values match the given ones. This method is also used by SBMLConverterRegistry::getConverterFor(@if java ConversionProperties@endif) to search across all registered converters for one matching particular properties. @param props the properties to match. @return C<true> if this converter's properties match, C<false> otherwise. =item SBMLUnitsConverter::convert Perform the conversion. This method causes the converter to do the actual conversion work, that is, to convert the SBMLDocument object set by SBMLConverter::setDocument(@if java SBMLDocument@endif) and with the configuration options set by SBMLConverter::setProperties(@if java ConversionProperties@endif). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_CONVERSION_NOT_AVAILABLE LIBSBML_CONV_CONVERSION_NOT_AVAILABLE@endlink @li @link OperationReturnValues_t#LIBSBML_CONV_INVALID_SRC_DOCUMENT LIBSBML_CONV_INVALID_SRC_DOCUMENT@endlink =item SBMLUnitsConverter::getDefaultProperties Returns the default properties of this converter. A given converter exposes one or more properties that can be adjusted in order to influence the behavior of the converter. This method returns the I<default> property settings for this converter. It is meant to be called in order to discover all the settings for the converter object. @return the ConversionProperties object describing the default properties for this converter. =item SBMLUnitsConverter::convertUnits @internal =item SBMLUnitsConverter::convertUnits @internal =item SBMLUnitsConverter::applyNewUnitDefinition @internal =item SBMLUnitsConverter::existsAlready @internal =item SBMLUnitsConverter::getRemoveUnusedUnitsFlag @internal =item SBMLUnitsConverter::removeUnusedUnitDefinitions @internal =item SBMLUnitsConverter::convertGlobalUnits @internal =item SBMLUnitsConverter::convertCnUnits @internal =item SBMLUnitsConverter::isUsed @internal =item SBMLUnitsConverter::unacceptable_errors @internal =item SBMLUnitsConverter::hasCnUnits @internal =item SBMLUnitsConverter::mathHasCnUnits @internal =item SBMLUnitsConverter::matchesCnUnits @internal =item SBMLUnitsConverter::mathMatchesCnUnits @internal =item SBMLUnitsConverter::convertAST @internal =back =head2 SBMLValidator @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for SBML validators. @htmlinclude not-sbml-warning.html LibSBML implements facilities for verifying that a given SBML document is valid according to the SBML specifications; it also exposes the validation interface so that user programs and SBML Level 3 package authors may use the facilities to implement new validators. There are two main interfaces to libSBML's validation facilities, based on the classes Validator and SBMLValidator. The Validator class is the basis of the system for validating an SBML document against the validation rules defined in the SBML specifications. The scheme used by Validator relies is compact and uses the I<visitor> programming pattern, but it relies on C/C++ features and is not directly accessible from language bindings. SBMLValidator offers a framework for straightforward class-based extensibility, so that user code can subclass SBMLValidator to implement new validation systems, different validators can be introduced or turned off at run-time, and interfaces can be provided in the libSBML language bindings. SBMLValidator can call Validator functionality internally (as is the case in the current implementation of SBMLInternalValidator) or use entirely different implementation approaches, as necessary. Users of libSBML may already be familiar with the facilities encompassed by the validation system, in the form of the consistency-checking methods defined on SBMLDocument. The methods SBMLDocument::setConsistencyChecks(@if java int, boolean@endif), SBMLDocument::checkConsistency(), SBMLDocument::checkInternalConsistency() and other method of that sort are in fact implemented via SBMLValidator, specifically as methods on the class SBMLInternalValidator. Authors may use SBMLValidator as the base class for their own validator extensions to libSBML. The class SBMLInternalValidator may serve as a code example for how to implement such things. =over =item SBMLValidator::SBMLValidator Creates a new SBMLValidator. =item SBMLValidator::SBMLValidator Copy constructor; creates a copy of an SBMLValidator object. @param orig the object to copy. =item SBMLValidator::clone Creates and returns a deep copy of this SBMLValidator object. @return the (deep) copy of this SBMLValidator object. =item SBMLValidator::getDocument Returns the current SBML document in use by this validator. @return the current SBML document. @see setDocument(@if java SBMLDocument@endif) =item SBMLValidator::getDocument Returns the current SBML document in use by this validator. @return a const reference to the current SBML document. @see setDocument(@if java SBMLDocument@endif) =item SBMLValidator::setDocument Sets the current SBML document to the given SBMLDocument object. @param doc the document to use for this validation. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getDocument() =item SBMLValidator::validate Runs this validator on the current SBML document. @return an integer value indicating the success/failure of the validation. @if clike The value is drawn from the enumeration #OperationReturnValues_t. @endif@~ The possible values returned by this function are determined by the specific subclasses of this class. =item SBMLValidator::clearFailures Clears this validator's list of failures. If you are validating multiple SBML documents with the same validator, call this method after you have processed the list of failures from the last validation run and before validating the next document. @if clike @see getFailures() @endif@~ =item SBMLValidator::getFailures Returns a list of SBMLError objects (if any) that were logged by the last run of this validator. @return a list of errors, warnings and other diagnostics logged during validation. @see clearFailures() =item SBMLValidator::logFailure Adds the given failure to this list of Validators failures. @param err an SBMLError object representing an error or warning. @if clike @see getFailures() @endif@~ =item SBMLValidator::validate Validates the given SBMLDocument object. This is identical to calling setDocument(@if java SBMLDocument @endif) followed by validate(). @param d the SBML document to validate. @return the number of validation failures that occurred. The objects describing the actual failures can be retrieved using getFailures(). =item SBMLValidator::validate Validates the SBML document located at the given C<filename>. This is a convenience method that saves callers the trouble of using SBMLReader to read the document first. @param filename the path to the file to be read and validated. @return the number of validation failures that occurred. The objects describing the actual failures can be retrieved using getFailures(). =item SBMLValidator::getErrorLog Returns the list of errors or warnings logged during parsing, consistency checking, or attempted translation of this model. Note that this refers to the SBMLDocument object's error log (i.e., the list returned by SBMLDocument::getErrorLog()). I<That> list of errors and warnings is I<separate> from the validation failures tracked by this validator (i.e., the list returned by getFailures()). @return the SBMLErrorLog used for the SBMLDocument. @if clike @see getFailures() @endif@~ =item SBMLValidator::getModel Returns the Model object stored in the SBMLDocument. It is important to note that this method <em>does not create</em> a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(@if java Model@endif). This method returns C<NULL> if a model does not yet exist. @return the Model contained in this validator's SBMLDocument object. @see SBMLDocument::setModel(@if java Model@endif) @see SBMLDocument::createModel() =item SBMLValidator::getModel Returns the Model object stored in the SBMLDocument. It is important to note that this method <em>does not create</em> a Model instance. The model in the SBMLDocument must have been created at some prior time, for example using SBMLDocument::createModel() or SBMLDocument::setModel(@if java Model@endif). This method returns C<NULL> if a model does not yet exist. @return the Model contained in this validator's SBMLDocument object. @see SBMLDocument::setModel(@if java Model@endif) @see SBMLDocument::createModel() =item SBMLValidator::getNumFailures Returns the number of failures encountered in the last validation run. This method returns the number of failures logged by this validator. This number only reflects I<this> validator's actions; the number may not be the same as the number of errors and warnings logged on the SBMLDocument object's error log (i.e., the object returned by SBMLDocument::getErrorLog()), because other parts of libSBML may log errors and warnings beyond those found by this validator. @return the number of errors logged by this validator. =item SBMLValidator::getFailure Returns the failure object at index n in this validator's list of failures logged during the last run. Callers should use getNumFailures() first, to find out the number of entries in this validator's list of failures. @param n an integer indicating the index of the object to return from the failures list; index values start at 0. @return the failure at the given index number. @see getNumFailures() =back =head2 SBMLExternalValidator @sbmlpackage{core} @htmlinclude pkg-marker-core.html @internal =over =item SBMLExternalValidator::SBMLExternalValidator @internal =item SBMLExternalValidator::SBMLExternalValidator @internal =item SBMLExternalValidator::clone @internal =item SBMLExternalValidator::validate @internal =item SBMLExternalValidator::getProgram @internal =item SBMLExternalValidator::setProgram @internal =item SBMLExternalValidator::getOutputFileName @internal =item SBMLExternalValidator::setOutputFileName @internal =item SBMLExternalValidator::getSBMLFileName @internal =item SBMLExternalValidator::setSBMLFileName @internal =item SBMLExternalValidator::clearArguments @internal =item SBMLExternalValidator::addArgument @internal =item SBMLExternalValidator::getNumArguments @internal =item SBMLExternalValidator::getArgument @internal =item SBMLExternalValidator::getArguments @internal =item SBMLExternalValidator::setArguments @internal =back =head2 XMLAttributes @sbmlpackage{core} @htmlinclude pkg-marker-core.html A list of attributes on an XML element. @htmlinclude not-sbml-warning.html In libSBML's XML interface layer, attributes on an element are stored as a list of values kept in an XMLAttributes object. XMLAttributes has methods for adding and removing individual attributes as well as performing other actions on the list of attributes. Classes in libSBML that represent nodes in an XML document (i.e., XMLNode and its parent class, XMLToken) use XMLAttributes objects to manage attributes on XML elements. Attributes on an XML element can be written in one of two forms: @li C<name="value"> @li C<prefix:name="value"> An attribute in XML must always have a value, and the value must always be a quoted string; i.e., it is always C<name="value"> and not C<name=value>. An empty value is represented simply as an empty string; i.e., C<name="">. In cases when a C<prefix> is provided with an attribute name, general XML validity rules require that the prefix is an XML namespace prefix that has been declared somewhere else (possibly as an another attribute on the same element). However, the XMLAttributes class does I<not> test for the proper existence or declaration of XML namespaces—callers must arrange to do this themselves in some other way. This class only provides facilities for tracking and manipulating attributes and their prefix/URI/name/value components. C<opydetails> doc_note_attributes_are_unordered @see XMLTriple @see XMLNode @see XMLToken =over =item XMLAttributes::XMLAttributes Creates a new, empty XMLAttributes object. =item XMLAttributes::XMLAttributes Copy constructor; creates a copy of this XMLAttributes object. C<orig> the XMLAttributes object to copy. =item XMLAttributes::clone Creates and returns a deep copy of this XMLAttributes object. @return the (deep) copy of this XMLAttributes object. =item XMLAttributes::add Adds an attribute to this list of attributes. C<opydetails> doc_add_behavior_explanation @param name a string, the unprefixed name of the attribute. @param value a string, the value of the attribute. @param namespaceURI a string, the namespace URI of the attribute. @param prefix a string, a prefix for the XML namespace. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink – this value is returned if any of the arguments are C<NULL>. To set an empty C<prefix> and/or C<name> value, use an empty string rather than C<NULL>. C<opydetails> doc_note_overwrites_existing_values @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see add(const XMLTriple& triple, const std::string& value) @see getIndex(const std::string& name, const std::string& uri) const @see getIndex(const XMLTriple& triple) const @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::add Adds an attribute to this list of attributes. C<opydetails> doc_add_behavior_explanation @param triple an XMLTriple object describing the attribute to be added. @param value a string, the value of the attribute. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink – this value is returned if any of the arguments are C<NULL>. To set an empty value for the attribute, use an empty string rather than C<NULL>. C<opydetails> doc_note_overwrites_existing_values @see add(const std::string& name, const std::string& value, const std::string& namespaceURI, const std::string& prefix) @see getIndex(const std::string& name, const std::string& uri) const @see getIndex(const XMLTriple& triple) const @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::addResource @internal =item XMLAttributes::removeResource @internal =item XMLAttributes::remove Removes the <em>n</em>th attribute from this list of attributes. @param n an integer the index of the resource to be deleted. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute at the given index C<n>. C<opydetails> doc_note_attributes_are_unordered @see getLength() @see remove(const XMLTriple& triple) @see remove(const std::string& name, const std::string& uri) =item XMLAttributes::remove Removes a named attribute from this list of attributes. @param name a string, the unprefixed name of the attribute to be removed. @param uri a string, the namespace URI of the attribute to be removed. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute with the given C<name> (and C<uri> if specified). @see remove(int n) @see remove(const XMLTriple& triple) =item XMLAttributes::remove Removes a specific attribute from this list of attributes. @param triple an XMLTriple describing the attribute to be removed. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute matching the properties of the given C<triple>. @see remove(int n) @see remove(const std::string& name, const std::string& uri) =item XMLAttributes::clear Removes all attributes in this XMLAttributes object. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see remove(int n) @see remove(const XMLTriple& triple) @see remove(const std::string& name, const std::string& uri) =item XMLAttributes::getIndex Returns the index of an attribute having a given name. @note This method does not check XML namespaces. Thus, if there are multiple attributes with the same local C<name> but different namespaces, this method will return the first one found. Callers should use the more specific methods XMLAttributes::getIndex(const std::string& name, const std::string& uri) const or XMLAttributes::getIndex(const XMLTriple& triple) const to find attributes in particular namespaces. @param name a string, the name of the attribute whose index is begin sought. @return the index of an attribute with the given local name, or C<-1> if no such attribute is present. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::getIndex Returns the index of the attribute having a given name and XML namespace URI. @param name a string, the name of the attribute being sought. @param uri a string, the namespace URI of the attribute being sought. @return the index of an attribute with the given local name and namespace URI, or C<-1> if no such attribute is present. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::getIndex Returns the index of the attribute defined by the given XMLTriple object. @param triple an XMLTriple describing the attribute being sought. @return the index of an attribute described by the given XMLTriple object, or C<-1> if no such attribute is present. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::getLength Returns the number of attributes in this list of attributes. @return the number of attributes contained in this XMLAttributes object. =item XMLAttributes::getNumAttributes Returns the number of attributes in this list of attributes. This function is merely an alias of XMLAttributes::getLength() introduced for consistency with other libXML classes. @return the number of attributes contained in this XMLAttributes object. =item XMLAttributes::getName Returns the name of the <em>n</em>th attribute in this list of attributes. @param index an integer, the position of the attribute whose name is being sought. @return the local name of the <em>n</em>th attribute. C<opydetails> doc_note_check_number_first C<opydetails> doc_note_attributes_are_unordered @see getLength() @see hasAttribute(int index) const =item XMLAttributes::getPrefix Returns the namespace prefix of the <em>n</em>th attribute in this attribute set. @param index an integer, the position of the attribute whose namespace prefix is being sought. @return the XML namespace prefix of the <em>n</em>th attribute. C<opydetails> doc_note_check_number_first C<opydetails> doc_note_attributes_are_unordered @see getLength() @see hasAttribute(int index) const =item XMLAttributes::getPrefixedName Returns the prefix name of the <em>n</em>th attribute in this attribute set. @param index an integer, the position of the attribute whose prefixed name is being sought. @return the prefixed name of the <em>n</em>th attribute. C<opydetails> doc_note_check_number_first C<opydetails> doc_note_attributes_are_unordered @see getLength() @see hasAttribute(int index) const =item XMLAttributes::getURI Returns the XML namespace URI of the <em>n</em>th attribute in this attribute set. @param index an integer, the position of the attribute whose namespace URI is being sought. @return the XML namespace URI of the <em>n</em>th attribute. C<opydetails> doc_note_check_number_first C<opydetails> doc_note_attributes_are_unordered @see getLength() @see hasAttribute(int index) const =item XMLAttributes::getValue Returns the value of the <em>n</em>th attribute in this list of attributes. @param index an integer, the position of the attribute whose value is being sought. @return the XML value of the <em>n</em>th attribute. C<opydetails> doc_note_check_number_first C<opydetails> doc_note_attributes_are_unordered @see getLength() @see hasAttribute(int index) const =item XMLAttributes::getValue Returns a named attribute's value. @param name a string, the unprefixed name of the attribute whose value is being sought. @return The attribute value as a string. @note If an attribute with the given local C<name> does not exist in this XMLAttributes object, this method will return an empty string. Callers can use XMLAttributes::hasAttribute(const std::string name, const std::string uri) const to test for an attribute's existence. This method also does not check the XML namespace of the named attribute. Thus, if there are multiple attributes with the same local C<name> but different namespaces, this method will return the value of the first such attribute found. Callers should use the more specific methods XMLAttributes::getIndex(const std::string& name, const std::string& uri) const or XMLAttributes::getIndex(const XMLTriple& triple) const to find attributes in particular namespaces. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::getValue Returns a named attribute's value. @param name a string, the name of the attribute whose value is being sought. @param uri a string, the XML namespace URI of the attribute. @return The attribute value as a string. @note If an attribute with the given C<name> and namespace C<uri> does not exist in this XMLAttributes object, this method will return an empty string. Callers can use XMLAttributes::hasAttribute(const std::string name, const std::string uri) const to test for an attribute's existence. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::getValue Return the value of an attribute described by a given XMLTriple object. @param triple an XMLTriple describing the attribute whose value is being sought. @return The attribute value as a string. @note If an attribute with the properties given by C<triple> does not exist in this XMLAttributes object, this method will return an empty string. Callers can use XMLAttributes::hasAttribute(const std::string name, const std::string uri) const to test for an attribute's existence. @see hasAttribute(const std::string name, const std::string uri) const @see hasAttribute(const XMLTriple& triple) const =item XMLAttributes::hasAttribute Returns C<true> if an attribute exists at a given index. @param index an integer, the position of the attribute to be tested. @return C<true> if an attribute with the given index exists in this XMLAttributes object, C<false> otherwise. C<opydetails> doc_note_attributes_are_unordered =item XMLAttributes::hasAttribute Returns C<true> if an attribute with a given name and namespace URI exists. @param name a string, the unprefixed name of the attribute. @param uri a string, the XML namespace URI of the attribute. @return C<true> if an attribute with the given local name and XML namespace URI exists in this XMLAttributes object, C<false> otherwise. @see add(const std::string& name, const std::string& value, const std::string& namespaceURI, const std::string& prefix) @see add(const XMLTriple& triple, const std::string& value) =item XMLAttributes::hasAttribute Returns C<true> if an attribute with the given properties exists. @param triple an XMLTriple describing the attribute to be tested. @return C<true> if an attribute with the given XML triple exists in this XMLAttributes object, C<false> otherwise. @see add(const std::string& name, const std::string& value, const std::string& namespaceURI, const std::string& prefix) @see add(const XMLTriple& triple, const std::string& value) =item XMLAttributes::isEmpty Returns C<true> if this list of attributes is empty. @return C<true> if this XMLAttributes object is empty, C<false> otherwise. =item XMLAttributes::readInto Interprets an attribute as a Boolean value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and attempts to interpret it as a Boolean. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a Boolean, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#boolean">XML Schema</a>, the valid Boolean values are: C<"true">, C<"false">, C<"1">, and C<"0">, read in a case-insensitive manner. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a Boolean, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value a Boolean, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a Boolean value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and attempts to interpret it as a Boolean. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a Boolean, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#boolean">XML Schema</a>, the valid Boolean values are: C<"true">, C<"false">, C<"1">, and C<"0">, read in a case-insensitive manner. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a Boolean, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute to read. @param value a Boolean, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<double> value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and attempts to interpret it as a C<double>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a C<double>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#double">XML Schema</a>, valid doubles are the same as valid doubles for the C language and in addition, the special values C<"INF">, C<"-INF">, and C<"NaN">, read in a case-insensitive manner. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<double>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value a C<double>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<double> value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and attempts to interpret it as a C<double>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a C<double>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#double">XML Schema</a>, valid doubles are the same as valid doubles for the C language and in addition, the special values C<"INF">, C<"-INF">, and C<"NaN">, read in a case-insensitive manner. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<double>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute to read. @param value a C<double>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<long> integer value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and attempts to interpret it as a C<long>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a C<long>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. This is unfortunately a larger space of values than can be represented in a long integer, so libSBML limits the possible values to those that can be stored in a C<long> data type. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value a C<long>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<long> integer value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and attempts to interpret it as a C<long>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as a C<long>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. This is unfortunately a larger space of values than can be represented in a long, so libSBML limits the possible values to those that can be stored in a C<long> data type. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute @param value a C<long>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<int> value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and attempts to interpret it as an C<int>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as an C<int>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. The present method is designed to interpret numbers as signed C<int> values and cannot represent larger values. Note that variant methods on XMLAttributes are available to work with C<unsigned int> type and C<long> type values; users may wish to investigate those methods if they need to handle larger integer values. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value an C<int>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<int> value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and attempts to interpret it as an C<int>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as an C<int>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. The present method is designed to interpret numbers as signed C<int> values and cannot represent larger values. Note that variant methods on XMLAttributes are available to work with C<unsigned int> type and C<long> type values; users may wish to investigate those methods if they need to handle larger integer values. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute @param value an C<int>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<unsigned int> value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and attempts to interpret it as an C<unsigned int>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as an C<unsigned int>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. The present method is designed to interpret numbers as C<unsigned int> and cannot represent larger values. Note that a variant method on XMLAttributes is available to work with C<long> type values; users may wish to investigate that method if they need to handle large integer values. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value an C<int>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a C<unsigned int> value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and attempts to interpret it as an C<unsigned int>. If successful, this method stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object or the value of the attribute could not be interpreted as an C<unsigned int>, C<value> is left unmodified. According to the specification of <a target="_blank" href="http://www.w3.org/TR/xmlschema-2/#integer">XML Schema</a>, valid C<long>-type values are zero, all positive whole numbers and all negative whole numbers. The present method is designed to interpret numbers as C<unsigned int> and cannot represent larger values. Note that a variant method on XMLAttributes is available to work with C<long> type values; users may wish to investigate that method if they need to handle large integer values. Errors in attempting to interpret the format are logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to @p log with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute C<name> exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Finally, if C<log> is provided, C<name> exists, but the value associated with C<name> could not be parsed as a C<long>, then the error logged to C<log> indicates that a value type mismatch occurred. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute @param value an C<int>, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a string value. This method reads the value associated with the attribute C<name> in this XMLAttributes object and stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object, C<value> is left unmodified. Unlike the other variant methods on XMLAttributes, there are no format errors possible when reading strings, since XML attribute values I<are> strings. However, the case of a missing attribute can still occur. Errors will be logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to C<log> with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute @p name exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Values are read using the "C" locale. @param name a string, the name of the attribute. @param value a string, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. C<opydetails> doc_note_read_methods_and_namespaces @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::readInto Interprets an attribute as a string value. This method reads the value associated with the attribute described by C<triple> in this XMLAttributes object and stores the value into the variable passed in as C<value>. If no attribute named C<name> can be found in this XMLAttributes object, C<value> is left unmodified. Unlike the other variant methods on XMLAttributes, there are no format errors possible when reading strings, since XML attribute values I<are> strings. However, the case of a missing attribute can still occur. Errors will be logged to C<log>, if an error log object is supplied. If the parameter C<required> is C<true>, then if no attribute named C<name> exists, an error will be logged to C<log> with a description that explains the error is due to a missing required attribute. If the parameter C<required> is C<false> (the default), then if no attribute @p name exists, no error will be logged and this method will simply return C<false> to indicate an unsuccessful assignment. Values are read using the "C" locale. @param triple an XMLTriple object describing the attribute @param value a string, the return parameter into which the value should be assigned. @param log an XMLErrorLog object, an optional error log for reporting problems. @param required a Boolean flag, to indicate whether it should be considered an error if the attribute C<name> cannot be found in this XMLAttributes object. @param line an unsigned int, the line number at which the error occurred. Callers can supply this value if it makes sense for their applications. @param column an unsigned int, the column number at which the error occurred. Callers can supply this value if it makes sense for their applications. @returns C<true> if the attribute was successfully read into value, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLAttributes::write @internal =item XMLAttributes::setErrorLog @internal =item XMLAttributes::attributeTypeError @internal =item XMLAttributes::attributeRequiredError @internal =item XMLAttributes::readInto @internal =item XMLAttributes::readInto @internal =item XMLAttributes::readInto @internal =item XMLAttributes::readInto @internal =item XMLAttributes::readInto @internal =item XMLAttributes::readInto @internal =back =head2 XMLConstructorException @sbmlpackage{core} @htmlinclude pkg-marker-core.html Exceptions thrown by some libSBML constructors. @htmlinclude not-sbml-warning.html In some situations, constructors for SBML objects may need to indicate to callers that the creation of the object failed. The failure may be for different reasons, such as an attempt to use invalid parameters or a system condition such as a memory error. To communicate this to callers, those classes will throw an XMLConstructorException. @if cpp Callers can use the standard C++ C<std::exception> method C<what()> to extract the diagnostic message stored with the exception.@endif@~ <p> In languages that don't have an exception mechanism (e.g., C), the constructors generally try to return an error code instead of throwing an exception. @see SBMLConstructorException =over =item XMLConstructorException::XMLConstructorException @internal =back =head2 XMLNamespaces @sbmlpackage{core} @htmlinclude pkg-marker-core.html An XML Namespace. @htmlinclude not-sbml-warning.html This class serves to organize functionality for tracking XML namespaces in a document or data stream. The namespace declarations are stored as a list of pairs of XML namespace URIs and prefix strings. These correspond to the parts of a namespace declaration on an XML element. For example, in the following XML fragment, @verbatim <annotation> <mysim:nodecolors xmlns:mysim="urn:lsid:mysim.org" mysim:bgcolor="green" mysim:fgcolor="white"/> </annotation> @endverbatim there is one namespace declaration. Its URI is C<urn:lsid:mysim.org> and its prefix is C<mysim>. This pair could be stored as one item in an XMLNamespaces list. XMLNamespaces provides various methods for manipulating the list of prefix-URI pairs. Individual namespaces stored in a given XMLNamespace object instance can be retrieved based on their index using XMLNamespaces::getPrefix(int index), or by their characteristics such as their URI or position in the list. =over =item XMLNamespaces::XMLNamespaces Creates a new empty list of XML namespace declarations. =item XMLNamespaces::XMLNamespaces Copy constructor; creates a copy of this XMLNamespaces list. @param orig the XMLNamespaces object to copy. =item XMLNamespaces::clone Creates and returns a deep copy of this XMLNamespaces object. @return the (deep) copy of this XMLNamespaces object. =item XMLNamespaces::add Appends an XML namespace prefix and URI pair to this list of namespace declarations. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. If there is an XML namespace with the given C<uri> prefix in this list, then its corresponding URI will be overwritten by the new C<uri> unless the uri represents the core sbml namespace. Calling programs could use one of the other XMLNamespaces methods, such as XMLNamespaces::hasPrefix(@if java String@endif) and XMLNamespaces::hasURI(@if java String@endif) to inquire whether a given prefix and/or URI is already present in this XMLNamespaces object. If the C<uri> represents the sbml namespaces then it will not be overwritten, as this has potentially serious consequences. If it is necessary to replace the sbml namespace the namespace should be removed prior to adding the new namespace. @param uri a string, the uri for the namespace. @param prefix a string, the prefix for the namespace. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLNamespaces::remove Removes an XML Namespace stored in the given position of this list. @param index an integer, position of the namespace to remove. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink =item XMLNamespaces::remove Removes an XML Namespace with the given prefix. @param prefix a string, prefix of the required namespace. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink @see remove(int index) =item XMLNamespaces::clear Clears (deletes) all XML namespace declarations in this XMLNamespaces object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see remove(int index) =item XMLNamespaces::getIndex Look up the index of an XML namespace declaration by URI. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. If this XMLNamespaces object contains a pair with the given URI C<uri>, this method returns its index in the list. @param uri a string, the URI of the sought-after namespace. @return the index of the given declaration, or C<-1> if not present. =item XMLNamespaces::containsUri Tests whether the given uri is contained in this set of namespaces. =item XMLNamespaces::getIndexByPrefix Look up the index of an XML namespace declaration by C<prefix>. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. If this XMLNamespaces object contains a pair with the given prefix C<prefix>, this method returns its index in the list. @param prefix a string, the prefix string of the sought-after namespace. @return the index of the given declaration, or C<-1> if not present. =item XMLNamespaces::getLength Returns the total number of URI-and-prefix pairs stored in this particular XMLNamespaces instance. @return the number of namespaces in this list. =item XMLNamespaces::getNumNamespaces Returns the total number of URI-and-prefix pairs stored in this particular XMLNamespaces instance. @return the number of namespaces in this list. This function is an alias for getLength introduced for consistency with other XML classes. =item XMLNamespaces::getPrefix Look up the prefix of an XML namespace declaration by its position. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. This method returns the prefix of the C<n>th element in that list (if it exists). Callers should use XMLAttributes::getLength() first to find out how many namespaces are stored in the list. @param index an integer, position of the sought-after prefix. @return the prefix of an XML namespace declaration in this list (by position), or an empty string if the C<index> is out of range. @see getLength() =item XMLNamespaces::getPrefix Look up the prefix of an XML namespace declaration by its URI. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. This method returns the prefix for a pair that has the given C<uri>. @param uri a string, the URI of the prefix being sought. @return the prefix of an XML namespace declaration given its URI, or an empty string if no such C<uri> exists in this XMLNamespaces object. =item XMLNamespaces::getURI Look up the URI of an XML namespace declaration by its position. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. This method returns the URI of the C<n>th element in that list (if it exists). Callers should use XMLAttributes::getLength() first to find out how many namespaces are stored in the list. @param index an integer, position of the required URI. @return the URI of an XML namespace declaration in this list (by position), or an empty string if the C<index> is out of range. @see getLength() =item XMLNamespaces::getURI Look up the URI of an XML namespace declaration by its prefix. An XMLNamespaces object stores a list of pairs of namespaces and their prefixes. This method returns the namespace URI for a pair that has the given C<prefix>. @param prefix a string, the prefix of the required URI. @return the URI of an XML namespace declaration having the given @p prefix, or an empty string if no such prefix-and-URI pair exists in this XMLNamespaces object. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see getURI() =item XMLNamespaces::isEmpty Predicate returning C<true> or C<false> depending on whether this XMLNamespaces list is empty. @return C<true> if this XMLNamespaces list is empty, C<false> otherwise. =item XMLNamespaces::hasURI Predicate returning C<true> or C<false> depending on whether an XML Namespace with the given URI is contained in this XMLNamespaces list. @param uri a string, the uri for the namespace. @return C<true> if an XML Namespace with the given URI is contained in this XMLNamespaces list, C<false> otherwise. =item XMLNamespaces::hasPrefix Predicate returning C<true> or C<false> depending on whether an XML Namespace with the given prefix is contained in this XMLNamespaces list. @param prefix a string, the prefix for the namespace. @return C<true> if an XML Namespace with the given URI is contained in this XMLNamespaces list, C<false> otherwise. =item XMLNamespaces::hasNS Predicate returning C<true> or C<false> depending on whether an XML Namespace with the given URI and prefix pair is contained in this XMLNamespaces list. @param uri a string, the URI for the namespace. @param prefix a string, the prefix for the namespace. @return C<true> if an XML Namespace with the given uri/prefix pair is contained in this XMLNamespaces list, C<false> otherwise. =item XMLNamespaces::removeDefault @internal =item XMLNamespaces::containIdenticalSetNS @internal =back =head2 XMLToken @sbmlpackage{core} @htmlinclude pkg-marker-core.html A token in an XML stream. @htmlinclude not-sbml-warning.html The libSBML XML parser interface can read an XML file or data stream and convert the contents into tokens. The tokens represent items in the XML stream, either XML elements (start or end tags) or text that appears as content inside an element. The XMLToken class is libSBML's low-level representation of these entities. Each XMLToken has the following information associated with it: <ol> \n=item\n\n<em>Qualified name</em>: every XML element or XML attribute has a name (e.g., for the element C<<mytag>>, the name is C<"mytag">), but this name may be qualified with a namespace (e.g., it may appear as C<<someNamespace:mytag>> in the input). An XMLToken stores the name of a token, along with any namespace qualification present, through the use of an XMLTriple object. This object stores the bare name of the element, its XML namespace prefix (if any), and the XML namespace with which that prefix is associated. \n=item\n\nI<Namespaces>: An XML token can have one or more XML namespaces associated with it. These namespaces may be specified explicitly on the element or inherited from parent elements. In libSBML, a list of namespaces is stored in an XMLNamespaces object. An XMLToken possesses a field for storing an XMLNamespaces object. \n=item\n\nI<Attributes>: XML elements can have attributes associated with them, and these attributes can have values assigned to them. The set of attribute-value pairs is stored in an XMLAttributes object stored in an XMLToken object. (Note: only elements can have attributes—text blocks cannot have them in XML.) \n=item\n\nI<Line> number: the line number in the input where the token appears. \n=item\n\nI<Column> number: the column number in the input where the token appears. </ol> The XMLToken class serves as base class for XMLNode. XML lends itself to a tree-structured representation, and in libSBML, the nodes in an XML document tree are XMLNode objects. Most higher-level libSBML classes and methods that offer XML-level functionality (such as the methods on SBase for interacting with annotations) work with XMLNode objects rather than XMLToken objects directly. @see XMLNode @see XMLTriple @see XMLAttributes @see XMLNamespaces =over =item XMLToken::XMLToken Creates a new empty XMLToken object. =item XMLToken::XMLToken Creates an XML start element with attributes and namespace declarations. @param triple an XMLTriple object describing the start tag. @param attributes XMLAttributes, the attributes to set on the element to be created. @param namespaces XMLNamespaces, the namespaces to set on the element to be created. @param line an unsigned int, the line number to associate with the token (default = 0). @param column an unsigned int, the column number to associate with the token (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::XMLToken Creates an XML start element with attributes. @param triple an XMLTriple object describing the start tag. @param attributes XMLAttributes, the attributes to set on the element to be created. @param line an unsigned int, the line number to associate with the token (default = 0). @param column an unsigned int, the column number to associate with the token (default = 0). The XML namespace component of this XMLToken object will be left empty. See the other variants of the XMLToken constructors for versions that take namespace arguments. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::XMLToken Creates an XML end element. @param triple an XMLTriple object describing the end tag. @param line an unsigned int, the line number to associate with the token (default = 0). @param column an unsigned int, the column number to associate with the token (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::XMLToken Creates a text object. @param chars a string, the text to be added to the XMLToken object. @param line an unsigned int, the line number to associate with the token (default = 0). @param column an unsigned int, the column number to associate with the token (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::XMLToken Copy constructor; creates a copy of this XMLToken object. @param orig the XMLToken object to copy. =item XMLToken::clone Creates and returns a deep copy of this XMLToken object. @return the (deep) copy of this XMLToken object. =item XMLToken::getAttributes Returns the attributes of the XML element represented by this token. @return the attributes of this XML element, stored in an XMLAttributes object. =item XMLToken::setAttributes Sets the attributes on the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param attributes an XMLAttributes object to be assigned to this XMLToken object, thereby setting the XML attributes associated with this token. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note This function replaces any existing XMLAttributes object on this XMLToken object with the one given by C<attributes>. =item XMLToken::addAttr Adds an attribute to the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param name a string, the so-called "local part" of the attribute name; that is, the attribute name without any namespace qualifier or prefix. @param value a string, the value assigned to the attribute. @param namespaceURI a string, the XML namespace URI of the attribute. @param prefix a string, the prefix for the XML namespace. Recall that in XML, the complete form of an attribute on an XML element is the following: <center> C<prefix:name="value"> </center> The C<name> part is the name of the attribute, the C<"value"> part is the value assigned to the attribute (and it is always a quoted string), and the C<prefix> part is an optional XML namespace prefix. Internally in libSBML, this data is stored in an XMLAttributes object associated with this XMLToken. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink C<opydetails> doc_note_overwrites_existing_attribute @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::addAttr Adds an attribute to the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param triple an XMLTriple object defining the attribute, its value, and optionally its XML namespace (if any is provided). @param value a string, the value assigned to the attribute. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink C<opydetails> doc_note_overwrites_existing_attribute =item XMLToken::removeAttr Removes the <em>n</em>th attribute from the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param n an integer the index of the resource to be deleted. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this element at the given index C<n>. @see getAttrIndex(const XMLTriple& triple) const @see getAttrIndex(const std::string& name, const std::string& uri) const @see getAttributesLength() =item XMLToken::removeAttr Removes an attribute from the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param name a string, the name of the attribute to be removed. @param uri a string, the XML namespace URI of the attribute to be removed. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this element with the given C<name> (and C<uri> if specified). @see hasAttr(const std::string name, const std::string uri) const =item XMLToken::removeAttr Removes an attribute from the XML element represented by this token. C<opydetails> doc_only_for_start_elements @param triple an XMLTriple describing the attribute to be removed. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no attribute on this element matching the properties of the given C<triple>. @see hasAttr(const XMLTriple& triple) const =item XMLToken::clearAttributes Removes all attributes of this XMLToken object. C<opydetails> doc_only_for_start_elements C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink =item XMLToken::getAttrIndex Returns the index of the attribute with the given name and namespace URI. @param name a string, the name of the attribute. @param uri a string, the namespace URI of the attribute. @return the index of an attribute with the given local name and namespace URI, or C<-1> if it is not present on this token. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::getAttrIndex Returns the index of the attribute defined by the given XMLTriple object. @param triple the XMLTriple object that defines the attribute whose index is being sought. @return the index of an attribute with the given XMLTriple object, or C<-1> if no such attribute is present on this token. =item XMLToken::getAttributesLength Returns the number of attributes on this XMLToken object. @return the number of attributes possessed by this token. @see hasAttr(@if java int@endif) =item XMLToken::getAttrName Returns the name of the <em>n</em>th attribute in this token's list of attributes. @param index an integer, the position of the attribute whose name is being sought. @return the name of the attribute located at position C<n> in the list of attributes possessed by this XMLToken object. C<opydetails> doc_note_index_out_of_range_behavior @see hasAttr(@if java int@endif) @see getAttributesLength() =item XMLToken::getAttrPrefix Returns the prefix of the <em>n</em>th attribute in this token's list of attributes. @param index an integer, the position of the attribute whose prefix is being sought. @return the XML namespace prefix of the attribute located at position @p n in the list of attributes possessed by this XMLToken object. C<opydetails> doc_note_index_out_of_range_behavior @see hasAttr(@if java int@endif) @see getAttributesLength() =item XMLToken::getAttrPrefixedName Returns the prefixed name of the <em>n</em>th attribute in this token's list of attributes. In this context, <em>prefixed name</em> means the name of the attribute prefixed with the XML namespace prefix assigned to the attribute. This will be a string of the form C<prefix:name>. @param index an integer, the position of the attribute whose prefixed name is being sought. @return the prefixed name of the attribute located at position @p n in the list of attributes possessed by this XMLToken object. C<opydetails> doc_note_index_out_of_range_behavior =item XMLToken::getAttrURI Returns the XML namespace URI of the <em>n</em>th attribute in this token's list of attributes. @param index an integer, the position of the attribute whose namespace URI is being sought. @return the XML namespace URI of the attribute located at position C<n> in the list of attributes possessed by this XMLToken object. C<opydetails> doc_note_index_out_of_range_behavior =item XMLToken::getAttrValue Returns the value of the <em>n</em>th attribute in this token's list of attributes. @param index an integer, the position of the attribute whose value is required. @return the value of the attribute located at position C<n> in the list of attributes possessed by this XMLToken object. C<opydetails> doc_note_index_out_of_range_behavior =item XMLToken::getAttrValue Returns the value of the attribute with a given name and XML namespace URI. @param name a string, the name of the attribute whose value is being sought. @param uri a string, the XML namespace URI of the attribute. @return The value of the attribute, as a string. @note If an attribute with the given C<name> and C<uri> does not exist on this token object, this method will return an empty string. XMLToken::hasAttr(@if java String, String@endif) can be used to test explicitly for the presence of an attribute with a given name and namespace. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::getAttrValue Returns the value of the attribute specified by a given XMLTriple object. @param triple an XMLTriple describing the attribute whose value is being sought. @return The value of the attribute, as a string. @note If an attribute defined by the given C<triple> does not exist on this token object, this method will return an empty string. XMLToken::hasAttr(@if java XMLTriple@endif) can be used to test explicitly for the existence of an attribute with the properties of a given triple. =item XMLToken::hasAttr Returns C<true> if an attribute with the given index exists. @param index an integer, the position of the attribute. @return C<true> if this token object possesses an attribute with the given index, C<false> otherwise. =item XMLToken::hasAttr Returns C<true> if an attribute with a given name and namespace URI exists. @param name a string, the name of the attribute being sought. @param uri a string, the XML namespace URI of the attribute being sought. @return C<true> if an attribute with the given local name and namespace URI exists in the list of attributes on this token object, C<false> otherwise. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::hasAttr Returns C<true> if an attribute defined by a given XMLTriple object exists. @param triple an XMLTriple object describing the attribute being sought. @return C<true> if an attribute matching the properties of the given XMLTriple object exists in the list of attributes on this token, C<false> otherwise. =item XMLToken::isAttributesEmpty Returns C<true> if this token has no attributes. @return C<true> if the list of attributes on XMLToken object is empty, C<false> otherwise. =item XMLToken::getNamespaces Returns the XML namespaces declared for this token. @return the XML namespace declarations for this XML element. =item XMLToken::setNamespaces Sets the XML namespaces on this XML element. C<opydetails> doc_only_for_start_elements @param namespaces the XMLNamespaces object to be assigned to this XMLToken object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @note This function replaces any existing XMLNamespaces object on this XMLToken object with the new one given by C<namespaces>. =item XMLToken::addNamespace Appends an XML namespace declaration to this token. The namespace added will be defined by the given XML namespace URI and an optional prefix. If this XMLToken object already possesses an XML namespace declaration with the given C<prefix>, then the existing XML namespace URI will be overwritten by the new one given by C<uri>. C<opydetails> doc_only_for_start_elements @param uri a string, the XML namespace URI for the namespace. @param prefix a string, the namespace prefix to use. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::removeNamespace Removes the <em>n</em>th XML namespace declaration. C<opydetails> doc_only_for_start_elements @param index an integer, the position of the namespace to be removed. The position in this context refers to the position of the namespace in the XMLNamespaces object stored in this XMLToken object. Callers can use one of the C<getNamespace___()> methods to find the index number of a given namespace. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink @see getNamespaceIndex(@if java String uri@endif) @see getNamespaceIndexByPrefix(@if java String prefix@endif) @see getNamespacesLength() =item XMLToken::removeNamespace Removes an XML namespace declaration having a given prefix. C<opydetails> doc_only_for_start_elements @param prefix a string, the prefix of the namespace to be removed. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink The value @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink is returned if there is no namespace with the given C<prefix> on this element. @see getNamespaceIndexByPrefix(@if java String prefix@endif) =item XMLToken::clearNamespaces Removes all XML namespace declarations from this token. C<opydetails> doc_only_for_start_elements C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item XMLToken::getNamespaceIndex Returns the index of an XML namespace declaration based on its URI. @param uri a string, the XML namespace URI of the sought-after namespace. @return the index of the given declaration, or C<-1> if no such namespace URI is present on this XMLToken object. =item XMLToken::getNamespaceIndexByPrefix Returns the index of an XML namespace declaration based on its prefix. @param prefix a string, the prefix of the sought-after XML namespace. @return the index of the given declaration, or C<-1> if no such namespace URI is present on this XMLToken object. =item XMLToken::getNamespacesLength Returns the number of XML namespaces declared on this token. @return the number of XML namespaces stored in the XMLNamespaces object of this XMLToken object. =item XMLToken::getNamespacePrefix Returns the prefix of the <em>n</em>th XML namespace declaration. @param index an integer, position of the required prefix. @return the prefix of an XML namespace declaration in the XMLNamespaces (by position). @note If C<index> is out of range, this method will return an empty string. XMLToken::getNamespacesLength() can be used to find out how many namespaces are defined on this XMLToken object. @see getNamespacesLength() =item XMLToken::getNamespacePrefix Returns the prefix associated with a given XML namespace URI on this token. @param uri a string, the URI of the namespace whose prefix is being sought. @return the prefix of an XML namespace declaration on this XMLToken object. @note If there is no XML namespace with the given C<uri> declared on this XMLToken object, this method will return an empty string. =item XMLToken::getNamespaceURI Returns the URI of the <em>n</em>th XML namespace declared on this token. @param index an integer, the position of the sought-after XML namespace URI. @return the URI of the <em>n</em>th XML namespace stored in the XMLNamespaces object in this XMLToken object. @note If C<index> is out of range, this method will return an empty string. @see getNamespacesLength() =item XMLToken::getNamespaceURI Returns the URI of an XML namespace with a given prefix. @param prefix a string, the prefix of the sought-after XML namespace URI. @return the URI of an XML namespace declaration given its prefix. @note If there is no XML namespace with the given C<prefix> stored in the XMLNamespaces object of this XMLToken object, this method will return an empty string. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLToken::isNamespacesEmpty Returns C<true> if there are no namespaces declared on this token. @return C<true> if the XMLNamespaces object stored in this XMLToken token is empty, C<false> otherwise. =item XMLToken::hasNamespaceURI Returns C<true> if this token has an XML namespace with a given URI. @param uri a string, the URI of the XML namespace. @return C<true> if an XML namespace with the given URI is contained in the XMLNamespaces object of this XMLToken object, C<false> otherwise. =item XMLToken::hasNamespacePrefix Returns C<true> if this token has an XML namespace with a given prefix. @param prefix a string, the prefix for the XML namespace. @return C<true> if an XML Namespace with the given URI is contained in the XMLNamespaces of this XMLToken, C<false> otherwise. =item XMLToken::hasNamespaceNS Returns C<true> if this token has an XML namespace with a given prefix and URI combination. @param uri a string, the URI for the namespace. @param prefix a string, the prefix for the namespace. @return C<true> if an XML namespace with the given URI/prefix pair is contained in the XMLNamespaces object of this XMLToken object, C<false> otherwise. =item XMLToken::setTriple Sets the name, namespace prefix and namespace URI of this token. C<opydetails> doc_only_for_start_elements @param triple the new XMLTriple to use for this XMLToken object. If this XMLToken already had an XMLTriple object stored within it, that object will be replaced. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item XMLToken::getName Returns the (unqualified) name of token. @return the (unqualified) name of token. =item XMLToken::getPrefix Returns the XML namespace prefix of token. @return the XML namespace prefix of token. @note If no XML namespace prefix has been assigned to this token, this method will return an empty string. =item XMLToken::getURI Returns the XML namespace URI of token. @return the XML namespace URI of token. =item XMLToken::getCharacters Returns the character text of token. @return the characters of this XML token. If this token is not a text token (i.e., it's an XML element and not character content), then this will return an empty string. @see isText() @see isElement() =item XMLToken::setCharacters Sets the characters for this XMLToken This method only makes sense for XMLToken objects that contains text. If this method is called on a token that represents an XML start or end tag, it will return the code @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink. @param chars string, characters to append to the text of this token. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see isText() @see isElement() =item XMLToken::append Appends characters to the text content of token. This method only makes sense for XMLToken objects that contains text. If this method is called on a token that represents an XML start or end tag, it will return the code @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink. @param chars string, characters to append to the text of this token. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see isText() @see isElement() =item XMLToken::getColumn Returns the column number at which this token occurs in the input. @return the column at which this XMLToken occurred. =item XMLToken::getLine Returns the line number at which this token occurs in the input. @return the line at which this XMLToken occurred. =item XMLToken::isElement Returns C<true> if this token represents an XML element. This generic predicate returns C<true> if the element is either a start or end tag, and C<false> if it's a text object. The related methods XMLToken:isStart(), XMLToken::isEnd() and XMLToken::isText() are more specific predicates. @return C<true> if this XMLToken object represents an XML element, C<false> otherwise. @see isStart() @see isEnd() @see isText() =item XMLToken::isEnd Returns C<true> if this token represents an XML end element. @return C<true> if this XMLToken object represents an XML end element, C<false> otherwise. @see isStart() @see isElement() @see isText() =item XMLToken::isEndFor Returns C<true> if this token represents an XML end element for a particular start element. @param element XMLToken, the element with which the current object should be compared to determined whether the current object is a start element for the given one. @return C<true> if this XMLToken object represents an XML end tag for the start tag given by C<element>, C<false> otherwise. @see isElement() @see isStart() @see isEnd() @see isText() =item XMLToken::isEOF Returns C<true> if this token is an end of file marker. @return C<true> if this XMLToken object represents the end of the input, C<false> otherwise. @see setEOF() =item XMLToken::isStart Returns C<true> if this token represents an XML start element. @return C<true> if this XMLToken is an XML start element, C<false> otherwise. @see isElement() @see isEnd() @see isText() =item XMLToken::isText Returns C<true> if this token represents an XML text element. @return C<true> if this XMLToken is an XML text element, C<false> otherwise. @see isElement() @see isStart() @see isEnd() =item XMLToken::setEnd Declares that this token represents an XML element end tag. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see isStart() @see isEnd() =item XMLToken::setEOF Declares that this token is an end-of-file/input marker. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see isEOF() =item XMLToken::unsetEnd Declares that this token no longer represents an XML start/end element. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item XMLToken::write @internal =item XMLToken::toString Prints a string representation of the underlying token stream. This method is intended for debugging purposes. @return a text string representing this XMLToken object. =back =head2 XMLNode @sbmlpackage{core} @htmlinclude pkg-marker-core.html A node in libSBML's XML document tree. LibSBML implements an XML abstraction layer. This layer presents a uniform XML interface to calling programs regardless of which underlying XML parser libSBML has actually been configured to use. The basic data object in the XML abstraction is a I<node>, represented by XMLNode. An XMLNode can contain any number of children. Each child is another XMLNode, thereby forming a tree. The methods XMLNode::getNumChildren() and XMLNode::getChild(@if java long@endif) can be used to access the tree structure starting from a given node. Each XMLNode is subclassed from XMLToken, and thus has the same methods available as XMLToken. These methods include XMLToken::getNamespaces(), XMLToken::getPrefix(), XMLToken::getName(), XMLToken::getURI(), and XMLToken::getAttributes(). @section xmlnode-str2xmlnode Conversion between an XML string and an XMLNode LibSBML provides the following utility functions for converting an XML string (e.g., C<<annotation>...</annotation>>) to/from an XMLNode object. @li XMLNode::toXMLString() returns a string representation of the XMLNode object. @li XMLNode::convertXMLNodeToString(@if java XMLNode@endif) (static function) returns a string representation of the given XMLNode object. @li XMLNode::convertStringToXMLNode(@if java String@endif) (static function) returns an XMLNode object converted from the given XML string. The returned XMLNode object by XMLNode::convertStringToXMLNode(@if java String@endif) is a dummy root (container) XMLNode if the given XML string has two or more top-level elements (e.g., "C<<p>...</p><p>...</p>>"). In the dummy root node, each top-level element in the given XML string is contained as a child XMLNode. XMLToken::isEOF() can be used to identify if the returned XMLNode object is a dummy node or not. Here is an example: @if cpp C<ode{>.cpp} // Checks if the XMLNode object returned by XMLNode::convertStringToXMLNode() // is a dummy root node: std::string str = "..."; XMLNode xn = XMLNode::convertStringToXMLNode(str); if ( xn == NULL ) { // returned value is null (error) ... } else if ( xn->isEOF() ) { // Root node is a dummy node. for ( int i = 0; i E<lt> xn->getNumChildren(); i++ ) { // access to each child node of the dummy node. XMLNode& xnChild = xn->getChild(i); ... } } else { // Root node is NOT a dummy node. ... } @endcode @endif @if java C<ode{>.java} // Checks if the returned XMLNode object is a dummy root node: String str = "..."; XMLNode xn = XMLNode.convertStringToXMLNode(str); if ( xn == null ) { // returned value is null (error) ... } else if ( xn.isEOF() ) { // Root node is a dummy node. for ( int i = 0; i E<lt> xn.getNumChildren(); i++ ) { // access to each child node of the dummy node. XMLNode xnChild = xn.getChild(i); ... } } else { // Root node is NOT a dummy node. ... } @endcode @endif @if python C<ode{>.py} xn = XMLNode.convertStringToXMLNode("<p></p>") if xn == None: # Do something to handle exceptional situation. elif xn.isEOF(): # Node is a dummy node. else: # None is not a dummy node. @endcode @endif =over =item XMLNode::XMLNode Creates a new empty XMLNode with no children. =item XMLNode::XMLNode Creates a new XMLNode by copying an XMLToken object. @param token XMLToken to be copied to XMLNode. =item XMLNode::XMLNode Creates a new start element XMLNode with the given set of attributes and namespace declarations. @param triple XMLTriple. @param attributes XMLAttributes, the attributes to set. @param namespaces XMLNamespaces, the namespaces to set. @param line an unsigned int, the line number (default = 0). @param column an unsigned int, the column number (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLNode::XMLNode Creates a start element XMLNode with the given set of attributes. @param triple XMLTriple. @param attributes XMLAttributes, the attributes to set. @param line an unsigned int, the line number (default = 0). @param column an unsigned int, the column number (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLNode::XMLNode Creates an end element XMLNode. @param triple XMLTriple. @param line an unsigned int, the line number (default = 0). @param column an unsigned int, the column number (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLNode::XMLNode Creates a text XMLNode. @param chars a string, the text to be added to the XMLToken. @param line an unsigned int, the line number (default = 0). @param column an unsigned int, the column number (default = 0). @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLNode::XMLNode @internal =item XMLNode::XMLNode Copy constructor; creates a copy of this XMLNode. @param orig the XMLNode instance to copy. =item XMLNode::clone Creates and returns a deep copy of this XMLNode object. @return the (deep) copy of this XMLNode object. =item XMLNode::addChild Adds a copy of C<node> as a child of this XMLNode. The given C<node> is added at the end of the list of children. @param node the XMLNode to be added as child. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_XML_OPERATION LIBSBML_INVALID_XML_OPERATION@endlink @note The given node is added at the end of the children list. =item XMLNode::insertChild Inserts a copy of the given node as the C<n>th child of this XMLNode. If the given index C<n> is out of range for this XMLNode instance, the C<node> is added at the end of the list of children. Even in that situation, this method does not throw an error. @param n an integer, the index at which the given node is inserted. @param node an XMLNode to be inserted as C<n>th child. @return a reference to the newly-inserted child C<node>. =item XMLNode::removeChild Removes the C<n>th child of this XMLNode and returns the removed node. It is important to keep in mind that a given XMLNode may have more than one child. Calling this method erases all existing references to child nodes I<after> the given position C<n>. If the index C<n> is greater than the number of child nodes in this XMLNode, this method takes no action (and returns C<NULL>). @param n an integer, the index of the node to be removed. @return the removed child, or C<NULL> if C<n> is greater than the number of children in this node. @note The caller owns the returned node and is responsible for deleting it. =item XMLNode::removeChildren Removes all children from this node. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item XMLNode::getChild Returns the C<n>th child of this XMLNode. If the index C<n> is greater than the number of child nodes, this method returns an empty node. @param n an unsigned integer, the index of the node to return. @return the C<n>th child of this XMLNode. =item XMLNode::getChild Returns the C<n>th child of this XMLNode. If the index C<n> is greater than the number of child nodes, this method returns an empty node. @param n an unsigned integer, the index of the node to return. @return the C<n>th child of this XMLNode. =item XMLNode::getChild Returns the first child of this XMLNode with the corresponding name. If no child with corrsponding name can be found, this method returns an empty node. @param name the name of the node to return. @return the first child of this XMLNode with given name. =item XMLNode::getChild Returns the first child of this XMLNode with the corresponding name. If no child with corrsponding name can be found, this method returns an empty node. @param name the name of the node to return. @return the first child of this XMLNode with given name. =item XMLNode::getIndex Return the index of the first child of this XMLNode with the given name. @param name a string, the name of the child for which the index is required. @return the index of the first child of this XMLNode with the given name, or C<-1> if not present. =item XMLNode::hasChild Return a boolean indicating whether this XMLNode has a child with the given name. @param name a string, the name of the child to be checked. @return boolean indicating whether this XMLNode has a child with the given name. =item XMLNode::equals Compare this XMLNode against another XMLNode returning true if both nodes represent the same XML tree, or false otherwise. @param other another XMLNode to compare against. @param ignoreURI whether to ignore the namespace URI when doing the comparison. @param ignoreAttributeValues whetehr to ignore attribute values when doing the comparison. @return boolean indicating whether this XMLNode represents the same XML tree as another. =item XMLNode::getNumChildren Returns the number of children for this XMLNode. @return the number of children for this XMLNode. =item XMLNode::write @internal =item XMLNode::writeToStream @internal =item XMLNode::toXMLString Returns a string representation of this XMLNode. @return a string derived from this XMLNode. =item XMLNode::convertXMLNodeToString Returns a string representation of a given XMLNode. @param node the XMLNode to be represented as a string. @return a string-form representation of C<node>. =item XMLNode::convertStringToXMLNode Returns an XMLNode which is derived from a string containing XML content. The XML namespace must be defined using argument C<xmlns> if the corresponding XML namespace attribute is not part of the string of the first argument. @param xmlstr string to be converted to a XML node. @param xmlns XMLNamespaces the namespaces to set (default value is C<NULL>). @note The caller owns the returned XMLNode and is reponsible for deleting it. The returned XMLNode object is a dummy root (container) XMLNode if the top-level element in the given XML string is NOT C<<html>>, C<<body>>, C<<annotation>>, or C<<notes>>. In the dummy root node, each top-level element in the given XML string is contained as a child XMLNode. XMLToken::isEOF() can be used to identify if the returned XMLNode object is a dummy node. @return a XMLNode which is converted from string C<xmlstr>. If the conversion failed, this method returns C<NULL>. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =back =head2 XMLTriple @sbmlpackage{core} @htmlinclude pkg-marker-core.html A qualified XML name. @htmlinclude not-sbml-warning.html A "triple" in the libSBML XML layer encapsulates the notion of qualified name, meaning an element name or an attribute name with an optional namespace qualifier. Triples by themselves are not entities in an XML stream—they are not, for example, elements or attributes; rather, XMLTriple is used in libSBML to construct these other kinds of objects. An XMLTriple instance carries up to three data items: <ol> \n=item\n\nThe name of the attribute or element; that is, the attribute name as it appears in an XML document or data stream; \n=item\n\nThe XML namespace prefix (if any) of the attribute. For example, in the following fragment of XML, the namespace prefix is the string C<mysim> and it appears on both the element C<someelement> and the attribute C<attribA>. When both the element and the attribute are stored as XMLTriple objects, their <i>prefix</i> is C<mysim>. @verbatim <mysim:someelement mysim:attribA="value" /> @endverbatim \n=item\n\nThe XML namespace URI with which the prefix is associated. In XML, every namespace used must be declared and mapped to a URI. </ol> XMLTriple objects are the lowest-level data item in the XML layer of libSBML. Other objects such as XMLToken make use of XMLTriple objects. @see XMLToken @see XMLNode @see XMLAttributes @see XMLNamespaces =over =item XMLTriple::XMLTriple Creates a new, empty XMLTriple object. =item XMLTriple::XMLTriple Creates a new XMLTriple object with a given C<name>, C<uri> and and @p prefix. @param name a string, the name for the entity represented by this object. @param uri a string, the XML namespace URI associated with the prefix. @param prefix a string, the XML namespace prefix for this triple. =item XMLTriple::XMLTriple Creates an XMLTriple object by splitting a given string at a given separator character. The "triplet" in this case is a string that may be in one of the following three possible formats: <ol> \n=item\n\n<span style="background-color: lightblue; padding-left: 2px; padding-right: 2px">name</span> </li> \n=item\n\n<span style="background-color: #ccc; padding-left: 2px; padding-right: 2px">URI</span><span style="background-color: purple; color: white; padding-left: 2px; padding-right: 2px">x</span><span style="background-color: lightblue; padding-left: 2px; padding-right: 2px">name</span></li> \n=item\n\n<span style="background-color: #ccc; padding-left: 2px; padding-right: 2px">URI</span><span style="background-color: purple; color: white; padding-left: 2px; padding-right: 2px">x</span><span style="background-color: lightblue; padding-left: 2px; padding-right: 2px">name</span><span style="background-color: purple; color: white; padding-left: 2px; padding-right: 2px">x</span><span style="background-color: #d0d0fd; padding-left: 2px; padding-right: 2px">prefix</span></li> </ol> where <span style="background-color: purple; color: white; padding-left: 2px; padding-right: 2px">x</span> represents the separator character, C<sepchar>. @param triplet a string representing the triplet as shown above. @param sepchar a character, the sepchar used in the triplet. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLTriple::XMLTriple Copy constructor; creates a copy of this XMLTriple object. @param orig the XMLTriple object to copy. =item XMLTriple::clone Creates and returns a deep copy of this XMLTriple object. @return the (deep) copy of this XMLTriple object. =item XMLTriple::getName Returns the I<name> portion of this XMLTriple object. @return a string, the name portion of this XMLTriple object. =item XMLTriple::getPrefix Returns the I<prefix> portion of this XMLTriple object. @return a string, the prefix portion of this XMLTriple object. =item XMLTriple::getURI Returns the I<URI> portion of this XMLTriple object. @return URI a string, the URI portion of this XMLTriple object. =item XMLTriple::getPrefixedName Returns the prefixed name from this XMLTriple. @return a string, the prefixed name from this XMLTriple. This is constructed by concatenating the I<prefix> stored in this XMLTriple object, followed by a colon character C<":">, followed by the I<name> stored in this XMLTriple object. =item XMLTriple::isEmpty Returns C<true> if this XMLTriple object is empty. @return C<true> if this XMLTriple is empty, C<false> otherwise. =back =head2 XMLOutputStream @sbmlpackage{core} @htmlinclude pkg-marker-core.html Interface to an XML output stream. @htmlinclude not-sbml-warning.html SBML content is serialized using XML; the resulting data can be stored and read to/from a file or data stream. Low-level XML parsers such as Xerces provide facilities to read XML data. To permit the use of different XML parsers (Xerces, Expat or libxml2), libSBML implements an abstraction layer. XMLInputStream and XMLOutputStream are two parts of that abstraction layer. XMLOutputStream provides a wrapper above output streams to facilitate writing XML. XMLOutputStream keeps track of start and end elements, indentation, XML namespace prefixes, and more. The interface provides features for converting non-text data types into appropriate textual form; this takes the form of overloaded C<writeAttribute(...)> methods that allow users to simply use the same method with any data type. For example, suppose an element C<testElement> has two attributes, C<size> and C<id>, and the attributes are variables in your code as follows: @if cpp C<ode{>.cpp} double size = 3.2; std::string id = "id"; @endcode @endif @if java C<ode> double size = 3.2; String id = "id"; @endcode @endif @if python C<ode> size = 3.2; id = "id"; @endcode @endif Then, the element and the attributes can be written to the standard output stream @ifnot cpp (provided as C<cout> in the libSBML language bindings)@endif@~ as follows: @if cpp C<ode{>.cpp} double size = 3.2; std::string id = "id"; // Create an XMLOutputStream object that will write to the // standard output stream: XMLOutputStream xos = new XMLOutputStream(cout); // Create the start element, write the attributes, and close // the element. The output will be written immediately as // each method is called. xos.startElement("testElement") xos.writeAttribute("size", size) xos.writeAttribute("id", id) xos.endElement("testElement") @endcode @endif @if java C<ode{>.java} import org.sbml.libsbml.XMLOutputStream; import org.sbml.libsbml.libsbml; public class test { public static void main (String[] args) { double size = 3.2; String id = "id"; // Create an XMLOutputStream object that will write to the // standard output stream, which is provide in libSBML's // Java language interface as the object "libsbml.cout". XMLOutputStream xos = new XMLOutputStream(libsbml.cout); // Create the start element, write the attributes, and close // the element. The output will be written immediately as // each method is called. xos.startElement("testElement"); xos.writeAttribute("size", size); xos.writeAttribute("id", id); xos.endElement("testElement"); } static { System.loadLibrary("sbmlj"); } } @endcode @endif @if python C<ode{>.py} from libsbml import size = 3.2; id = "id"; # Create an XMLOutputStream object that will write to the standard # output stream, which is provide in libSBML's Python language # interface as the object "libsbml.cout". Since we imported from # the libsbml module, we can simply refer to it as "cout" here: output_stream = XMLOutputStream(cout) # Create the start element, write the attributes, and close the # element. The output is written immediately by each method. output_stream.startElement("testElement") output_stream.writeAttribute("size", size) output_stream.writeAttribute("id", id) output_stream.endElement("testElement") @endcode @endif Other classes in SBML take XMLOutputStream objects as arguments, and use that to write elements and attributes seamlessly to the XML output stream. It is also worth noting that unlike XMLInputStream, XMLOutputStream is actually independent of the underlying XML parsers. It does not use the XML parser libraries at all. @note The convenience of the XMLInputStream and XMLOutputStream abstraction may be useful for developers interested in creating parsers for other XML formats besides SBML. It can provide developers with a layer above more basic XML parsers, as well as some useful programmatic elements such as XMLToken, XMLError, etc. @see XMLInputStream =over =item XMLOutputStream::XMLOutputStream Creates a new XMLOutputStream that wraps the given C<stream>. C<opydetails> doc_programname_arguments C<opydetails> doc_xml_declaration @param stream the input stream to wrap. @param encoding the XML encoding to declare in the output. This value should be C<"UTF-8"> for SBML documents. The default value is C<"UTF-8"> if no value is supplied for this parameter. @param writeXMLDecl whether to write a standard XML declaration at the beginning of the content written on C<stream>. The default is C<true>. @param programName an optional program name to write as a comment in the output stream. @param programVersion an optional version identification string to write as a comment in the output stream. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLOutputStream::endElement Writes the given XML end element name to this XMLOutputStream. @param name the name of the element. @param prefix an optional XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLOutputStream::endElement Writes the given element to the stream. @param triple the XML element to write. @param text the text to put =item XMLOutputStream::setAutoIndent Turns automatic indentation on or off for this XMLOutputStream. @param indent if C<true>, automatic indentation is turned on. =item XMLOutputStream::startElement Writes the given XML start element name to this XMLOutputStream. @param name the name of the element. @param prefix an optional XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLOutputStream::startElement Writes the given XML start element <code><em>prefix</em>:<em>name</em></code> on this output stream. @param triple the start element to write. =item XMLOutputStream::startEndElement Writes the given XML start and end element name to this XMLOutputStream. @param name the name of the element. @param prefix an optional XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLOutputStream::startEndElement Writes the given start element to this output stream. @param triple the XML element to write. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param name the name of the attribute. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given namespace-prefixed attribute value to this output stream. @param name the name of the attribute. @param prefix an XML namespace prefix to write in front of the C<element> name. (The result has the form <code><em>prefix</em>:<em>name</em></code>.) See other versions of this method for a variant that does not require a prefix. @param value the value of the attribute. =item XMLOutputStream::writeAttribute Writes the given attribute and value to this output stream. @param triple the attribute, in the form of an XMLTriple. @param value the value of the attribute. =item XMLOutputStream::writeXMLDecl Writes a standard XML declaration to this output stream. C<opydetails> doc_xml_declaration =item XMLOutputStream::writeComment Writes an XML comment with the name and version of this program. The XML comment has the following form: @verbatim <!-- Created by <program name> version <program version> on yyyy-MM-dd HH:mm with libSBML version <libsbml version>. --> @endverbatim See the class constructor for more information about this program comment. @param programName an optional program name to write as a comment in the output stream. @param programVersion an optional version identification string to write as a comment in the output stream. @param writeTimestamp an optional flag indicating that a timestamp should be written. =item XMLOutputStream::downIndent Decreases the indentation level for this XMLOutputStream. C<opydetails> doc_indentation @see upIndent() =item XMLOutputStream::upIndent Increases the indentation level for this XMLOutputStream. C<opydetails> doc_indentation @see downIndent() =item XMLOutputStream::getStringStream @internal =item XMLOutputStream::getSBMLNamespaces Returns the SBMLNamespaces object attached to this output stream. @return the SBMLNamespaces object, or C<NULL> if none has been set. =item XMLOutputStream::setSBMLNamespaces Sets the SBMLNamespaces object associated with this output stream. @param sbmlns the namespace object. =item XMLOutputStream::getWriteComment @return a boolean, whether the output stream will write an XML comment at the top of the file. (Enabled by default.) =item XMLOutputStream::setWriteComment sets a flag, whether the output stream will write an XML comment at the top of the file. (Enabled by default.) @param writeComment the flag. =item XMLOutputStream::getWriteTimestamp @return a boolean, whether the output stream will write an XML comment with a timestamp at the top of the file. (Enabled by default.) =item XMLOutputStream::setWriteTimestamp sets a flag, whether the output stream will write an XML comment with a timestamp at the top of the file. (Enabled by default.) @param writeTimestamp the flag. =item XMLOutputStream::getLibraryName @return the name of the library to be used in comments ('libSBML' by default). =item XMLOutputStream::setLibraryName sets the name of the library writing the XML @param libraryName the name of the library to be used in comments. =item XMLOutputStream::getLibraryVersion @return a string representing the version of the library writing the output. This is the value of getLibSBMLDottedVersion() by default. =item XMLOutputStream::setLibraryVersion sets the name of the library writing the output @param libraryVersion the version information as string. =item XMLOutputStream::getIndent @internal =item XMLOutputStream::setIndent @internal =item XMLOutputStream::XMLOutputStream @internal =item XMLOutputStream::XMLOutputStream @internal =item XMLOutputStream::writeChars @internal =item XMLOutputStream::writeIndent @internal =item XMLOutputStream::writeName @internal =item XMLOutputStream::writeName @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::writeValue @internal =item XMLOutputStream::setStringStream @internal =item XMLOutputStream::unsetStringStream @internal =item XMLOutputStringStream::XMLOutputStringStream @internal =item XMLOutputStringStream::getString @internal =item XMLOwningOutputStringStream::XMLOwningOutputStringStream @internal =item XMLOutputFileStream::XMLOutputFileStream @internal =item XMLOwningOutputFileStream::XMLOwningOutputFileStream @internal =back =head2 XMLInputStream @sbmlpackage{core} @htmlinclude pkg-marker-core.html An interface to an XML input stream. @htmlinclude not-sbml-warning.html SBML content is serialized using XML; the resulting data can be stored and read to/from a file or data stream. Low-level XML parsers such as Xerces provide facilities to read XML data. To permit the use of different XML parsers (Xerces, Expat or libxml2), libSBML implements an abstraction layer. XMLInputStream and XMLOutputStream are two parts of that abstraction layer. XMLInputStream is an interface to a file or text string containing XML. It wraps the content to be read, as well as the low-level XML parser to be used and an XMLErrorLog to record errors and other issues (if any arise). Internally, the content will be in the form of either a pointer to a file name or a character string; XMLInputStream knows the form of the content and acts appropriately. Other libSBML object classes use XMLInputStream as their interface for all read operations on the XML data. XMLInputStream provides the functionality to extract data in the form of XMLToken objects. It logs any errors encountered while reading. It also keeps track of whether a read operation has failed irrecoverably or determines whether it is safe to continue reading. SBMLNamespaces objects can be associated with an XMLInputStream; this facilitates logging errors related to reading XML attributes and elements that may only be relevant to particular Level and Version combinations of SBML. @note The convenience of the XMLInputStream and XMLOutputStream abstraction may be useful for developers interested in creating parsers for other XML formats besides SBML. It can provide developers with a layer above more basic XML parsers, as well as some useful programmatic elements such as XMLToken, XMLError, etc. @see XMLOutputStream =over =item XMLInputStream::XMLInputStream Creates a new XMLInputStream. @param content the source of the stream. @param isFile a boolean flag to indicate whether C<content> is a file name. If C<true>, C<content> is assumed to be the file from which the XML content is to be read. If C<false>, C<content> is taken to be a string that I<is> the content to be read. @param library the name of the parser library to use. @param errorLog the XMLErrorLog object to use. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLInputStream::getEncoding Returns the encoding of the XML stream. C<opydetails> doc_xml_encoding @return the encoding of the XML stream. @see getVersion() =item XMLInputStream::getVersion Returns the version of the XML stream. C<opydetails> doc_xml_version @return the version of the XML stream. @see getEncoding() =item XMLInputStream::getErrorLog Returns the XMLErrorLog used to log parsing problems. @return the XMLErrorLog used to log XML parse errors and other validation errors (and messages). =item XMLInputStream::isEOF Returns C<true> if end of file (stream) has been reached. @return C<true> if end of file (stream) has been reached, C<false> otherwise. =item XMLInputStream::isError Returns C<true> if a fatal error occurred while reading from this stream. @return C<true> if a fatal error occurred while reading from this stream. =item XMLInputStream::isGood Returns C<true> if the stream is in a good state. The definition of "good state" is that isEOF() and isError() both return C<false>. @return C<true> if the stream is in a good state, C<false> otherwise. =item XMLInputStream::next Returns the next token on this XML input stream. The token is consumed in the process. @return the next XMLToken, or an EOF token (i.e., C<XMLToken.isEOF() == true>). @see peek() =item XMLInputStream::peek Returns the next token I<without> consuming it. A subsequent call to either peek() or next() will return the same token. @return the next XMLToken or EOF (XMLToken.isEOF() == true). @see next() =item XMLInputStream::skipPastEnd Consume zero or more tokens up to and including the corresponding end element or EOF. @param element the element whose end will be sought in the input stream. =item XMLInputStream::skipText Consume zero or more tokens up to but not including the next XML element or EOF. =item XMLInputStream::setErrorLog Sets the XMLErrorLog this stream will use to log errors. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item XMLInputStream::toString Prints a string representation of the underlying token stream. @return a string representing the underlying XML token stream. @note This method is intended for debugging purposes. =item XMLInputStream::getSBMLNamespaces Returns the SBMLNamespaces object attached to this XMLInputStream. @return the SBMLNamespaces object or C<NULL> if none has been set. =item XMLInputStream::setSBMLNamespaces Sets the SBML namespaces associated with this XML input stream. This allows this stream to reference the available SBML namespaces being read. @param sbmlns the list of namespaces to use. =item XMLInputStream::determineNumberChildren Returns the number of child tokens of the given element in this stream. This method allows information from the input stream to be determined without the need to actually read and consume the tokens in the stream. It returns the number of child elements of the element represented by the C<elementName>, i.e., the number of child elements encountered before the closing tag for the C<elementName> supplied. If no C<elementName> is supplied or it is an empty string, then as a special case, this method assumes the element is a MathML C<apply> element followed by a function name. @param elementName a string representing the name of the element for which the number of children are to be determined. @return an unsigned int giving the number of children of the @p elementName specified. @note This method assumes the stream has been read up to and including the element C<elementName>. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLInputStream::determineNumSpecificChildren Returns the number of child tokens of the specified type within a given container element. This method allows information from the input stream to be determined without the need to actually read and consume the tokens in the stream. It returns the number of child elements of the C<childName> element within the element specified by C<container>. In other words, it counts the number of C<childName> elements encountered before the closing tag for the C<container> supplied. @param childName a string representing the name of the child element whose number is to be determined. @param container a string representing the name of the element for which the number of children are to be determined. @return an unsigned int giving the number of children of type @p childName within the C<container> element. @note This method assumes the stream has been read up to and including the element C<container>. =item XMLInputStream::containsChild Predicate returning C<true> if a child token of the specified type occurs within a given container element. This method allows information from the input stream to be determined without the need to actually read and consume the tokens in the stream. It returns C<true> if the C<childName> element occurs at any point within the element specified by C<container>. @param childName a string representing the name of the child element whose presence is to be determined. @param container a string representing the name of the element for which the presence of the child element is to be determined. @return boolean C<true> if a child of type C<childName> occurs within the C<container> element, C<false> otherwise. @note This method assumes the stream has been read up to and including the element C<container>. =item XMLInputStream::XMLInputStream @internal =item XMLInputStream::XMLInputStream @internal =item XMLInputStream::queueToken @internal =item XMLInputStream::requeueToken @internal =back =head2 XMLError @sbmlpackage{core} @htmlinclude pkg-marker-core.html XML-level errors, warnings and other diagnostics. @htmlinclude not-sbml-warning.html LibSBML can be configured to use any of a number of XML parsers; at the time of this writing, libSBML supports Xerces versions 2.4 through 3.1, Expat version 1.95.x and higher, and libxml2 version 2.6.16 and higher. These parsers each report different status codes for the various exceptions that can occur during XML processing. The XMLError object class abstracts away from the particular diagnostics reported by the different parsers and presents a single uniform interface and set of status codes, along with operations for manipulating the error objects. When the libSBML XML parser layer encounters an error in the XML content being processed, or when there is something else wrong (such as an out-of-memory condition), the problems are reported as XMLError objects. Each XMLError object instance has an identification number that identifies the nature of the problem. @if clike This error identifier will be up to five digits long and drawn from the enumeration <a class="el" href="#error-codes">XMLErrorCode_t</a>. Applications can use the error identifiers as a means of recognizing the error encountered and changing their behavior if desired. @else This error identifier is one of the constants listed in the next section below. Applications can use the error identifiers as a means of recognizing the error encountered and changing their behavior if desired. @endif@~ Integer error codes are useful for software, but not so much for telling humans what happened. For this reason, XMLError also provides two text messages describing the nature of the error. These messages are accessible by means of the methods XMLError::getShortMessage() and XMLError::getMessage(). The method XMLError::getShortMessage() returns a very brief synopsis of the warning or error condition, whereas XMLError::getMessage() returns a longer explanation. These text strings are suitable for displaying to human users. Each XMLError object also contains a category code; its value may be retrieved using the method XMLError::getCategory(). Category values are drawn from @if clike the enumeration <a class="el" href="#XMLErrorCategory_t">XMLErrorCategory_t</a> described below.@else a set of constants whose names begin with the characters C<LIBSBML_CAT_>, described below.@endif@~ Categories are used by libSBML to provide more information to calling programs about the nature of a given error. In addition to category codes, each XMLError object also has a severity code; its value may be retrieved using the method XMLError::getSeverity(). Severity code values are drawn from @if clike the enumeration <a class="el" href="#XMLErrorSeverity_t">XMLErrorSeverity_t</a>@else a set of constants whose names begin with the characters C<LIBSBML_SEV_@endif>, described below. Severity levels range from informational (@link XMLErrorSeverity_t#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to fatal errors (@link XMLErrorSeverity_t#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). Finally, XMLError objects record the line and column near where the problem occurred in the XML content. The values can be retrieved using the methods XMLError::getLine() and XMLError::getColumn(). We say "near where the problem occurred", because many factors affect how accurate the line/column information ultimately is. For example, sometimes, the underlying XML parsers can only report such information for the parent XML element where an error occurs, and not for the specific point where the problem occurs. In other situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the XMLError object to either C<0> or the value of the maximum unsigned long integer representable on the platform where libSBML is running. The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation. @if clike <h3><a class="anchor" name="error-codes">XMLErrorCode_t</a></h3> This is an enumeration of all the error and warning codes returned by the XML layer in libSBML. Each code is an integer with a 4-digit value less than 10000. The following table lists each possible value and a brief description of its meaning. @endif@if java <h3><a class="anchor" name="error-codes">Error codes associated with XMLError objects</a></h3> The error and warning codes returned by the XML layer in libSBML are listed in the table below. In the libSBML Java language interface, these error identifiers are currently implemented as static integer constants defined in the interface class <code><a href="libsbmlConstants.html">libsbmlConstants</a></code>. This is admittedly not an ideal approach from the standpoint of modern Java programming, but it was necessary to work around the lack of enumerations in Java prior to JDK 1.5. Future versions of libSBML may use a proper Java enumeration type to define the error identifiers. @endif@if csharp <h3><a class="anchor" name="error-codes">Error codes associated with XMLError objects</a></h3> The error and warning codes returned by the XML layer in libSBML are listed in the table below. In the libSBML C# language interface, these error identifiers are currently implemented as static integer constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif@~ <center> <table cellspacing="1" cellpadding="1" border="0" width="95%" class="text-table normal-font alt-row-colors"> <caption>Possible XMLError error codes. Depending on the programming language in use, the <em>Enumerator</em> values will be defined either as a value from an enumeration type @if clike (XMLErrorCode_t)@endif@~ or as integer constants. To make this table more compact, we have shortened the identifiers for the category and severity codes to their essential parts. To get the actual names of the constants, prepend C<LIBSBML_CAT_> to the category names and C<LIBSBML_SEV_> to the severity names shown in the two right-hand columns. </caption> <tr style="background: lightgray" class="normal-font"> <th style="text-align: left">Enumerator</th> <th>Meaning</th> <th width="90" style="text-align: left">Category</th> <th width="90" style="text-align: left">Severity</th> </tr> <tr><td>@link XMLErrorCode_t#XMLUnknownError XMLUnknownError@endlink</td><td>Unrecognized error encountered internally</td><td>INTERNAL</td><td>FATAL</td></tr> <tr><td>@link XMLErrorCode_t#XMLOutOfMemory XMLOutOfMemory@endlink</td> <td>Out of memory</td><td>SYSTEM</td><td>FATAL</td></tr> <tr><td>@link XMLErrorCode_t#XMLFileUnreadable XMLFileUnreadable@endlink</td> <td>File unreadable</td><td>SYSTEM</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLFileUnwritable XMLFileUnwritable@endlink</td> <td>File unwritable</td><td>SYSTEM</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLFileOperationError XMLFileOperationError@endlink</td><td>Error encountered while attempting file operation</td><td>SYSTEM</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLNetworkAccessError XMLNetworkAccessError@endlink</td><td>Network access error</td><td>SYSTEM</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#InternalXMLParserError InternalXMLParserError@endlink</td><td>Internal XML parser state error</td><td>INTERNAL</td><td>FATAL</td></tr> <tr><td>@link XMLErrorCode_t#UnrecognizedXMLParserCode UnrecognizedXMLParserCode@endlink</td><td>XML parser returned an unrecognized error code</td><td>INTERNAL</td><td>FATAL</td></tr> <tr><td>@link XMLErrorCode_t#XMLTranscoderError XMLTranscoderError@endlink</td><td>Character transcoder error</td><td>INTERNAL</td><td>FATAL</td></tr> <tr><td>@link XMLErrorCode_t#MissingXMLDecl MissingXMLDecl@endlink</td><td>Missing XML declaration at beginning of XML input</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#MissingXMLEncoding MissingXMLEncoding@endlink</td><td>Missing encoding attribute in XML declaration</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLDecl BadXMLDecl@endlink</td><td>Invalid or unrecognized XML declaration or XML encoding</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLDOCTYPE BadXMLDOCTYPE@endlink</td><td>Invalid, malformed or unrecognized XML DOCTYPE declaration</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#InvalidCharInXML InvalidCharInXML@endlink</td><td>Invalid character in XML content</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadlyFormedXML BadlyFormedXML@endlink</td><td>XML content is not well-formed</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#UnclosedXMLToken UnclosedXMLToken@endlink</td><td>Unclosed XML token</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#InvalidXMLConstruct InvalidXMLConstruct@endlink</td><td>XML construct is invalid or not permitted</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLTagMismatch XMLTagMismatch@endlink</td><td>Element tag mismatch or missing tag</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#DuplicateXMLAttribute DuplicateXMLAttribute@endlink</td><td>Duplicate XML attribute</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#UndefinedXMLEntity UndefinedXMLEntity@endlink</td><td>Undefined XML entity</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadProcessingInstruction BadProcessingInstruction@endlink</td><td>Invalid, malformed or unrecognized XML processing instruction</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLPrefix BadXMLPrefix@endlink</td><td>Invalid or undefined XML namespace prefix</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLPrefixValue BadXMLPrefixValue@endlink</td><td>Invalid XML namespace prefix value</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#MissingXMLRequiredAttribute MissingXMLRequiredAttribute@endlink</td><td>Missing a required XML attribute</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLAttributeTypeMismatch XMLAttributeTypeMismatch@endlink</td><td>Data type mismatch for the value of an attribute</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLBadUTF8Content XMLBadUTF8Content@endlink</td><td>Invalid UTF8 content</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#MissingXMLAttributeValue MissingXMLAttributeValue@endlink</td><td>Missing or improperly formed attribute value</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLAttributeValue BadXMLAttributeValue@endlink</td><td>Invalid or unrecognizable attribute value</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLAttribute BadXMLAttribute@endlink</td><td>Invalid, unrecognized or malformed attribute</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#UnrecognizedXMLElement UnrecognizedXMLElement@endlink</td><td>Element either not recognized or not permitted</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLComment BadXMLComment@endlink</td><td>Badly formed XML comment</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLDeclLocation BadXMLDeclLocation@endlink</td><td>XML declaration not permitted in this location</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLUnexpectedEOF XMLUnexpectedEOF@endlink</td><td>Reached end of input unexpectedly</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLIDValue BadXMLIDValue@endlink</td><td>Value is invalid for XML ID, or has already been used</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLIDRef BadXMLIDRef@endlink</td><td>XML ID value was never declared</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#UninterpretableXMLContent UninterpretableXMLContent@endlink</td><td>Unable to interpret content</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#BadXMLDocumentStructure BadXMLDocumentStructure@endlink</td><td>Bad XML document structure</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#InvalidAfterXMLContent InvalidAfterXMLContent@endlink</td><td>Encountered invalid content after expected content</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLExpectedQuotedString XMLExpectedQuotedString@endlink</td><td>Expected to find a quoted string</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLEmptyValueNotPermitted XMLEmptyValueNotPermitted@endlink</td><td>An empty value is not permitted in this context</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLBadNumber XMLBadNumber@endlink</td><td>Invalid or unrecognized number</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLBadColon XMLBadColon@endlink</td><td>Colon characters are invalid in this context</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#MissingXMLElements MissingXMLElements@endlink</td><td>One or more expected elements are missing</td><td>XML</td><td>ERROR</td></tr> <tr><td>@link XMLErrorCode_t#XMLContentEmpty XMLContentEmpty@endlink</td><td>Main XML content is empty</td><td>XML</td><td>ERROR</td></tr> </table> </center> @if clike <h3><a class="anchor" name="error-categories">XMLErrorCategory_t</a></h3> As discussed above, each XMLError object contains a value for a category identifier, describing the type of issue that the XMLError object represents. The category can be retrieved from an XMLError object using the method XMLError::getCategory(). The value is chosen from the enumeration of category codes <a class="el" href="#XMLErrorCategory_t"> XMLErrorCategory_t</a>. The following table lists each possible value and a brief description of its meaning. @endif@if java <h3><a class="anchor" name="error-categories">Category codes associated with XMLError objects</a></h3> As discussed above, each XMLError object contains a value for a category identifier, describing the type of issue that the XMLError object represents. The category can be retrieved from an XMLError object using the method XMLError::getCategory(). The following table lists each possible value and a brief description of its meaning. As is the case with the error codes, in the libSBML Java language interface, the category identifiers are currently implemented as static integer constants defined in the interface class C<libsbmlConstants> in the file "<a href="libsbmlConstants.html">libsbmlConstants.java</a>". @endif@if csharp <h3><a class="anchor" name="error-categories">Category codes associated with XMLError objects</a></h3> As discussed above, each XMLError object contains a value for a category identifier, describing the type of issue that the XMLError object represents. The category can be retrieved from an XMLError object using the method XMLError::getCategory(). The following table lists each possible value and a brief description of its meaning. As is the case with the error codes, in the libSBML C# language interface, the category identifiers are currently implemented as static integer constants defined in the interface class @link libsbmlcs.libsbml@endlink. @endif@~ <center> <table width="95%" cellspacing="1" cellpadding="1" border="0" class="text-table normal-font alt-row-colors"> <tr style="background: lightgray" class="normal-font"> <th style="text-align: left">Enumerator</th> <th>Meaning</th> </tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink</td> <td>A problem involving the libSBML software itself or the underlying XML parser. This almost certainly indicates a software defect (i.e., bug) in libSBML. Please report instances of this to the libSBML developers.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink</td> <td>A problem reported by the operating system, such as an inability to read or write a file. This indicates something that is not a program error but is outside of the control of libSBML.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink</td> <td>A problem in the XML content itself. This usually arises from malformed XML or the use of constructs not permitted in SBML.</td></tr> </table> </center> @if clike <h3><a class="anchor" name="error-severities">XMLErrorSeverity_t</a></h3> As described above, each XMLError object contains a value for a severity code, describing how critical is the issue that the XMLError object represents. The severity can be retrieved from an XMLError object using the method XMLError::getSeverity(). The value is chosen from the enumeration of category codes <a class="el" href="#XMLErrorSeverity_t"> XMLErrorSeverity_t</a>. The following table lists each possible value and a brief description of its meaning. @endif@if java <h3><a class="anchor" name="error-severities">Severity codes associated with XMLError objects</a></h3> As described above, each XMLError object contains a value for a severity code, describing how severe is the issue that the XMLError object represents. The severity be retrieved from an XMLError object using the method XMLError::getSeverity(). The following table lists each possible value and a brief description of its meaning. As is the case with the category codes, in the libSBML Java language interface, these severity codes are currently implemented as static integer constants defined in the interface class C<libsbmlConstants> in the file "<a href="libsbmlConstants.html">libsbmlConstants.java</a>". This is admittedly not an ideal approach from the standpoint of modern Java programming, but it was necessary to work around the lack of enumerations in Java prior to JDK 1.5. Future versions of libSBML may use a proper Java enumeration type to define the severity codes. @endif@if csharp <h3><a class="anchor" name="error-severities">Severity codes associated with XMLError objects</a></h3> As described above, each XMLError object contains a value for a severity code, describing how severe is the issue that the XMLError object represents. The severity be retrieved from an XMLError object using the method XMLError::getSeverity(). The following table lists each possible value and a brief description of its meaning. As is the case with the category codes, in the libSBML C# language interface, these severity codes are currently implemented as static integer constants defined in the interface class @link libsbmlcs.libsbml@endlink.@endif@~ <center> <table width="95%" cellspacing="1" cellpadding="1" border="0" class="text-table normal-font alt-row-colors"> <tr style="background: lightgray" class="normal-font"> <th style="text-align: left">Enumerator</th> <th>Meaning</th> </tr> <tr><td>@link XMLErrorSeverity_t#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink</td> <td>The error is actually informational and not necessarily a serious problem.</td></tr> <tr><td>@link XMLErrorSeverity_t#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink</td> <td>The error object represents a problem that is not serious enough to necessarily stop the problem, but applications should take note of the problem and evaluate what its implications may be.</td></tr> <tr><td>@link XMLErrorSeverity_t#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink</td> <td>The error object represents a serious error. The application may continue running but it is unlikely to be able to continue processing the same XML file or data stream.</td></tr> <tr><td>@link XMLErrorSeverity_t#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink</td> <td>A serious error occurred, such as an out-of-memory condition, and the software should terminate immediately.</td></tr> </table> </center> =over =item XMLError::XMLError Creates a new XMLError to report that something occurred during XML processing. XMLError objects have identification numbers to indicate the nature of the exception. @if clike These numbers are drawn from the enumeration <a class="el" href="#error-codes">XMLErrorCode_t</a>. @else These numbers are defined as unsigned integer constants in the file "libsbmlConstants.java". See the <a class="el" href="#error-codes">top of this documentation</a> for a table listing the possible values and their meanings. @endif@~ The argument @p errorId to this constructor I<can> be (but does not have to be) a value from this @if clike enumeration. If it is a value from <a class="el" href="#error-codes">XMLErrorCode_t</a>, the XMLError class assumes the error is a low-level system or XML layer error and <em>prepends</em> a built-in, predefined error message to any string passed in the argument C<details> to this constructor. In addition, all <a class="el" href="#error-codes">XMLErrorCode_t</a> errors have associated values for the C<severity> and C<category> codes, and these fields are filled-in as well from the enumerations <a class="el" href="#error-severities">XMLErrorSeverity_t</a> and <a class="el" href="#error-categories">XMLErrorCategory_t</a>, respectively. @else set of constants. If it is one of the predefined error identifiers, the XMLError class assumes the error is a low-level system or XML layer error and <em>prepends</em> a built-in, predefined error message to any string passed in the argument C<details> to this constructor. In addition, all the predefined error identifiers have associated values for the @p severity and C<category> codes, and these fields are filled-in as well. @endif@~ If the error identifier C<errorId> is a number greater than 9999, this constructor assumes that the error was generated from another part of the software, and does not do additional filling in of values beyond the defaults in the constructor itself. This allows XMLError to serve as a base class for other errors (and is used in this way elsewhere in libSBML). Callers should fill in all the parameters with suitable values if generating errors with codes greater than 9999 to make maximum use of the XMLError facilities. @if clike As mentioned above, there are two other enumerations, <a class="el" href="#error-severities">XMLErrorSeverity_t</a> and <a class="el" href="#error-categories">XMLErrorCategory_t</a>, used for indicating the severity and category of error for the predefined XMLError codes. The values passed in C<severity> and C<category> override the defaults assigned based on the error code. If the value of C<errorId> is a value from <a class="el" href="#error-codes">XMLErrorCode_t</a>, callers do not need to fill in C<severity> and C<category>. Conversely, if C<errorId> is not a value from <a class="el" href="#error-codes">XMLErrorCode_t</a>, callers can use other values (not just those from <a class="el" href="#error-severities">XMLErrorSeverity_t</a> and <a class="el" href="#error-categories">XMLErrorCategory_t</a>, but their own special values) for C<severity> and @p category. @else As mentioned above, there are additional constants defined for <a class="el" href="#error-severities">standard severity</a> and <a class="el" href="#error-categories">standard category</a> codes, and every predefined error in libSBML has an associated value for severity and category taken from these predefined sets. These constants have symbol names prefixed with C<LIBSBML_SEV_> and C<LIBSBML_CAT_>, respectively. If the value of C<errorId> is one of the standard error codes, callers do not need to fill in C<severity> and C<category> in a call to this constructor. Conversely, if C<errorId> is not an existing XML-level error code, callers can use other values for C<severity> and C<category>. @endif@~ @param errorId an unsigned int, the identification number of the error. @param details a string containing additional details about the error. If the error code in C<errorId> is one that is recognized by XMLError, the given message is I<appended> to a predefined message associated with the given code. If the error code is not recognized, the message is stored as-is as the text of the error. @param line an unsigned int, the line number at which the error occured. @param column an unsigned int, the column number at which the error occured. @param severity an integer indicating severity of the error. @param category an integer indicating the category to which the error belongs. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLError::XMLError Copy constructor; creates a copy of this XMLError. C<orig> the XMLError object to copy. =item XMLError::getErrorId Returns the identifier of this error. @return the error code for this error. @see getMessage() @see getShortMessage() @see getCategory() @see getSeverity() =item XMLError::getMessage Returns the message text of this error. The message associated with an error object describes the nature of the problem. The message returned by this method is generally longer and clearer than the message returned by XMLError::getShortMessage(), but not in all cases. Callers may use XMLError::getCategory() and XMLError::getSeverity() to obtain additional information about the nature and severity of the problem. @return the message text. @see getErrorId() @see getShortMessage() @see getCategory() @see getSeverity() =item XMLError::getShortMessage Returns a brief message for this error. This is an alternative error message that, in general, is as short as the authors could make it. However, brevity is often inversely proportional to clarity, so this short message may not be sufficiently informative to understand the nature of the error. Calling applications may wish to check XMLError::getMessage() in addition or instead. @return the short error message text. @see getErrorId() @see getMessage() @see getCategory() @see getSeverity() =item XMLError::getLine Returns the line number in the XML input near where the error, warning or other diagnostic occurred. We say "near where the problem occurred", because many factors affect how accurate the line/column information ultimately is. For example, sometimes, the underlying XML parsers can only report such information for the parent XML element where an error occurs, and not for the specific point where the problem occurs. In other situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the XMLError object to either C<0> or the value of the maximum unsigned long integer representable on the platform where libSBML is running. The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation. @return the line number. @see getColumn() =item XMLError::getColumn Returns the column number in the XML input near where the error, warning or other diagnostic occurred. We say "near where the problem occurred", because many factors affect how accurate the line/column information ultimately is. For example, sometimes, the underlying XML parsers can only report such information for the parent XML element where an error occurs, and not for the specific point where the problem occurs. In other situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the XMLError object to either C<0> or the value of the maximum unsigned long integer representable on the platform where libSBML is running. The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation. @return the column number. @see getLine() =item XMLError::getSeverity Returns the severity of this error. XMLError defines an enumeration of severity codes for the XML layer. Applications that build on XMLError by subclassing it may add their own severity codes with numbers higher than those in the predefined set of severity codes. @return the severity of this XMLError. @see getSeverityAsString() @see getCategory() =item XMLError::getSeverityAsString Returns a string describing the severity level of this error. XMLError defines an enumeration of severity codes for the XML layer. Applications that build on XMLError by subclassing it may add their own severity codes with numbers higher than those in the predefined set of severity codes. @return string representing the severity of this XMLError. @see getSeverity() @see getCategoryAsString() =item XMLError::getCategory Returns the category of this error. XMLError defines an enumeration of category codes for the XML layer. Applications that build on XMLError by subclassing it may add their own categories with numbers higher than those in the predefined set of category codes. Categories can be used to partition errors into distinct groups. Among other things, this can be used to prevent id conflicts by uniquely identifying an XMLError by both id and category. @return the category of this XMLError. @see getSeverity() @see getCategoryAsString() =item XMLError::getCategoryAsString Returns a string describing the category of this error. XMLError defines an enumeration of category codes for the XML layer. Applications that build on XMLError by subclassing it may add their own categories with numbers higher than those in the predefined set of category codes. Categories can be used to partition errors into distinct groups. Among other things, this can be used to prevent id conflicts by uniquely identifying an XMLError by both id and category. @return string representing the category of this XMLError. @see getCategory() @see getSeverityAsString() =item XMLError::isInfo Predicate returning C<true> or C<false> depending on whether this error object is for information purposes only. This is equivalent to obtaining the severity code from an XMLError object (via XMLError::getSeverity()) and then comparing it to the value @link XMLErrorSeverity_t#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink from the @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ @return C<true> if this XMLError is for informational purposes only, C<false> otherwise. @see isWarning() @see isError() @see isFatal() =item XMLError::isWarning Predicate returning C<true> or C<false> depending on whether this error object is a warning. This is equivalent to obtaining the severity code from an XMLError object (via XMLError::getSeverity()) and then comparing it to the value @link XMLErrorSeverity_t#LIBSBML_SEV_WARNING LIBSBML_SEV_WARNING@endlink from the @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ @return C<true> if this error is a warning, C<false> otherwise. @see isInfo() @see isError() @see isFatal() =item XMLError::isError Predicate returning C<true> or C<false> depending on whether this error is a significant error. This is equivalent to obtaining the severity code from an XMLError object (via XMLError::getSeverity()) and then comparing it to the value @link XMLErrorSeverity_t#LIBSBML_SEV_ERROR LIBSBML_SEV_ERROR@endlink from the @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ @return C<true> if this error is an error, C<false> otherwise. @see isInfo() @see isWarning() @see isFatal() =item XMLError::isFatal Predicate returning C<true> or C<false> depending on whether this error is a fatal run-time error. This is equivalent to obtaining the severity code from an XMLError object (via XMLError::getSeverity()) and then comparing it to the value @link XMLErrorSeverity_t#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink from the @if clike enumeration #XMLErrorSeverity_t. @else set of predefined severity codes.@endif@~ @return C<true> if this error is a fatal error, C<false> otherwise. @see isInfo() @see isWarning() @see isError() =item XMLError::isInternal Predicate returning C<true> or C<false> depending on whether this error resulted from an internal program error. This is equivalent to obtaining the category identifier from an XMLError object (via XMLError::getCategory()) and then comparing it to the value @link XMLErrorCategory_t#LIBSBML_CAT_INTERNAL LIBSBML_CAT_INTERNAL@endlink from the @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ @return a boolean indicating whether the error is an internal error. @see isSystem() @see isXML() =item XMLError::isSystem Predicate returning C<true> or C<false> depending on whether this error was generated by the operating system. This is equivalent to obtaining the category identifier from an XMLError object (via XMLError::getCategory()) and then comparing it to the value @link XMLErrorCategory_t#LIBSBML_CAT_SYSTEM LIBSBML_CAT_SYSTEM@endlink from the @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ @return boolean indicating whether the error is a system error. @see isInternal() @see isXML() =item XMLError::isXML Predicate returning C<true> or C<false> depending on whether this error resulted from a problem in the XML input (e.g., an XML syntax error). This is equivalent to obtaining the category identifier from an XMLError object (via XMLError::getCategory()) and then comparing it to the value @link XMLErrorCategory_t#LIBSBML_CAT_XML LIBSBML_CAT_XML@endlink from the @if clike enumeration #XMLErrorCategory_t. @else set of predefined category codes.@endif@~ @return a boolean indicating whether the error is an XML catetory error. @see isInternal() @see isSystem() =item XMLError::isValid Predicate returning C<true> or C<false> depending on whether this error resulted from a problem or whether it was logged as an unknown error. This is equivalent to obtaining the error identifier from an XMLError object (via XMLError::getErrorId()) and then comparing it to the value XMLUnknownError or UnknownError from the @if clike enumeration #XMLErrorCode_t. @else set of predefined error codes.@endif@~ @return a boolean indicating whether the error is a valid error (C<true>) or whether it is unknown (C<false>). =item XMLError::setLine Sets the line number where this error occurred. @param line an unsigned int, the line number to set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see setColumn(unsigned int column) =item XMLError::setColumn Sets the column number where this error occurred. @param column an unsigned int, the column number to set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see setLine(unsigned int line) =item XMLError::getStandardMessage Returns a copy of the message string associated with the given predefined XMLError code. @param code the error code whose message is sought; it must be a predefined value from @if clike <a class="el" href="#error-codes"> XMLErrorCode_t</a>. @else <a class="el" href="#error-codes">the set of predefined error identifiers</a>.@endif@~ =item XMLError::getPackage Returns the SBML Level 3 package extension (if any) that logged this error. Each error logged by an libSBML extension for SBML Level 3 packages includes a record of the package that logged it. The field is a simple text string. If the string is empty or has the value C<"core">, then the error came from libSBML core; otherwise, the string will be the short-form name of the package (e.g., C<"comp"> for the Hierarchical Model Composition package). @return a string representing the name of the package that logged this error. If the error did not come from a package extension, the value will be the empty string or C<"core">. =item XMLError::getErrorIdOffset Returns libSBML's internal numerical offset for the error code associated with this error. In the SBML Level 3 package specifications, package validation rules are identified by 5-digit numbers prefixed with the nickname of the package itself---e.g., “comp-10101”, “fbc-20301”, etc. Historically, libSBML reported error codes as pure integers, and some application software systems make decisions based on the numerical values of the error codes. To permit these applications to continue to function in this fashion, libSBML internally continues to maintain error identifiers as pure integers. To handle the possibility that errors may come from package extensions, libSBML uses numerical offsets added to the internal error codes. These offsets add two leading digits to the regular 5-digit error codes; for example, “comp” error codes are stored as 1010101, 1020102, etc. The offset in this case is 1000000. Another package will have the offset 2000000, yet another will have 3000000, etc. This method returns the integer offset in this error's error code. Calling applications can get the 5-digit package-specific number for a given error code by subtracting the offset from the value reported by getErrorId(): @verbatim getErrorId() - getErrorIdOffset() @endverbatim When libSBML produces error messages, it combines the text string returned by getPackage() with the subtracted value of the error code, to produce a text string of the form “comp-10101”. @see getErrorId() @see getPackage() =item XMLError::stringForSeverity @internal =item XMLError::stringForCategory @internal =back =head2 XMLErrorLog @sbmlpackage{core} @htmlinclude pkg-marker-core.html Log of diagnostics reported during XML processing. @htmlinclude not-sbml-warning.html The error log is a list. The XML layer of libSBML maintains an error log associated with a given XML document or data stream. When an operation results in an error, or when there is something wrong with the XML content, the problem is reported as an XMLError object stored in the XMLErrorLog list. Potential problems range from low-level issues (such as the inability to open a file) to XML syntax errors (such as mismatched tags or other problems). A typical approach for using this error log is to first use @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif@~ to inquire how many XMLError object instances it contains, and then to iterate over the list of objects one at a time using getError(unsigned int n) const. Indexing in the list begins at 0. In normal circumstances, programs using libSBML will actually obtain an SBMLErrorLog rather than an XMLErrorLog. The former is subclassed from XMLErrorLog and simply wraps commands for working with SBMLError objects rather than the low-level XMLError objects. Classes such as SBMLDocument use the higher-level SBMLErrorLog. =over =item XMLErrorLog::getNumErrors Returns the number of errors that have been logged. To retrieve individual errors from the log, callers may use @if clike getError() @else XMLErrorLog::getError(unsigned int n) @endif. @return the number of errors that have been logged. =item XMLErrorLog::getError Returns the <i>n</i>th XMLError object in this log. Index C<n> is counted from 0. Callers should first inquire about the number of items in the log by using the method @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif. Attempts to use an error index number that exceeds the actual number of errors in the log will result in a C<NULL> being returned. @param n the index number of the error to retrieve (with 0 being the first error). @return the <i>n</i>th XMLError in this log, or C<NULL> if C<n> is greater than or equal to @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif. @see getNumErrors() =item XMLErrorLog::clearLog Deletes all errors from this log. =item XMLErrorLog::XMLErrorLog @internal =item XMLErrorLog::XMLErrorLog @internal =item XMLErrorLog::add @internal =item XMLErrorLog::add @internal =item XMLErrorLog::add @internal =item XMLErrorLog::setParser @internal =item XMLErrorLog::toString Writes all errors contained in this log to a string and returns it. This method uses printErrors() to format the diagnostic messages. Please consult that method for information about the organization of the messages in the string returned by this method. @return a string containing all logged errors and warnings. @see printErrors() =item XMLErrorLog::printErrors Prints all the errors or warnings stored in this error log. This method prints the text to the stream given by the optional parameter C<stream>. If no stream is given, the method prints the output to the standard error stream. The format of the output is: @verbatim N error(s): line NNN: (id) message @endverbatim If no errors have occurred, i.e., C<getNumErrors() == 0>, then no output will be produced. @param stream the ostream or ostringstream object indicating where the output should be printed. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item XMLErrorLog::printErrors Prints the errors or warnings with given severity stored in this error log. This method prints the text to the stream given by the optional parameter C<stream>. If no stream is given, the method prints the output to the standard error stream. The format of the output is: @verbatim N error(s): line NNN: (id) message @endverbatim If no errors with that severity was found, then no output will be produced. @param stream the ostream or ostringstream object indicating where the output should be printed. @param severity the severity of the errors sought. =item XMLErrorLog::isSeverityOverridden Returns a boolean indicating whether or not the severity has been overridden. C<opydetails> doc_what_are_severity_overrides @return C<true> if an error severity override has been set, C<false> otherwise. @see getSeverityOverride() @see setSeverityOverride(@if java int@endif) @see unsetSeverityOverride() @see changeErrorSeverity(@if java int, int, String@endif) =item XMLErrorLog::unsetSeverityOverride Usets an existing override. C<opydetails> doc_what_are_severity_overrides @see getSeverityOverride() @see setSeverityOverride(@if java int@endif) @see isSeverityOverridden() @see changeErrorSeverity(@if java int, int, String@endif) =item XMLErrorLog::getSeverityOverride Returns the current override. C<opydetails> doc_what_are_severity_overrides @return a severity override code. The possible values are drawn from @if clike the enumeration #XMLErrorSeverityOverride_t@else the set of integer constants whose names begin with the prefix C<LIBSBML_OVERRIDE_>@endif: @li @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_DISABLED LIBSBML_OVERRIDE_DISABLED@endlink @li @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_DONT_LOG LIBSBML_OVERRIDE_DONT_LOG@endlink @li @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_WARNING LIBSBML_OVERRIDE_WARNING@endlink @see isSeverityOverridden() @see setSeverityOverride(@if java int@endif) @see unsetSeverityOverride() @see changeErrorSeverity(@if java int, int, String@endif) =item XMLErrorLog::setSeverityOverride Set the severity override. C<opydetails> doc_what_are_severity_overrides @param severity an override code indicating what to do. If the value is @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_DISABLED LIBSBML_OVERRIDE_DISABLED@endlink (the default setting) all errors logged will be given the severity specified in their usual definition. If the value is @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_WARNING LIBSBML_OVERRIDE_WARNING@endlink, then all errors will be logged as warnings. If the value is @link XMLErrorSeverityOverride_t#LIBSBML_OVERRIDE_DONT_LOG LIBSBML_OVERRIDE_DONT_LOG@endlink, no error will be logged, regardless of their severity. @see isSeverityOverridden() @see getSeverityOverride() @see unsetSeverityOverride() @see changeErrorSeverity(@if java int, int, String@endif) =item XMLErrorLog::changeErrorSeverity Changes the severity override for errors in the log that have a given severity. This method searches through the list of errors in the log, comparing each one's severity to the value of C<originalSeverity>. For each error encountered with that severity logged by the named C<package>, the severity of the error is reset to C<targetSeverity>. C<opydetails> doc_what_are_severity_overrides @param originalSeverity the severity code to match. @param targetSeverity the severity code to use as the new severity. @param package a string, the name of an SBML Level 3 package extension to use to narrow the search for errors. A value of C<"all"> signifies to match against errors logged from any package; a value of a package nickname such as C<"comp"> signifies to limit consideration to errors from just that package. If no value is provided, C<"all"> is the default. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see isSeverityOverridden() @see getSeverityOverride() @see setSeverityOverride(@if java int@endif) @see unsetSeverityOverride() =item XMLErrorLog::contains Returns C<true> if XMLErrorLog contains an errorId @param errorId the error identifier of the error to be found. =back =head2 SBMLErrorLog @sbmlpackage{core} @htmlinclude pkg-marker-core.html Log of diagnostics reported during processing. @htmlinclude not-sbml-warning.html The error log is a list. Each SBMLDocument maintains its own SBMLErrorLog. When a libSBML operation on SBML content results in an error, or when there is something worth noting about the SBML content, the issue is reported as an SBMLError object stored in the SBMLErrorLog list. SBMLErrorLog is derived from XMLErrorLog, an object class that serves exactly the same purpose but for the XML parsing layer. XMLErrorLog provides crucial methods such as @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif@~ for determining how many SBMLError or XMLError objects are in the log. SBMLErrorLog inherits these methods. The general approach to working with SBMLErrorLog in user programs involves first obtaining a pointer to a log from a libSBML object such as SBMLDocument. Callers should then use @if java XMLErrorLog::getNumErrors()@else getNumErrors() @endif@~ to inquire how many objects there are in the list. (The answer may be 0.) If there is at least one SBMLError object in the SBMLErrorLog instance, callers can then iterate over the list using SBMLErrorLog::getError(@if java long n@endif)@if clike const@endif, using methods provided by the SBMLError class to find out the error code and associated information such as the error severity, the message, and the line number in the input. If you wish to simply print the error strings for a human to read, an easier and more direct way might be to use SBMLDocument::printErrors(). @see SBMLError @see XMLErrorLog @see XMLError =over =item SBMLErrorLog::getError Returns the <i>n</i>th SBMLError object in this log. Index C<n> is counted from 0. Callers should first inquire about the number of items in the log by using the @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif@~ method. Attempts to use an error index number that exceeds the actual number of errors in the log will result in a C<NULL> being returned. @param n the index number of the error to retrieve (with 0 being the first error). @return the <i>n</i>th SBMLError in this log, or C<NULL> if C<n> is greater than or equal to @if java XMLErrorLog::getNumErrors()@else getNumErrors()@endif. @see getNumErrors() =item SBMLErrorLog::getErrorWithSeverity Returns the <i>n</i>th SBMLError object with given severity in this log. Index C<n> is counted from 0. Callers should first inquire about the number of items in the log by using the @if java SBMLErrorLog::getNumFailsWithSeverity(long severity)@else getNumFailsWithSeverity()@endif@~ method. Attempts to use an error index number that exceeds the actual number of errors in the log will result in a C<NULL> being returned. @param n the index number of the error to retrieve (with 0 being the first error). @param severity the severity of the error to retrieve. @return the <i>n</i>th SBMLError in this log, or C<NULL> if C<n> is greater than or equal to @if java SBMLErrorLog::getNumFailsWithSeverity(long severity)@else getNumFailsWithSeverity()@endif. @see getNumFailsWithSeverity(unsigned int severity) =item SBMLErrorLog::getNumFailsWithSeverity Returns the number of errors that have been logged with the given severity code. C<opydetails> doc_errorlog_what_are_severities @if clike @param severity a value from #SBMLErrorSeverity_t @endif@if java @param severity a value from the set of C<LIBSBML_SEV_> constants defined by the interface class <code><a href="libsbmlConstants.html">libsbmlConstants</a></code> @endif@if python @param severity a value from the set of C<LIBSBML_SEV_> constants defined by the interface class @link libsbml libsbml@endlink. @endif@~ @return a count of the number of errors with the given severity code. @see getNumErrors() =item SBMLErrorLog::getNumFailsWithSeverity Returns the number of errors that have been logged with the given severity code. C<opydetails> doc_errorlog_what_are_severities @if clike @param severity a value from #SBMLErrorSeverity_t @endif@if java @param severity a value from the set of C<LIBSBML_SEV_> constants defined by the interface class <code><a href="libsbmlConstants.html">libsbmlConstants</a></code> @endif@if python @param severity a value from the set of C<LIBSBML_SEV_> constants defined by the interface class @link libsbml libsbml@endlink. @endif@~ @return a count of the number of errors with the given severity code. @see getNumErrors() =item SBMLErrorLog::SBMLErrorLog @internal =item SBMLErrorLog::SBMLErrorLog @internal =item SBMLErrorLog::logError @internal =item SBMLErrorLog::logPackageError @internal =item SBMLErrorLog::add @internal =item SBMLErrorLog::add @internal =item SBMLErrorLog::add @internal =item SBMLErrorLog::remove Removes an error having errorId from the SBMLError list. Only the first item will be removed if there are multiple errors with the given errorId. @param errorId the error identifier of the error to be removed. =item SBMLErrorLog::removeAll Removes all errors having errorId from the SBMLError list. @param errorId the error identifier of the error to be removed. =item SBMLErrorLog::contains Returns C<true> if SBMLErrorLog contains an errorId @param errorId the error identifier of the error to be found. =back =head2 SBMLError @sbmlpackage{core} @htmlinclude pkg-marker-core.html An error, warning or other diagnostic. @htmlinclude not-sbml-warning.html When a libSBML operation on SBML content results in an error, or when there is something wrong with the SBML content, the problems are reported as SBMLError objects. These are generally stored in an SBMLErrorLog object; this log object, in turn, is kept in the SBMLDocument object containing the SBML content. Applications can obtain the list of logged errors using SBMLDocument::getErrorLog() and then use the methods provided by SBMLErrorLog to access individual SBMLError objects. (Note that despite the word "error" in the name, SBMLError objects are used to represent not only "true" errors, but also warnings and some informational diagnostics. The name is a historical hold-over from early versions of libSBML, in which the object really was only used to report errors.) @if clike Each SBMLError object instance has an identification number that identifies the nature of the problem. This "error id" number will be up to five digits long, and it will be listed in one of two enumerations: <a class="el" href="#SBMLErrorCode_t"> SBMLErrorCode_t</a> (described <a class="el" href="#SBMLErrorCode_t"> below</a>) or @link XMLError::XMLErrorCode_t XMLErrorCode_t@endlink (described in the documentation for the class XMLError). The former enumeration contains all the SBML validation rule numbers listed in the appendices of the SBML specification documents, as well as some additional libSBML-specific error codes. @endif@if java Each SBMLError object instance has an identification number that identifies the nature of the problem. This "error id" number will be up to five digits long, and it will come from one of two sets of static integer constants defined in the interface class <code><a href="libsbmlConstants.html"> libsbmlConstants</a></code>: either the SBML error identifiers <a class="el" href="#SBMLErrorCode_t"> (described below)</a> or the XML error identifiers (described in the documentation for the class <code><a href="XMLError.html"> XMLError</a></code>). The former set of constants includes all the SBML validation rule numbers listed in the appendices of the SBML specification documents, as well as some additional libSBML-specific error codes. @endif@if python Each SBMLError object instance has an identification number that identifies the nature of the problem. This "error id" number will be up to five digits long, and it will come from one of two sets of static integer constants defined in the interface class @link libsbml libsbml@endlink: either the SBML error identifiers <a class="el" href="#SBMLErrorCode_t"> (described below)</a> or the XML error identifiers (described in the documentation for the class XMLError). The former set of constants includes all the SBML validation rule numbers listed in the appendices of the SBML specification documents, as well as some additional libSBML-specific error codes. @endif@~ Error codes are useful mainly for software. For human readers, SBMLError also includes text messages that describe the nature of a given problem. The messages can be accessed using SBMLError::getShortMessage() and SBMLError::getMessage(). The former provides a brief one-line description of the issue, while SBMLError::getMessage() provides a more detailed text, including (if appropriate) references to sections of the SBML specifications where relevant topics are discussed. These text strings are suitable for displaying to human users. @if clike An SBMLError object also contains a category code; its value may be retrieved using the method SBMLError::getCategory(). Category values are drawn from the enumeration <a class="el" href="#SBMLErrorCategory_t">SBMLErrorCategory_t</a> described below. Categories are used to partition errors into distinct conceptual groups. This is principally used by the libSBML validation system to group classes of validation checks. For example, @link SBMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink is the category for tests that check identifier consistency; @link SBMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink is the category for MathML consistency checking; and so on. @endif@if java An SBMLError object also contains a category code; its value may be retrieved using the method SBMLError::getCategory(). Category values are drawn from a set of static integer constants defined in <code><a href="libsbmlConstants.html">libsbmlConstants</a></code>, and having names beginning with the characters C<LIBSBML_CAT_>. The list of possible codes is described in a separate section below. Categories are used to partition errors into distinct conceptual groups. This is principally used by the libSBML validation system to group classes of validation checks. For example, @link SBMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink is the category for tests that check identifier consistency; @link SBMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink is the category for MathML consistency checking; and so on. @endif@if python An SBMLError object also contains a category code; its value may be retrieved using the method SBMLError::getCategory(). Category values are drawn from a set of static integer constants defined in @link libsbml libsbml@endlink and having names beginning with the characters C<LIBSBML_CAT_>. The list of possible codes is described in a separate section below. Categories are used to partition errors into distinct conceptual groups. This is principally used by the libSBML validation system to group classes of validation checks. For example, @link SBMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink is the category for tests that check identifier consistency; @link SBMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink is the category for MathML consistency checking; and so on. @endif@~ In addition, SBMLError also has a severity code. Its value may be retrieved using the method SBMLError::getSeverity(). The possible severity values are the same as those reported by @if clike XMLError.@endif@if python XMLError.@endif@if java <code><a href="XMLError.html">XMLError</a></code>.@endif@~ Severity levels currently range from informational (@link XMLErrorSeverity_t#LIBSBML_SEV_INFO LIBSBML_SEV_INFO@endlink) to fatal errors (@link XMLErrorSeverity_t#LIBSBML_SEV_FATAL LIBSBML_SEV_FATAL@endlink). They can be used by an application to evaluate how serious a given problem is. SBMLError also tracks the Level 3 package extension, if any, was responsible for a given warning or error. Each diagnostic code logged by an libSBML extension for SBML Level 3 packages includes a record of the package that logged it. It can be retrieved using SBMLError::getPackage(). The information is a simple text string; the string will be the nickname of the package, such as C<"comp"> for the Hierarchical Model Composition package, C<"fbc"> for the Flux Balance Constraints package, and so on. If the value returned by SBMLError::getPackage() is an empty string or has the value C<"core">, then the error came from libSBML core. Finally, SBMLError records the line and column near where the problem occurred in the SBML content. The values may be retrieved using the methods SBMLError::getLine() and SBMLError::getColumn(). We say "near", because a lot of factors affect how accurate the line/column information ultimately is. For example, different XML parsers have different conventions for which line and column number they report for a particular problem (which makes a difference when a problem involves an opening XML tag on one line and a closing tag on another line). In some situations, some parsers report invalid line and/or column numbers altogether. If this occurs, libSBML sets the line and/or column number in the SBMLError object to the the value of the maximum unsigned long integer representable on the platform where libSBML is running. (This is equal to the constant named C<ULONG_MAX> in C and C++.) The probability that a true line or column number in an SBML model would equal this value is vanishingly small; thus, if an application encounters these values in an XMLError object, it can assume no valid line/column number could be provided by libSBML in that situation. @if clike <h3><a class="anchor" name="SBMLErrorCode_t">SBMLErrorCode_t</a></h3> #SBMLErrorCode_t is an enumeration of all SBML-level error, warning and informational diagnostic codes. Every SBMLError object has an error code value that can be either a value from this enumeration, or a value from the #XMLErrorCode_t enumeration (see the documentation for XMLError). The latter values apply when the error or warning signifies a basic XML issue rather than an SBML issue per se. The values of #SBMLErrorCode_t are distinguished from those of #XMLErrorCode_t by being numbered 10000 and higher, while the XML layer's codes are 9999 and lower. The method SBMLError::getErrorId() returns the error code of a given SBMLError object instance. The following is a table of the symbolic names of #SBMLErrorCode_t values and the meaning of each code. In this table, the right-hand columns titled "L1V1", "L1V2", etc. refer to Levels and Versions of the SBML specifications, and the entries in each column refer to whether the severity of the condition in that particular Level+Version of SBML. The codes stand for the following: @endif@if java <h3><a class="anchor" name="SBMLErrorCode_t">Error codes associated with SBMLError objects</a></h3> The error and warning codes returned by libSBML are listed in the table below. The method SBMLError::getErrorId() returns the error code of a given SBMLError object instance. In the libSBML Java language interface, these error identifiers are currently implemented as static integer constants defined in the interface class <code><a href="libsbmlConstants.html">libsbmlConstants</a></code>. This is admittedly not an ideal approach from the standpoint of modern Java programming, but it was necessary to work around the lack of enumerations in Java prior to JDK 1.5. Future versions of libSBML may use a proper Java enumeration type to define the error identifiers. In this table, the right-hand columns titled "L1V1", "L1V2", etc. refer to Levels and Versions of the SBML specifications, and the entries in each column refer to whether the severity of the condition in that particular Level+Version of SBML. The codes stand for the following: @endif@if python <h3><a class="anchor" name="SBMLErrorCode_t">Error codes associated with SBMLError objects</a></h3> The error and warning codes returned by libSBML are listed in the table below. The method SBMLError::getErrorId() returns the error code of a given SBMLError object instance. In the libSBML Python language interface, these error identifiers are currently implemented as static integer constants defined in the interface class @link libsbml libsbml@endlink. In this table, the right-hand columns titled "L1V1", "L1V2", etc. refer to Levels and Versions of the SBML specifications, and the entries in each column refer to whether the severity of the condition in that particular Level+Version of SBML. The codes stand for the following: @endif@~ <table cellspacing="1" cellpadding="2" border="0" class="normal-font"> <tr><td class="s-na"></td><td>= Not applicable</td></tr> <tr><td class="s-warning"></td><td>= Warning</td></tr> <tr><td class="s-error"></td><td>= Error</td></tr> <tr><td class="s-fatal"></td><td>= Fatal</td></tr> </table> The text shown in the "Meaning" is the text returned by the SBMLError::getShortMessage() method on a given SBMLError object. A longer and (hopefully) clearer explanation of the issue is returned by SBMLError::getMessage(). The error codes come from different lists depending on whether they're from libSBML core or from an SBML Level 3 package extension. @if clike The errors below come from #XMLErrorCode_t and #SBMLErrorCode_t (for core), and #CompSBMLErrorCode_t, #FbcSBMLErrorCode_t, #LayoutSBMLErrorCode_t, and #QualSBMLErrorCode_t (for packages).@endif @ifnot clike However, in the language interfaces other than C++, all libSBML error codes are ultimately represented as integer constants rather than separate enumerations lists, and they are all stored in a single interface class. Codes from different libSBML extensions have names that begin with the package's nickname, such as C<Qual> for the Qualitative Models package, C<Layout> for the Layout package, and so on. If the name of a code does not begin with one of the package nicknames (C<Layout>, C<Fbc>, C<Comp>, C<Qual>, etc.), then it is a code from libSBML core.@endif C<opydetails> doc_sbml_error_table @if clike <h3><a class="anchor" name="SBMLErrorCategory_t">SBMLErrorCategory_t</a></h3> #SBMLErrorCategory_t is an enumeration of category codes for SBMLError diagnostics. The category can be retrieved from an SBMLError object using the method SBMLError::getCategory(). These enumeration values are distinct from (and in addition to) the #XMLErrorCategory_t codes used by the parent XMLError object. User programs receiving an SBMLError object can use this distinction to check whether the error represents a low-level XML problem or an SBML problem. The following table lists each possible value and a brief description of its meaning. @endif@if python <h3><a class="anchor" name="SBMLErrorCategory_t">Category codes associated with SBMLError objects</a></h3> As discussed above, each SBMLError object contains a value for a category identifier, describing the type of issue that the SBMLError object represents. The category can be retrieved from an SBMLError object using the method SBMLError::getCategory(). The following table lists each possible value and a brief description of its meaning. As is the case with the error codes, in the libSBML Python language interface, the category identifiers are currently implemented as static integer constants defined in the interface class @link libsbml libsbml@endlink. The following table lists each possible value and a brief description of its meaning. @endif@if java <h3><a class="anchor" name="SBMLErrorCategory_t">Category codes associated with SBMLError objects</a></h3> As discussed above, each SBMLError object contains a value for a category identifier, describing the type of issue that the SBMLError object represents. The category can be retrieved from an SBMLError object using the method SBMLError::getCategory(). The following table lists each possible value and a brief description of its meaning. As is the case with the error codes, in the libSBML Java language interface, the category identifiers are currently implemented as static integer constants defined in the interface class {@link libsbmlConstants}. The following table lists each possible value and a brief description of its meaning. @endif@if csharp <h3><a class="anchor" name="SBMLErrorCategory_t">Category codes associated with SBMLError objects</a></h3> As discussed above, each SBMLError object contains a value for a category identifier, describing the type of issue that the SBMLError object represents. The category can be retrieved from an SBMLError object using the method SBMLError::getCategory(). The following table lists each possible value and a brief description of its meaning. As is the case with the error codes, in the libSBML C# language interface, the category identifiers are currently implemented as static integer constants defined in the interface class {@link libsbmlcs.libsbml}. The following table lists each possible value and a brief description of its meaning. @endif@~ <center> <table width="90%" cellspacing="1" cellpadding="4" border="0" class="text-table normal-font alt-row-colors"> <tr style="background: lightgray" class="normal-font"> <th>Enumerator</td> <th>Meaning</td> </tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML LIBSBML_CAT_SBML@endlink</td><td>General error not falling into another category below.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L1_COMPAT LIBSBML_CAT_SBML_L1_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model from SBML Level 2 to SBML Level 1.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L2V1_COMPAT LIBSBML_CAT_SBML_L2V1_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 1.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L2V2_COMPAT LIBSBML_CAT_SBML_L2V2_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 2.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_GENERAL_CONSISTENCY LIBSBML_CAT_GENERAL_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating general SBML constructs. With respect to the SBML specification, these concern failures in applying the validation rules numbered 2xxxx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_IDENTIFIER_CONSISTENCY LIBSBML_CAT_IDENTIFIER_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating symbol identifiers in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 103xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_UNITS_CONSISTENCY LIBSBML_CAT_UNITS_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating the units of measurement on quantities in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 105xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_MATHML_CONSISTENCY LIBSBML_CAT_MATHML_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating MathML formulas in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 102xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBO_CONSISTENCY LIBSBML_CAT_SBO_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating SBO identifiers in a model. With respect to the SBML specification, these concern failures in applying the validation rules numbered 107xx in the Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_OVERDETERMINED_MODEL LIBSBML_CAT_OVERDETERMINED_MODEL@endlink</td><td>Error in the system of equations in the model: the system is overdetermined, therefore violating a tenet of proper SBML. With respect to the SBML specification, this is validation rule #10601 in the SBML Level 2 Versions 2–4 and Level 3 Versions 1–2 specifications.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L2V3_COMPAT LIBSBML_CAT_SBML_L2V3_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 3.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_MODELING_PRACTICE LIBSBML_CAT_MODELING_PRACTICE@endlink</td><td>Category of warnings about recommended good practices involving SBML and computational modeling. (These are tests performed by libSBML and do not have equivalent SBML validation rules.)</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_INTERNAL_CONSISTENCY LIBSBML_CAT_INTERNAL_CONSISTENCY@endlink</td><td>Category of errors that can occur while validating libSBML's internal representation of SBML constructs. (These are tests performed by libSBML and do not have equivalent SBML validation rules.)</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L2V4_COMPAT LIBSBML_CAT_SBML_L2V4_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 2 Version 4.</td></tr> <tr><td>@link XMLErrorCategory_t#LIBSBML_CAT_SBML_L3V1_COMPAT LIBSBML_CAT_SBML_L3V1_COMPAT@endlink</td><td>Category of errors that can only occur during attempted translation from one Level/Version of SBML to another. This particular category applies to errors encountered while trying to convert a model to SBML Level 3 Version 1.</td></tr> </table> </center> @if clike <h3><a class="anchor" name="SBMLErrorSeverity_t">SBMLErrorSeverity_t</a></h3> This is an enumeration of severity codes for SBMLError diagnostics. User programs receiving an SBMLError object can use this distinction to check whether the error represents a low-level XML problem or an SBML problem. In libSBML version @htmlinclude libsbml-version.html there are no additional severity codes in #SBMLErrorSeverity_t beyond those defined in #XMLErrorSeverity_t. <hr> @endif@if java <h3><a class="anchor" name="SBMLErrorSeverity_t">Severity codes associated with SBMLError objects</h3> In libSBML version @htmlinclude libsbml-version.html there are no additional severity codes beyond those defined by XMLError. They are implemented as static integer constants defined in the interface class <code><a href="libsbmlConstants.html">libsbmlConstants</a></code>, and have names beginning with C<LIBSBML_SEV_>. @endif@if python <h3><a class="anchor" name="SBMLErrorSeverity_t">Severity codes associated with SBMLError objects</h3> In libSBML version @htmlinclude libsbml-version.html there are no additional severity codes beyond those defined by XMLError. They are implemented as static integer constants defined in the interface class @link libsbml libsbml@endlink, and have names beginning with C<LIBSBML_SEV_>. @endif@~ =over =item SBMLError::SBMLError Creates a new SBMLError to report that something occurred during SBML processing. When a libSBML operation on SBML content results in a warning, error or other diagnostic, the issue is reported as an SBMLError object. SBMLError objects have identification numbers to indicate the nature of the exception. @if clike These numbers are drawn from the enumeration <a class="el" href="#SBMLErrorCode_t"> SBMLErrorCode_t</a>. @endif@if java These numbers are defined as unsigned integer constants in the file "libsbmlConstants.html". See the <a class="el" href="#SBMLErrorCode_t">top of this documentation page</a> for a table listing the possible values and their meanings. @endif@if python These numbers are defined as unsigned integer constants in the interface class @link libsbml libsbml@endlink. See the <a class="el" href="#SBMLErrorCode_t">top of this documentation page</a> for a table listing the possible values and their meanings. @endif@~ The argument C<errorId> to this constructor I<can> be (but does not have to be) a value from this @if clike enumeration. If it I<is> a value from <a class="el" href="#SBMLErrorCode_t">SBMLErrorCode_t</a>, the SBMLError class assumes the error is a low-level system or SBML layer error and <em>prepends</em> a built-in, predefined error message to any string passed in the argument C<details> to this constructor. In addition, all <a class="el" href="#SBMLErrorCode_t">SBMLErrorCode_t</a> errors have associated values for the C<severity> and C<category> codes, and these fields are filled-in as well from the enumerations <a class="el" href="#SBMLErrorSeverity_t">SBMLErrorSeverity_t</a> and <a class="el" href="#SBMLErrorCategory_t">SBMLErrorCategory_t</a>, respectively. @else set of constants. If it @em is one of the predefined error identifiers, the SBMLError class assumes the error is a low-level system or SBML layer error and <em>prepends</em> a built-in, predefined error message to any string passed in the argument C<details> to this constructor. In addition, all the predefined error identifiers have associated values for the C<severity> and C<category> codes, and these fields are filled-in using the libSBML defaults for each different error identifier. @endif@~ If the error identifier C<errorId> is a number greater than 99999, the SBMLError class assumes the error was generated from another part of the software and does not do additional filling in of values beyond the default in the constructor itself. This allows SBMLError to serve as a base class for other errors, such as for user-defined validation rules (see Validator). Callers should fill in all the parameters with suitable values if generating errors with codes greater than 99999 to make maximum use of the SBMLError facilities. @if clike As mentioned above, there are two other enumerations, <a class="el" href="#SBMLErrorSeverity_t">SBMLErrorSeverity_t</a> and <a class="el" href="#SBMLErrorCategory_t">SBMLErrorCategory_t</a>, used for indicating the severity and category of error for the predefined SBMLError codes. The values passed in C<severity> and C<category> override the defaults assigned based on the error code. If the value of C<errorId> is a value from <a class="el" href="#SBMLErrorCode_t">SBMLErrorCode_t</a>, callers do not need to fill in C<severity> and C<category>. Conversely, if C<errorId> is not a value from <a class="el" href="#SBMLErrorCode_t">SBMLErrorCode_t</a>, callers can use other values (not just those from <a class="el" href="#SBMLErrorSeverity_t">SBMLErrorSeverity_t</a> and <a class="el" href="#SBMLErrorCategory_t">SBMLErrorCategory_t</a>, but their own special values) for C<severity> and C<category>. @else As mentioned above, there are additional constants defined for <a class="el" href="#SBMLErrorSeverity_t">standard severity</a> and <a class="el" href="#SBMLErrorCategory_t">standard category</a> codes, and every predefined error in libSBML has an associated value for severity and category taken from these predefined sets. These constants have symbol names prefixed with C<LIBSBML_SEV_> and C<LIBSBML_CAT_>, respectively. If the value of C<errorId> is one of the standard error codes, callers do not need to fill in C<severity> and C<category> in a call to this constructor. Conversely, if C<errorId> is not an existing SBML-level error code, callers can use other values for C<severity> and C<category>. @endif@~ Please see the top of the documentation for SBMLError for a longer discussion of the possible error codes, their meanings, and their applicability to different combinations of Level+Version of SBML. @param errorId an unsigned int, the identification number of the error. @param level the SBML Level of the SBML model. @param version the SBML Version within the Level of the SBML model. @param details a string containing additional details about the error. If the error code in C<errorId> is one that is recognized by SBMLError, the given message is I<appended> to a predefined message associated with the given code. If the error code is not recognized, the message is stored as-is as the text of the error. @param line an unsigned int, the line number at which the error occured. @param column an unsigned int, the column number at which the error occured. @param severity an integer indicating severity of the error. @param category an integer indicating the category to which the error belongs. @param package the SBML Level package involved. @param pkgVersion the version of the C<package>. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item SBMLError::SBMLError Copy constructor; creates a copy of this SBMLError. @param orig the instance to copy. =item SBMLError::stringForSeverity @internal =item SBMLError::stringForCategory @internal =item SBMLError::adjustErrorId @internal =back =head2 CVTerm @sbmlpackage{core} @htmlinclude pkg-marker-core.html A MIRIAM-compliant controlled vocabulary term. @htmlinclude not-sbml-warning.html The SBML Level 2 and Level 3 specifications define a simple format for annotating models when (a) referring to controlled vocabulary terms and database identifiers that define and describe biological and biochemical entities, and (b) describing the creator of a model and the model's modification history. This SBML format is a concrete syntax that conforms to the guidelines of MIRIAM (<a target="_blank" href="http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html">"Minimum Information Requested in the Annotation of biochemical Models"</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). The format uses a subset of W3C RDF (<a target="_blank" href="http://www.w3.org/RDF/">Resource Description Format</a>). In order to help application developers work with annotations in this format, libSBML provides several helper classes that provide higher-level interfaces to the data elements; these classes include CVTerm, ModelCreator, ModelHistory, RDFAnnotationParser, and Date. @section annotation-parts Components of an SBML annotation The SBML annotation format consists of RDF-based content placed inside an C<<annotation>> element attached to an SBML component such as Species, Compartment, etc. A small change was introduced in SBML Level 2 Version 5 and SBML Level 3 Version 2 to permit nested annotations: lower Versions of the SBML specifications did not explicitly allow this. We first describe the different parts of SBML annotations in XML form for SBML Level 2 below Version 5 and SBML Level 3 below Version 2: <pre class="fragment"> <<span style="background-color: #bbb">SBML_ELEMENT</span> <span style="background-color: #d0eed0">+++</span> metaid="<span style="border-bottom: 1px solid black">meta id</span>" <span style="background-color: #d0eed0">+++</span>> <span style="background-color: #d0eed0">+++</span> <annotation> <span style="background-color: #d0eed0">+++</span> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterm="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" > <rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>"> <span style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span> <<span style="background-color: #bbb">RELATION_ELEMENT</span>> <rdf:Bag> <rdf:li rdf:resource="<span style="background-color: #d0d0ee">URI</span>" /> <span style="background-color: #edd">...</span> </rdf:Bag> </<span style="background-color: #bbb">RELATION_ELEMENT</span>> <span style="background-color: #edd">...</span> </rdf:Description> <span style="background-color: #d0eed0">+++</span> </rdf:RDF> <span style="background-color: #d0eed0">+++</span> </annotation> <span style="background-color: #d0eed0">+++</span> </<span style="background-color: #bbb">SBML_ELEMENT</span>> </pre> In the template above, the placeholder <span class="code" style="background-color: #bbb">SBML_ELEMENT</span> stands for the XML tag name of an SBML model component (e.g., C<model>, C<reaction>, etc.) and the placeholder <span class="code" style="border-bottom: 1px solid black">meta id</span> stands for the element's meta identifier, which is a field available on all SBML components derived from the SBase base object class. The <span style="border-bottom: 2px dotted #888">dotted</span> portions are optional, the symbol <span class="code" style="background-color: #d0eed0">+++</span> is a placeholder for either no content or valid XML content that is not defined by this annotation scheme, and the ellipses <span class="code" style="background-color: #edd">...</span> are placeholders for zero or more elements of the same form as the immediately preceding element. The optional content <span class="code" style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span> is a creation and modification history; in libSBML, this is stored using ModelHistory objects. The placeholder <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). Note that these namespace URIs are only labels, and not actual Web locations, which means you cannot visit an address such as C<"http://biomodels.net/model-qualifiers"> in your browser or try to have your application access it. @if clike Refer instead to the enumerations #ModelQualifierType_t and #BiolQualifierType_t for a list of the available relationship elements that can be used for <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>.@endif@~ The <span class="code" style="background-color: #d0d0ee">URI</span> is a required data value that uniquely identifies a resource and data within that resource to which the annotation refers. Again, being URIs, these do not refer to physical Web locations; nevertheless, applications will often want a means of finding the resource to which a given <span class="code" style="background-color: #d0d0ee">URI</span> refers. Providing the facilities for this task is the purpose of MIRIAM Resources, described in detail online at <a target="_blank" href="http://biomodels.net/miriam">http://biomodels.net/miriam</a>) and also in the paper <a target="_blank" href="http://www.biomedcentral.com/1752-0509/1/58">"MIRIAM Resources: tools to generate and resolve robust cross-references in Systems Biology"</a>, <i>BMC Systems Biology</i>, 58(1), 2007. Finally, the following is the same template as above, but this time showing the nested content permitted by the most recent SBML specifications (SBML Level 2 Version 5 and Level 3 Version 2): <pre class="fragment"> <<span style="background-color: #bbb">SBML_ELEMENT</span> <span style="background-color: #d0eed0">+++</span> metaid="<span style="border-bottom: 1px solid black">meta id</span>" <span style="background-color: #d0eed0">+++</span>> <span style="background-color: #d0eed0">+++</span> <annotation> <span style="background-color: #d0eed0">+++</span> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterm="http://purl.org/dc/terms/" xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" > <rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>"> <span style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span> <<span style="background-color: #bbb">RELATION_ELEMENT</span>> <rdf:Bag> <rdf:li rdf:resource="<span style="background-color: #d0d0ee">URI</span>" /> <span style="background-color: #fef">NESTED_CONTENT</span> <span style="background-color: #edd">...</span> </rdf:Bag> </<span style="background-color: #bbb">RELATION_ELEMENT</span>> <span style="background-color: #edd">...</span> </rdf:Description> <span style="background-color: #d0eed0">+++</span> </rdf:RDF> <span style="background-color: #d0eed0">+++</span> </annotation> <span style="background-color: #d0eed0">+++</span> </<span style="background-color: #bbb">SBML_ELEMENT</span>> </pre> The placeholder <span class="code" style="background-color: #fef">NESTED_CONTENT</span> refers to other optional RDF elements such as C<"bqbiol:isDescribedBy"> that describe a clarification or another annotation about the <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span> in which it appears. Nested content allows one to, for example, describe protein modifications on species, or to add evidence codes for an annotation. Nested content relates to its containing <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>, not the other way around. It qualifies it, but does not change its meaning. As such, ignoring a <span class="code" style="background-color: #fef">NESTED_CONTENT</span> does not affect the information provided by the containing <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>. For more information about SBML annotations in general, please refer to Section 6 in the SBML Level 2 (Versions 2–4) or Level 3 specification documents. @section cvterm-parts The parts of a CVTerm Annotations that refer to controlled vocabularies are managed in libSBML using CVTerm objects. The relation-resource pairs discussed in the previous section are the "controlled vocabulary" terms that CVTerm is designed to store and manipulate. A set of RDF-based annotations attached to a given SBML C<<annotation>> element are read by RDFAnnotationParser and converted into a list of these CVTerm objects. Each CVTerm object instance stores the following components of an annotation: \n=over\n <li>The I<qualifier>, which can be a BioModels.net "biological qualifier", a BioModels.net "model qualifier", or an unknown qualifier (as far as the CVTerm class is concerned). Qualifiers are used in MIRIAM to indicate the nature of the relationship between the object being annotated and the resource. In CVTerm, the qualifiers can be manipulated using the methods CVTerm::getQualifierType(), CVTerm::setQualifierType(@if java int@endif), and related methods. <li>The I<resource>, represented by a URI (which, we must remind developers, is not the same as a URL). In the CVTerm class, the resource component can be manipulated using the methods CVTerm::addResource(@if java String@endif) and CVTerm::removeResource(@if java String@endif). \n=back\n Note that a CVTerm contains a single qualifier, but possibly more than one resource. This corresponds to the possibility of an annotation that points to multiple resources, all of which are qualified by the same BioModels.net qualifier. The CVTerm object class supports this by supporting a list of resources. Detailed explanations of the qualifiers defined by BioModels.net can be found at <a target="_blank" href="http://co.mbine.org/standards/qualifiers">http://co.mbine.org/standards/qualifiers</a>. =over =item CVTerm::CVTerm Creates an empty CVTerm, optionally with the given @if clike #QualifierType_t value@else qualifier@endif@~ C<type> . C<opydetails> doc_what_are_cvterms This method creates an empty CVTerm object. The possible qualifier types usable as values of C<type> are @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink and @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink. If an explicit value for C<type> is not given, this method defaults to using @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink. The @if clike #QualifierType_t value@else qualifier type@endif@~ can be set later using the CVTerm::setQualifierType(@if java int@endif) method. Different BioModels.net qualifier elements encode different types of relationships. Please refer to the SBML specification or the <a target="_blank" href="http://co.mbine.org/standards/qualifiers/">BioModels.net qualifiers web page</a> for an explanation of the meaning of these different qualifiers. @param type a @if clike #QualifierType_t value@else qualifier type@endif@~. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item CVTerm::CVTerm Creates a new CVTerm from the given XMLNode. C<opydetails> doc_what_are_cvterms This method creates a CVTerm object from the given XMLNode object @p node. XMLNode is libSBML's representation of a node in an XML tree of elements, and each such element can be placed in a namespace. This constructor looks for the element to be in the XML namespaces C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) and C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier), and if they are, creates CVTerm objects for the result. @param node an XMLNode representing a CVTerm. @note This method assumes that the given XMLNode object C<node> is of the correct structural form. =item CVTerm::CVTerm Copy constructor; creates a copy of a CVTerm object. @param orig the CVTerm instance to copy. =item CVTerm::clone Creates and returns a deep copy of this CVTerm object. @return the (deep) copy of this CVTerm object. =item CVTerm::getQualifierType Returns the qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). The present method returns a code identifying which one of these two relationship namespaces is being used; any other qualifier in libSBML is considered unknown (as far as the CVTerm class is concerned). Consequently, this method will return one of the following values: @li @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink @li @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink @li @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink The specific relationship of this CVTerm to the enclosing SBML object can be determined using the CVTerm methods such as CVTerm::getModelQualifierType() and CVTerm::getBiologicalQualifierType(). Callers will typically want to use the present method to find out which one of the I<other> two methods to call to find out the specific relationship. @return the @if clike #QualifierType_t value@else qualifier type@endif@~ of this object or @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink (the default). @see getResources() @see getModelQualifierType() @see getBiologicalQualifierType() =item CVTerm::getQualifierType Returns the qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). The present method returns a code identifying which one of these two relationship namespaces is being used; any other qualifier in libSBML is considered unknown (as far as the CVTerm class is concerned). Consequently, this method will return one of the following values: @li @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink @li @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink @li @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink The specific relationship of this CVTerm to the enclosing SBML object can be determined using the CVTerm methods such as CVTerm::getModelQualifierType() and CVTerm::getBiologicalQualifierType(). Callers will typically want to use the present method to find out which one of the I<other> two methods to call to find out the specific relationship. @return the @if clike #QualifierType_t value@else qualifier type@endif@~ of this object or @link QualifierType_t#UNKNOWN_QUALIFIER UNKNOWN_QUALIFIER@endlink (the default). @see getResources() @see getModelQualifierType() @see getBiologicalQualifierType() =item CVTerm::getModelQualifierType Returns the model qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). Callers will typically use CVTerm::getQualifierType() to find out the type of qualifier relevant to this particular CVTerm object, then if it is a I<model> qualifier, use the present method to determine the specific qualifier. Annotations with model qualifiers express a relationship between an annotation resource and the <em>modeling concept</em> represented by a given object in the model. The diagram below illustrates the relationship in this case: @image html model-qualifiers.png "Relationship expressed by model qualifiers" @image latex model-qualifiers.png "Relationship expressed by model qualifiers" <br> The set of known model qualifiers is, at the time of this libSBML release, the following: @li @link ModelQualifierType_t#BQM_IS BQM_IS@endlink @li @link ModelQualifierType_t#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink @li @link ModelQualifierType_t#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink @li @link ModelQualifierType_t#BQM_IS_INSTANCE_OF BQM_IS_INSTANCE_OF@endlink @li @link ModelQualifierType_t#BQM_HAS_INSTANCE BQM_HAS_INSTANCE@endlink Any other BioModels.net qualifier found in the model is considered unknown by libSBML and reported as @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink. @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ of this object or @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink (the default). =item CVTerm::getModelQualifierType Returns the model qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). Callers will typically use CVTerm::getQualifierType() to find out the type of qualifier relevant to this particular CVTerm object, then if it is a I<model> qualifier, use the present method to determine the specific qualifier. Annotations with model qualifiers express a relationship between an annotation resource and the <em>modeling concept</em> represented by a given object in the model. The diagram below illustrates the relationship in this case: @image html model-qualifiers.png "Relationship expressed by model qualifiers" @image latex model-qualifiers.png "Relationship expressed by model qualifiers" <br> The set of known model qualifiers is, at the time of this libSBML release, the following: @li @link ModelQualifierType_t#BQM_IS BQM_IS@endlink @li @link ModelQualifierType_t#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink @li @link ModelQualifierType_t#BQM_IS_DERIVED_FROM BQM_IS_DERIVED_FROM@endlink @li @link ModelQualifierType_t#BQM_IS_INSTANCE_OF BQM_IS_INSTANCE_OF@endlink @li @link ModelQualifierType_t#BQM_HAS_INSTANCE BQM_HAS_INSTANCE@endlink Any other BioModels.net qualifier found in the model is considered unknown by libSBML and reported as @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink. @return the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ of this object or @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink (the default). =item CVTerm::getBiologicalQualifierType Returns the biological qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). Callers will typically use CVTerm::getQualifierType() to find out the type of qualifier relevant to this particular CVTerm object, then if it is a I<biological> qualifier, use the present method to determine the specific qualifier. Annotations with biological qualifiers express a relationship between an annotation resource and the <em>biological concept</em> represented by a given object in the model. The diagram below illustrates the relationship in this case: @image html biology-qualifiers.png "Relationship expressed by biological qualifiers" @image latex biology-qualifiers.png "Relationship expressed by biological qualifiers" <br> The set of known biological qualifiers is, at the time of this libSBML release, the following: @li @link BiolQualifierType_t#BQB_IS BQB_IS@endlink @li @link BiolQualifierType_t#BQB_HAS_PART BQB_HAS_PART@endlink @li @link BiolQualifierType_t#BQB_IS_PART_OF BQB_IS_PART_OF@endlink @li @link BiolQualifierType_t#BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink @li @link BiolQualifierType_t#BQB_HAS_VERSION BQB_HAS_VERSION@endlink @li @link BiolQualifierType_t#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink @li @link BiolQualifierType_t#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink @li @link BiolQualifierType_t#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink @li @link BiolQualifierType_t#BQB_ENCODES BQB_ENCODES@endlink @li @link BiolQualifierType_t#BQB_OCCURS_IN BQB_OCCURS_IN@endlink @li @link BiolQualifierType_t#BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink @li @link BiolQualifierType_t#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink @li @link BiolQualifierType_t#BQB_HAS_TAXON BQB_HAS_TAXON@endlink Any other BioModels.net qualifier found in the model is considered unknown by libSBML and reported as @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink. @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ of this object or @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink (the default). =item CVTerm::getBiologicalQualifierType Returns the biological qualifier type of this CVTerm object. C<opydetails> doc_cvterm_common_description The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). Callers will typically use CVTerm::getQualifierType() to find out the type of qualifier relevant to this particular CVTerm object, then if it is a I<biological> qualifier, use the present method to determine the specific qualifier. Annotations with biological qualifiers express a relationship between an annotation resource and the <em>biological concept</em> represented by a given object in the model. The diagram below illustrates the relationship in this case: @image html biology-qualifiers.png "Relationship expressed by biological qualifiers" @image latex biology-qualifiers.png "Relationship expressed by biological qualifiers" <br> The set of known biological qualifiers is, at the time of this libSBML release, the following: @li @link BiolQualifierType_t#BQB_IS BQB_IS@endlink @li @link BiolQualifierType_t#BQB_HAS_PART BQB_HAS_PART@endlink @li @link BiolQualifierType_t#BQB_IS_PART_OF BQB_IS_PART_OF@endlink @li @link BiolQualifierType_t#BQB_IS_VERSION_OF BQB_IS_VERSION_OF@endlink @li @link BiolQualifierType_t#BQB_HAS_VERSION BQB_HAS_VERSION@endlink @li @link BiolQualifierType_t#BQB_IS_HOMOLOG_TO BQB_IS_HOMOLOG_TO@endlink @li @link BiolQualifierType_t#BQB_IS_DESCRIBED_BY BQB_IS_DESCRIBED_BY@endlink @li @link BiolQualifierType_t#BQB_IS_ENCODED_BY BQB_IS_ENCODED_BY@endlink @li @link BiolQualifierType_t#BQB_ENCODES BQB_ENCODES@endlink @li @link BiolQualifierType_t#BQB_OCCURS_IN BQB_OCCURS_IN@endlink @li @link BiolQualifierType_t#BQB_HAS_PROPERTY BQB_HAS_PROPERTY@endlink @li @link BiolQualifierType_t#BQB_IS_PROPERTY_OF BQB_IS_PROPERTY_OF@endlink @li @link BiolQualifierType_t#BQB_HAS_TAXON BQB_HAS_TAXON@endlink Any other BioModels.net qualifier found in the model is considered unknown by libSBML and reported as @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink. @return the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ of this object or @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink (the default). =item CVTerm::getResources Returns the resource references for this CVTerm object. C<opydetails> doc_cvterm_common_description The <span class="code" style="background-color: #d0d0ee">resource URI</span> values shown in the template above are stored internally in CVTerm objects using an XMLAttributes object. Each attribute stored inside the XMLAttributes will have the same name (specifically, "C<rdf:resource>") but a different value, and the value will be a <span class="code" style="background-color: #d0d0ee"> resource URI</span> shown in the XML template above. A valid CVTerm entity must always have at least one resource and a value for the relationship qualifier. @return the XMLAttributes that store the resources of this CVTerm. @see getQualifierType() @see addResource(const std::string& resource) @see getResourceURI(unsigned int n) =item CVTerm::getResources Returns the resources for this CVTerm object. C<opydetails> doc_cvterm_common_description The <span class="code" style="background-color: #d0d0ee">resource URI</span> values shown in the template above are stored internally in CVTerm objects using an XMLAttributes object. Each attribute stored inside the XMLAttributes will have the same name (specifically, "C<rdf:resource>") but a different value, and the value will be a <span class="code" style="background-color: #d0d0ee"> resource URI</span> shown in the XML template above. A valid CVTerm entity must always have at least one resource and a value for the relationship qualifier. @return the XMLAttributes that store the resources of this CVTerm. @see getQualifierType() @see addResource(const std::string& resource) @see getResourceURI(unsigned int n) =item CVTerm::getNumResources Returns the number of resources for this CVTerm object. C<opydetails> doc_cvterm_common_description The fragment above illustrates that there can be more than one resource referenced by a given relationship annotation (i.e., the <span class="code" style="background-color: #d0d0ee">resource URI</span> values associated with a particular <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>). The present method returns a count of the resources stored in this CVTerm object. @return the number of resources in the set of XMLAttributes of this CVTerm. @see getResources() @see getResourceURI(unsigned int n) =item CVTerm::getNumResources Returns the number of resources for this CVTerm object. C<opydetails> doc_cvterm_common_description The fragment above illustrates that there can be more than one resource referenced by a given relationship annotation (i.e., the <span class="code" style="background-color: #d0d0ee">resource URI</span> values associated with a particular <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>). The present method returns a count of the resources stored in this CVTerm object. @return the number of resources in the set of XMLAttributes of this CVTerm. @see getResources() @see getResourceURI(unsigned int n) =item CVTerm::getResourceURI Returns the value of the <em>n</em>th resource for this CVTerm object. C<opydetails> doc_cvterm_common_description The fragment above illustrates that there can be more than one resource referenced by a given relationship annotation (i.e., the <span class="code" style="background-color: #d0d0ee">resource URI</span> values associated with a particular <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>). LibSBML stores all resource URIs in a single CVTerm object for a given relationship. Callers can use CVTerm::getNumResources() to find out how many resources are stored in this CVTerm object, then call this method to retrieve the <em>n</em>th resource URI. @param n the index of the resource to query. @return string representing the value of the nth resource in the set of XMLAttributes of this CVTerm. @see getNumResources() @see getQualifierType() =item CVTerm::getResourceURI Returns the value of the <em>n</em>th resource for this CVTerm object. C<opydetails> doc_cvterm_common_description The fragment above illustrates that there can be more than one resource referenced by a given relationship annotation (i.e., the <span class="code" style="background-color: #d0d0ee">resource URI</span> values associated with a particular <span class="code" style="background-color: #bbb">RELATION_ELEMENT</span>). LibSBML stores all resource URIs in a single CVTerm object for a given relationship. Callers can use CVTerm::getNumResources() to find out how many resources are stored in this CVTerm object, then call this method to retrieve the <em>n</em>th resource URI. @param n the index of the resource to query. @return string representing the value of the nth resource in the set of XMLAttributes of this CVTerm. @see getNumResources() @see getQualifierType() =item CVTerm::setQualifierType Sets the @if clike #QualifierType_t@else qualifier code@endif@~ of this CVTerm object. @param type the @if clike #QualifierType_t value@else qualifier type@endif. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getQualifierType() =item CVTerm::setModelQualifierType Sets the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ of this CVTerm object. @param type the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note If the @if clike #QualifierType_t value@else qualifier type@endif@~ of this object is not @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink, then the then the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ will default to @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink. @see getQualifierType() @see setQualifierType(@if java int@endif) =item CVTerm::setBiologicalQualifierType Sets the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ of this CVTerm object. @param type the @if clike #BiolQualifierType_t value@else biology qualifier type@endif. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note If the Qualifier Type of this object is not @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, then the @if clike #BiolQualifierType_t value@else biology qualifier type@endif@~ will default to @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink. @see getQualifierType() @see setQualifierType(@if java int@endif) =item CVTerm::setModelQualifierType Sets the @if clike #ModelQualifierType_t@else model qualifier type@endif@~ value of this CVTerm object. @param qualifier the string representing a model qualifier. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note If the Qualifier Type of this object is not @link QualifierType_t#MODEL_QUALIFIER MODEL_QUALIFIER@endlink, then the @if clike #ModelQualifierType_t value@else model qualifier type@endif@~ will default to @link ModelQualifierType_t#BQM_UNKNOWN BQM_UNKNOWN@endlink. @see getQualifierType() @see setQualifierType(@if java int@endif) =item CVTerm::setBiologicalQualifierType Sets the @if clike #BiolQualifierType_t@else biology qualifier type code@endif@~ of this CVTerm object. @param qualifier the string representing a biology qualifier. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note If the Qualifier Type of this object is not @link QualifierType_t#BIOLOGICAL_QUALIFIER BIOLOGICAL_QUALIFIER@endlink, then the @if clike #BiolQualifierType_t@else biology qualifier type code@endif@~ will default to @link BiolQualifierType_t#BQB_UNKNOWN BQB_UNKNOWN@endlink. @see getQualifierType() @see setQualifierType(@if java int@endif) =item CVTerm::addResource Adds a resource reference to this CVTerm object. C<opydetails> doc_what_are_cvterms The specific RDF element used in this SBML format for referring to external entities is C<<rdf:Description>>, with a C<<rdf:Bag>> element containing one or more C<<rdf:li>> elements. Each such element refers to a data item in an external resource; the resource and data item are together identified uniquely using a URI. The following template illustrates the structure: <pre class="fragment"> <rdf:Description rdf:about="#<span style="border-bottom: 1px solid black">meta id</span>"> <span style="background-color: #e0e0e0; border-bottom: 2px dotted #888">HISTORY</span> <<span style="background-color: #bbb">RELATION_ELEMENT</span>> <rdf:Bag> <rdf:li rdf:resource="<span style="background-color: #d0d0ee">resource URI</span>" /> <span style="background-color: #edd">...</span> </rdf:Bag> </<span style="background-color: #bbb">RELATION_ELEMENT</span>> <span style="background-color: #edd">...</span> </rdf:Description> </pre> In the template above, the placeholder <span class="code" style="border-bottom: 1px solid black">meta id</span> stands for the element's meta identifier, which is a field available on all SBML components derived from the SBase base object class. The <span style="border-bottom: 2px dotted #888">dotted</span> portions are optional, and the ellipses <span class="code" style="background-color: #edd">...</span> are placeholders for zero or more elements of the same form as the immediately preceding element. The placeholder <span class="code" style="background-color: #bbb"> RELATION_ELEMENT</span> refers to a BioModels.net qualifier element name. This is an element in either the XML namespace C<"http://biomodels.net/model-qualifiers"> (for model qualifiers) or C<"http://biomodels.net/biology-qualifiers"> (for biological qualifier). The <span class="code" style="background-color: #d0d0ee">resource URI</span> is a required data value that uniquely identifies a resource and data within that resource to which the annotation refers. The present method allows callers to add a reference to a resource URI with the same relationship to the enclosing SBML object. (In other words, the argument to this method is a <span class="code" style="background-color: #d0d0ee">resource URI</span> as shown in the XML fragment above.) Resources are stored in this CVTerm object within an XMLAttributes object. The relationship of this CVTerm to the enclosing SBML object can be determined using the CVTerm methods such as CVTerm::getModelQualifierType() and CVTerm::getBiologicalQualifierType(). @param resource a string representing the URI of the resource and data item being referenced; e.g., C<"http://www.geneontology.org/#GO:0005892">. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see getResources() @see removeResource(std::string resource) @see getQualifierType() @see getModelQualifierType() @see getBiologicalQualifierType() =item CVTerm::removeResource Removes a resource URI from the set of resources stored in this CVTerm object. @param resource a string representing the resource URI to remove; e.g., C<"http://www.geneontology.org/#GO:0005892">. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @see addResource(const std::string& resource) =item CVTerm::hasRequiredAttributes Predicate returning C<true> if all the required elements for this CVTerm object have been set. @note The required attributes for a CVTerm are: @li a <em>qualifier type</em>, which can be either a model qualifier or a biological qualifier @li at least one resource =item CVTerm::hasBeenModified @internal =item CVTerm::resetModifiedFlags @internal =item CVTerm::hasRequiredAttributes @internal =item CVTerm::getNumNestedCVTerms Returns the number of CVTerm objects nested within this CVTerm object. @return the number of CVTerms nested within this CVTerm object. @note this does not recurse through potentially nested CVTerm objects within a given nested CVTerm. It returns the number of terms immediately nested within this CVTerm. =item CVTerm::getNestedCVTerm Returns the nth CVTerm in the list of CVTerms of this CVTerm object. @param n unsigned int the index of the CVTerm to retrieve. @return the nth CVTerm in the list of CVTerms for this CVTerm object or C<NULL> if no such object exists. =item CVTerm::getNestedCVTerm Returns the nth CVTerm in the list of CVTerms of this CVTerm object. @param n unsigned int the index of the CVTerm to retrieve. @return the nth CVTerm in the list of CVTerms for this CVTerm object or C<NULL> if no such object exists. =item CVTerm::getListNestedCVTerms Returns a list of CVTerm objects contained within this CVTerm object. @return the list of CVTerms for this CVTerm object. =item CVTerm::getListNestedCVTerms Returns a list of CVTerm objects contained within this CVTerm object. @return the list of CVTerms for this CVTerm object. =item CVTerm::addNestedCVTerm Adds a copy of the given CVTerm object to the list of nested CVTerm objects within this CVTerm object. @param term the CVTerm to assign. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item CVTerm::removeNestedCVTerm Removes the nth CVTerm in the list of CVTerms of this CVTerm object and returns a pointer to it. @param n unsigned int the index of the CVTerm to retrieve. @return a pointer to the nth CVTerm in the list of CVTerms for this CVTerm object. =item CVTerm::setHasBeenModifiedFlag @internal =item ModelQualifierType_toString This method takes a model qualifier type code and returns a string representing the code. This method takes a model qualifier type as argument and returns a string name corresponding to that code. For example, passing it the qualifier @link ModelQualifierType_t#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink will return the string C<"isDescribedBy">. @param type the @if clike ModelQualifierType_t@endif@~ value to translate. @ifnot clike The value should be a libSBML constant whose name begins with C<BQM_>, such as (for example) @link BiolQualifierType_t#BQM_IS BQM_IS@endlink.@endif@~ @return a human readable qualifier name for the given qualifier type. @note The caller does not own the returned string and is therefore not allowed to modify it. @if conly @memberof CVTerm_t @endif =item BiolQualifierType_toString This method takes a biol qualifier type code and returns a string representing the code. This method takes a biol qualifier type as argument and returns a string name corresponding to that code. For example, passing it the qualifier @link BiolQualifierType_t#BQB_HAS_VERSION BQB_HAS_VERSION@endlink will return the string C<"hasVersion">. @param type the @if clike #BiolQualifierType_t@endif@~ value to translate. @ifnot clike The value should be a constant whose name begins with C<BQB_>, such as (for example) @link BiolQualifierType_t#BQB_IS BQB_IS@endlink.@endif@~ @return a human readable qualifier name for the given type. @note The caller does not own the returned string and is therefore not allowed to modify it. @if conly @memberof CVTerm_t @endif =item ModelQualifierType_fromString This method takes a string and returns a model qualifier representing the string. This method takes a string as argument and returns a model qualifier type corresponding to that string. For example, passing it the string C<"isDescribedBy"> will return the qualifier @link ModelQualifierType_t#BQM_IS_DESCRIBED_BY BQM_IS_DESCRIBED_BY@endlink. @param s the string to translate to a @if clike #ModelQualifierType_t value@else libSBML constant value representing a model qualifier@endif. @return a libSBML qualifier enumeration value for the given human readable qualifier name. @if conly @memberof CVTerm_t @endif =item BiolQualifierType_fromString This method takes a string and returns a biol qualifier representing the string. This method takes a string as argument and returns a biol qualifier type corresponding to that string. For example, passing it the string C<"hasVersion"> will return the qualifier @link BiolQualifierType_t#BQB_HAS_VERSION BQB_HAS_VERSION@endlink. @param s the string to translate to a @if clike #BiolQualifierType_t value@else libSBML constant value representing a biological qualifier@endif. @return a libSBML qualifier enumeration value for the given human readable qualifier name. @if conly @memberof CVTerm_t @endif =back =head2 Date @sbmlpackage{core} @htmlinclude pkg-marker-core.html A MIRIAM-compliant date representation. @htmlinclude not-sbml-warning.html A Date object stores a reasonably complete representation of date and time. Its purpose is to serve as a way to store dates to be read and written in the <a target="_blank" href="http://www.w3.org/TR/NOTE-datetime">W3C date format</a> used in RDF Dublin Core annotations within SBML. The W3C date format is a restricted form of <a target="_blank" href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>, the international standard for the representation of dates and times. A time and date value in this W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., C<1997-07-16T19:20:30+01:00>) where XHH:ZZ is the time zone offset. The libSBML Date object contains the following fields to represent these values: @li I<year>: an unsigned int representing the year. This should be a four-digit number such as C<2011>. @li I<month>: an unsigned int representing the month, with a range of values of 1–12. The value C<1> represents January, and so on. @li I<day>: an unsigned int representing the day of the month, with a range of values of 1–31. @li I<hour>: an unsigned int representing the hour on a 24-hour clock, with a range of values of 0–23. @li I<minute>: an unsigned int representing the minute, with a range of 0–59. @li I<second>: an unsigned int representing the second, with a range of 0–59. @li I<sign>: an unsigned int representing the sign of the offset (C<0> signifying C<+> and C<1> signifying C<->). See the paragraph below for further explanations. @li I<hours> I<offset>: an unsigned int representing the time zone's hour offset from GMT, with a range of 0–12. @li I<minute> I<offset>: an unsigned int representing the time zone's minute offset from GMT, with a range of 0–59. To illustrate the time zone offset, a value of C<-05:00> would correspond to USA Eastern Standard Time. In the Date object, this would require a value of C<1> for the sign field, C<5> for the hour offset and C<0> for the minutes offset. In the restricted RDF annotations used in SBML, described in Section 6 of the SBML Level 2 and Level 3 specification documents, date/time stamps can be used to indicate the time of creation and modification of a model. The following SBML model fragment illustrates this: @verbatim <model metaid="_180340" id="GMO" name="Goldbeter1991_MinMitOscil"> <annotation> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" > <rdf:Description rdf:about="#_180340"> <dc:creator> <rdf:Bag> <rdf:li rdf:parseType="Resource"> <vCard:N rdf:parseType="Resource"> <vCard:Family>Shapiro</vCard:Family> <vCard:Given>Bruce</vCard:Given> </vCard:N> <vCard:EMAIL>bshapiro@jpl.nasa.gov</vCard:EMAIL> <vCard:ORG rdf:parseType="Resource"> <vCard:Orgname>NASA Jet Propulsion Laboratory</vCard:Orgname> </vCard:ORG> </rdf:li> </rdf:Bag> </dc:creator> <dcterms:created rdf:parseType="Resource"> <dcterms:W3CDTF>2005-02-06T23:39:40+00:00</dcterms:W3CDTF> </dcterms:created> <dcterms:modified rdf:parseType="Resource"> <dcterms:W3CDTF>2005-09-13T13:24:56+00:00</dcterms:W3CDTF> </dcterms:modified> </rdf:Description> </rdf:RDF> </annotation> </model> @endverbatim =over =item Date::Date Creates a time and date representation for use in model annotations and elsewhere. The following is the complete set of possible arguments to this constructor, with default values as indicated: @param year an unsigned integer representing the year. This should be a four-digit number such as C<2011>. (Default value used if this argument is not given: C<2000>.) @param month an unsigned integer representing the month, with a range of values of 1–12. The value C<1> represents January, and so on. (Default value used if this argument is not given: C<1>.) @param day an unsigned integer representing the day of the month, with a range of values of 1–31. (Default value used if this argument is not given: C<1>.) @param hour an unsigned integer representing the hour on a 24-hour clock, with a range of values of 0–23. (Default value used if this argument is not given: C<0>.) @param minute an unsigned integer representing the minute, with a range of 0–59. (Default value used if this argument is not given: C<0>.) @param second an unsigned integer representing the second, with a range of 0–59. (Default value used if this argument is not given: C<0>.) @param sign an unsigned integer representing the sign of the offset (C<0> signifying C<+> and C<1> signifying C<->). See the paragraph below for further explanations. (Default value used if this argument is not given: C<0>.) @param hoursOffset an unsigned integer representing the time zone's hour offset from GMT. (Default value used if this argument is not given: C<0>.) @param minutesOffset an unsigned integer representing the time zone's minute offset from GMT. (Default value used if this argument is not given: C<0>.) To illustrate the time zone offset, a value of C<-05:00> would correspond to USA Eastern Standard Time. In the Date object, this would require a value of C<1> for the sign field, C<5> for the hour offset and C<0> for the minutes offset. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item Date::Date Creates a Date object from a string expressing a date and time value. This constructor expects its argument to be in the <a target="_blank" href="http://www.w3.org/TR/NOTE-datetime">W3C date format with time zone offset</a>, used in RDF Dublin Core annotations within SBML. C<opydetails> doc_date_string_format If this constructor is given a C<NULL> argument or a string of length zero, it constructs a Date object with the value of January 1, 2000, at time 00:00 UTC. Otherwise, the argument I<must> be in the complete format described above, or unpredictable results will happen. @param date a string representing the date. =item Date::Date Copy constructor; creates a copy of this Date. @param orig the object to copy. =item Date::clone Creates and returns a deep copy of this Date object. @return the (deep) copy of this Date object. =item Date::getYear Returns the year from this Date. @return the year from this Date. =item Date::getMonth Returns the month from this Date. @return the month from this Date. =item Date::getDay Returns the day from this Date. @return the day from this Date. =item Date::getHour Returns the hour from this Date. @return the hour from this Date. =item Date::getMinute Returns the minute from this Date. @return the minute from this Date. =item Date::getSecond Returns the seconds from this Date. @return the seconds from this Date. =item Date::getSignOffset Returns the sign of the time zone offset from this Date. @return the sign of the offset from this Date. =item Date::getHoursOffset Returns the hours of the time zone offset from this Date. @return the hours of the offset from this Date. =item Date::getMinutesOffset Returns the minutes of the time zone offset from this Date. @return the minutes of the offset from this Date. =item Date::getDateAsString Returns the current Date value in text-string form. The string returned will be in the <a target="_blank" href="http://www.w3.org/TR/NOTE-datetime">W3C date format with time zone offset</a>, used in RDF Dublin Core annotations within SBML. C<opydetails> doc_date_string_format @return the date as a string. =item Date::setYear Sets the value of the year of this Date object. The value given as argument must be between 1000 and 9999 inclusive. (In the millennium during which this libSBML documentation is being written, a typical value is C<2011>, but we hope that SBML will continue to be used for a long time.) @param year an unsigned int representing the year. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setMonth Sets the value of the month of this Date object. @param month an unsigned int representing the month; it must be in the range 1–12 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setDay Sets the value of the day of this Date object. @param day an unsigned int representing the day; it must be in the range 0–31 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setHour Sets the value of the hour of this Date object. @param hour an unsigned int representing the hour to set; it must be in the range 0–23 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setMinute Sets the value of the minute of this Date object. @param minute an unsigned int representing the minute to set; it must be in the range 0–59 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setSecond Sets the value of the second of the Date object. @param second an unsigned int representing the seconds; it must be in the range 0–59 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setSignOffset Sets the value of the sign of the time zone offset of this Date object. The only permissible values are C<0> and C<1>. @param sign an unsigned int representing the sign of the offset, with C<0> signifying C<+> and C<1> signifying C<->. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setHoursOffset Sets the value of this Date object's time zone hour offset. @param hoursOffset an unsigned int representing the hours of the offset; it must be in the range 0–12 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setMinutesOffset Sets the value of this Date object's time zone minutes offset. @param minutesOffset an unsigned int representing the minutes of the offset; it must be in the range 0–59 or an error will be signaled. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::setDateAsString Sets the value of this Date object using a date and time value expressed as a text string. This method expects its argument to be in the <a target="_blank" href="http://www.w3.org/TR/NOTE-datetime">W3C date format with time zone offset</a>, used in RDF Dublin Core annotations within SBML. C<opydetails> doc_date_string_format If this method is given a C<NULL> argument or a string of length zero, it constructs a Date object with the value of January 1, 2000, at time 00:00 UTC. Otherwise, the argument I<must> be in the complete format described above, or unpredictable results will happen. @param date a string representing the date. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item Date::representsValidDate Returns C<true> or C<false> depending on whether this date object represents a valid date and time value. This method verifies that the date/time value stored in this object is well-formed and represents plausible values. A time and date value in the W3C format takes the form YYYY-MM-DDThh:mm:ssXHH:ZZ (e.g., C<1997-07-16T19:20:30+01:00>) where XHH:ZZ is the time zone offset. This method checks such things as whether the value of the month number is less than or equal to 12, whether the value of the minutes number is less than or equal to 59, whether a time zone offset is set, etc. @return C<true> if the date is valid, C<false> otherwise. =item Date::hasBeenModified @internal =item Date::resetModifiedFlags @internal =item Date::parseDateStringToNumbers @internal =item Date::parseDateNumbersToString @internal =back =head2 ModelCreator @sbmlpackage{core} @htmlinclude pkg-marker-core.html MIRIAM-compliant data about a model's creator. @htmlinclude not-sbml-warning.html The SBML specification beginning with Level 2 Version 2 defines a standard approach to recording model history and model creator information in a form that complies with MIRIAM ("Minimum Information Requested in the Annotation of biochemical Models", <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). For the model creator, this form involves the use of parts of the <a target="_blank" href="http://en.wikipedia.org/wiki/VCard">vCard</a> representation. LibSBML provides the ModelCreator class as a convenience high-level interface for working with model creator data. Objects of class ModelCreator can be used to store and carry around creator data within a program, and the various methods in this object class let callers manipulate the different parts of the model creator representation. @section parts The different parts of a model creator definition The ModelCreator class mirrors the structure of the MIRIAM model creator annotations in SBML. The following template illustrates these different fields when they are written in XML form: <pre class="fragment"> <vCard:N rdf:parseType="Resource"> <vCard:Family><span style="background-color: #bbb">family name</span></vCard:Family> <vCard:Given><span style="background-color: #bbb">given name</span></vCard:Given> </vCard:N> ... <vCard:EMAIL><span style="background-color: #bbb">email address</span></vCard:EMAIL> ... <vCard:ORG rdf:parseType="Resource"> <vCard:Orgname><span style="background-color: #bbb">organization</span></vCard:Orgname> </vCard:ORG> </pre> Each of the separate data values <span class="code" style="background-color: #bbb">family name</span>, <span class="code" style="background-color: #bbb">given name</span>, <span class="code" style="background-color: #bbb">email address</span>, and <span class="code" style="background-color: #bbb">organization</span> can be set and retrieved via corresponding methods in the ModelCreator class. These methods are documented in more detail below. =over =item ModelCreator::ModelCreator Creates a new ModelCreator object. =item ModelCreator::ModelCreator Creates a new ModelCreator from an XMLNode. @param creator the XMLNode from which to create the ModelCreator. =item ModelCreator::ModelCreator Copy constructor; creates a copy of the ModelCreator. @param orig the object to copy. =item ModelCreator::clone Creates and returns a deep copy of this ModelCreator object. @return the (deep) copy of this ModelCreator object. =item ModelCreator::getFamilyName Returns the "family name" stored in this ModelCreator object. @return the "family name" portion of the ModelCreator object. =item ModelCreator::getGivenName Returns the "given name" stored in this ModelCreator object. @return the "given name" portion of the ModelCreator object. =item ModelCreator::getEmail Returns the "email" stored in this ModelCreator object. @return email from the ModelCreator. =item ModelCreator::getOrganization Returns the "organization" stored in this ModelCreator object. @return organization from the ModelCreator. =item ModelCreator::getOrganisation (Alternate spelling) Returns the "organization" stored in this ModelCreator object. @note This function is an alias of getOrganization(). @return organization from the ModelCreator. @see getOrganization() =item ModelCreator::getName Returns the "fn" stored in this ModelCreator object when using vCard4. @return the "fn" portion of the ModelCreator object. =item ModelCreator::isSetFamilyName Predicate returning C<true> or C<false> depending on whether this ModelCreator's "family name" part is set. @return C<true> if the familyName of this ModelCreator is set, C<false> otherwise. =item ModelCreator::isSetGivenName Predicate returning C<true> or C<false> depending on whether this ModelCreator's "given name" part is set. @return C<true> if the givenName of this ModelCreator is set, C<false> otherwise. =item ModelCreator::isSetEmail Predicate returning C<true> or C<false> depending on whether this ModelCreator's "email" part is set. @return C<true> if the email of this ModelCreator is set, C<false> otherwise. =item ModelCreator::isSetOrganization Predicate returning C<true> or C<false> depending on whether this ModelCreator's "organization" part is set. @return C<true> if the organization of this ModelCreator is set, C<false> otherwise. =item ModelCreator::isSetOrganisation (Alternate spelling) Predicate returning C<true> or C<false> depending on whether this ModelCreator's "organization" part is set. @note This function is an alias of isSetOrganization(). @return C<true> if the organization of this ModelCreator is set, C<false> otherwise. @see isSetOrganization() =item ModelCreator::isSetName Predicate returning C<true> or C<false> depending on whether this ModelCreator's "fn" part is set (when using vCard4). @return C<true> if the fn of this ModelCreator is set, C<false> otherwise. =item ModelCreator::setFamilyName Sets the "family name" portion of this ModelCreator object. @param familyName a string representing the familyName of the ModelCreator. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item ModelCreator::setGivenName Sets the "given name" portion of this ModelCreator object. @param givenName a string representing the givenName of the ModelCreator. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item ModelCreator::setEmail Sets the "email" portion of this ModelCreator object. @param email a string representing the email of the ModelCreator. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item ModelCreator::setOrganization Sets the "organization" portion of this ModelCreator object. @param organization a string representing the organization of the ModelCreator. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item ModelCreator::setOrganisation (Alternate spelling) Sets the "organization" portion of this ModelCreator object. @param organization a string representing the organization of the ModelCreator. @note This function is an alias of setOrganization(const std::string& organization). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @see setOrganization(std::string organization) =item ModelCreator::setName Sets the "fn" portion of this ModelCreator object (when using vCard4). @param name a string representing the fn of the ModelCreator. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item ModelCreator::unsetFamilyName Unsets the "family name" portion of this ModelCreator object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelCreator::unsetGivenName Unsets the "given name" portion of this ModelCreator object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelCreator::unsetEmail Unsets the "email" portion of this ModelCreator object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelCreator::unsetOrganization Unsets the "organization" portion of this ModelCreator object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelCreator::unsetOrganisation (Alternate spelling) Unsets the "organization" portion of this ModelCreator object. @note This function is an alias of unsetOrganization(). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see unsetOrganization() =item ModelCreator::unsetName Unsets the "fn" portion of this ModelCreator object (when using vCard4). C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelCreator::getAdditionalRDF @internal =item ModelCreator::hasRequiredAttributes Predicate returning C<true> if all the required elements for this ModelCreator object have been set. The only required elements for a ModelCreator object are the "family name" and "given name". @return a boolean value indicating whether all the required elements for this object have been defined. =item ModelCreator::hasBeenModified @internal =item ModelCreator::resetModifiedFlags @internal =item ModelCreator::usingFNVcard4 @internal =item ModelCreator::usingSingleName @internal =item ModelCreator::setUseSingleName @internal =back =head2 ModelHistory @sbmlpackage{core} @htmlinclude pkg-marker-core.html MIRIAM-compliant data about a model's history. @htmlinclude not-sbml-warning.html The SBML specification beginning with Level 2 Version 2 defines a standard approach to recording optional model history and model creator information in a form that complies with MIRIAM (<a target="_blank" href="http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html">"Minimum Information Requested in the Annotation of biochemical Models"</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). LibSBML provides the ModelHistory class as a convenient high-level interface for working with model history data. Model histories in SBML consist of one or more <em>model creators</em>, a single date of I<creation>, and one or more I<modification> dates. The overall XML form of this data takes the following form: <pre class="fragment"> <dc:creator> <rdf:Bag> <rdf:li rdf:parseType="Resource"> <span style="background-color: #d0eed0">+++</span> <vCard:N rdf:parseType="Resource"> <vCard:Family><span style="background-color: #bbb">family name</span></vCard:Family> <vCard:Given><span style="background-color: #bbb">given name</span></vCard:Given> </vCard:N> <span style="background-color: #d0eed0">+++</span> <span style="border-bottom: 2px dotted #888"><vCard:EMAIL><span style="background-color: #bbb">email address</span></vCard:EMAIL></span> <span style="background-color: #d0eed0">+++</span> <span style="border-bottom: 2px dotted #888"><vCard:ORG rdf:parseType="Resource"></span> <span style="border-bottom: 2px dotted #888"><vCard:Orgname><span style="background-color: #bbb">organization name</span></vCard:Orgname></span> <span style="border-bottom: 2px dotted #888"></vCard:ORG></span> <span style="background-color: #d0eed0">+++</span> </rdf:li> <span style="background-color: #edd">...</span> </rdf:Bag> </dc:creator> <dcterms:created rdf:parseType="Resource"> <dcterms:W3CDTF><span style="background-color: #bbb">creation date</span></dcterms:W3CDTF> </dcterms:created> <dcterms:modified rdf:parseType="Resource"> <dcterms:W3CDTF><span style="background-color: #bbb">modification date</span></dcterms:W3CDTF> </dcterms:modified> <span style="background-color: #edd">...</span> </pre> In the template above, the <span style="border-bottom: 2px dotted #888">underlined</span> portions are optional, the symbol <span class="code" style="background-color: #d0eed0">+++</span> is a placeholder for either no content or valid XML content that is not defined by the annotation scheme, and the ellipses <span class="code" style="background-color: #edd">...</span> are placeholders for zero or more elements of the same form as the immediately preceding element. The various placeholders for content, namely <span class="code" style="background-color: #bbb">family name</span>, <span class="code" style="background-color: #bbb">given name</span>, <span class="code" style="background-color: #bbb">email address</span>, <span class="code" style="background-color: #bbb">organization</span>, <span class="code" style="background-color: #bbb">creation date</span>, and <span class="code" style="background-color: #bbb">modification date</span> are data that can be filled in using the various methods on the ModelHistory class described below. @see ModelCreator @see Date =over =item ModelHistory::ModelHistory Creates a new ModelHistory object. =item ModelHistory::ModelHistory Copy constructor; creates a copy of this ModelHistory object. @param orig the object to copy. =item ModelHistory::clone Creates and returns a deep copy of this ModelHistory object. @return the (deep) copy of this ModelHistory object. =item ModelHistory::getCreatedDate Returns the "creation date" portion of this ModelHistory object. @return a Date object representing the creation date stored in this ModelHistory object. =item ModelHistory::getModifiedDate Returns the "modified date" portion of this ModelHistory object. Note that in the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of "modified date" values. If this ModelHistory object contains more than one "modified date" value in the list, this method will return the first one in the list. @return a Date object representing the date of modification stored in this ModelHistory object. =item ModelHistory::isSetCreatedDate Predicate returning C<true> or C<false> depending on whether this ModelHistory's "creation date" is set. @return C<true> if the creation date value of this ModelHistory is set, C<false> otherwise. =item ModelHistory::isSetModifiedDate Predicate returning C<true> or C<false> depending on whether this ModelHistory's "modified date" is set. @return C<true> if the modification date value of this ModelHistory object is set, C<false> otherwise. =item ModelHistory::setCreatedDate Sets the creation date of this ModelHistory object. @param date a Date object representing the date to which the "created date" portion of this ModelHistory should be set. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item ModelHistory::setModifiedDate Sets the modification date of this ModelHistory object. @param date a Date object representing the date to which the "modified date" portion of this ModelHistory should be set. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item ModelHistory::addModifiedDate Adds a copy of a Date object to the list of "modified date" values stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of "modified date" values. @param date a Date object representing the "modified date" that should be added to this ModelHistory object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item ModelHistory::getListModifiedDates Returns the list of "modified date" values (as Date objects) stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of "modified date" values. @return the list of modification dates for this ModelHistory object. =item ModelHistory::getModifiedDate Get the nth Date object in the list of "modified date" values stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of "modified date" values. @return the nth Date in the list of ModifiedDates of this ModelHistory or C<NULL> if no such object exists. =item ModelHistory::getNumModifiedDates Get the number of Date objects in this ModelHistory object's list of "modified dates". In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of "modified date" values. @return the number of ModifiedDates in this ModelHistory. =item ModelHistory::addCreator Adds a copy of a ModelCreator object to the list of "model creator" values stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of "model creator" values. @param mc the ModelCreator to add. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ModelHistory::getListCreators Returns the list of ModelCreator objects stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of "model creator" values. @return the list of ModelCreator objects. =item ModelHistory::getCreator Get the nth ModelCreator object stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of "model creator" values. @return the nth ModelCreator object or C<NULL> if no such object exists. =item ModelHistory::getNumCreators Get the number of ModelCreator objects stored in this ModelHistory object. In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of "model creator" values. @return the number of ModelCreators objects. =item ModelHistory::hasRequiredAttributes Predicate returning C<true> if all the required elements for this ModelHistory object have been set. The required elements for a ModelHistory object are "created name", "modified date", and at least one "model creator". @return a boolean value indicating whether all the required elements for this object have been defined. =item ModelHistory::hasBeenModified @internal =item ModelHistory::resetModifiedFlags @internal =back =head2 RDFAnnotationParser @sbmlpackage{core} @htmlinclude pkg-marker-core.html MIRIAM-compliant RDF annotation reader/writer. @htmlinclude not-sbml-warning.html RDFAnnotationParser is a libSBML construct used as part of the libSBML support for annotations conforming to the guidelines specified by MIRIAM (<a target="_blank" href="http://www.nature.com/nbt/journal/v23/n12/abs/nbt1156.html">"Minimum Information Requested in the Annotation of biochemical Models"</a>, <i>Nature Biotechnology</i>, vol. 23, no. 12, Dec. 2005). Section 6 of the SBML Level 2 and Level 3 specification documents defines a recommended way of encoding MIRIAM information using a subset of RDF (<a target="_blank" href="http://www.w3.org/RDF/">Resource Description Format</a>). The general scheme is as follows. A set of RDF-based annotations attached to a given SBML C<<annotation>> element are read by RDFAnnotationParser and converted into a list of CVTerm objects. There are different versions of the main method, @if clike RDFAnnotationParser::parseRDFAnnotation(const XMLNode annotation, List CVTerms) @endif@if java RDFAnnotationParser::parseRDFAnnotation(XMLNode, CVTermList) @endif@~ and RDFAnnotationParser::parseRDFAnnotation(const XMLNode annotation), used depending on whether the annotation in question concerns the MIRIAM model history or other MIRIAM resource annotations. A special object class, ModelHistory, is used to make it easier to manipulate model history annotations. All of the methods on RDFAnnotationParser are static; the class exists only to encapsulate the annotation and CVTerm parsing and manipulation functionality. =over =item RDFAnnotationParser::parseRDFAnnotation Parses an annotation (given as an XMLNode tree) into a list of CVTerm objects. This is used to take an annotation that has been read into an SBML model, identify the RDF elements within it, and create a list of corresponding CVTerm (controlled vocabulary term) objects. @param annotation XMLNode containing the annotation. @param CVTerms list of CVTerm objects to be created. @param metaId optional metaId, if set only the RDF annotation for this metaId will be returned. @param stream optional XMLInputStream that facilitates error logging. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::parseRDFAnnotation Parses an annotation into a ModelHistory class instance. This is used to take an annotation that has been read into an SBML model, identify the RDF elements representing model history information, and create a list of corresponding CVTerm objects. @param annotation XMLNode containing the annotation. @param stream optional XMLInputStream that facilitates error logging. @param metaId optional metaId, if set only the RDF annotation for this metaId will be returned. C<opydetails> doc_note_static_methods @return a pointer to the ModelHistory created. =item RDFAnnotationParser::createAnnotation Creates a blank annotation and returns its root XMLNode object. This creates a completely empty SBML C<<annotation>> element. It is not attached to any SBML element. An example of how this might be used is illustrated in the following code fragment. In this example, suppose that C<content> is an XMLNode object previously created, containing MIRIAM-style annotations, and that C<sbmlObject> is an SBML object derived from SBase (e.g., a Model, or a Species, or a Compartment, etc.). Then:@if clike C<ode{>.cpp} int success; // Status code variable. XMLNode RDF = createRDFAnnotation(); // Create XML structure. success = RDF->addChild(...content...); // Put some content into it. ... // Check return code value. XMLNode ann = createAnnotation(); // Create <annotation>. success = ann->addChild(RDF); // Put the annotation into it. ... // Check return code value. success = sbmlObject->setAnnotation(ann); // Set object's annotation. ... // Check return code value. @endcode @endif@if java C<ode{>.java} int success; // Status code variable. XMLNode RDF = createRDFAnnotation(); // Create XML structure. success = RDF.addChild(...content...); // Put some content into it. ... // Check return code value. XMLNode ann = createAnnotation(); // Create <annotation>. success = ann.addChild(RDF); // Put the annotation into it. ... // Check return code value. success = sbmlObject.setAnnotation(ann); // Set object's annotation. ... // Check return code value. @endcode @endif@if python C<ode{>.py} RDF = RDFAnnotationParser.createRDFAnnotation() # Create XML structure. success = RDF.addChild(...content...) # Put some content into it. ... # Check return code value. annot = RDFAnnotationParser.createAnnotation() # Create <annotation>. success = annot.addChild(RDF) # Put the annotation into it. ... # Check return code value. success = sbmlObject.setAnnotation(annot) # Set object's annotation. ... # Check return code value. @endcode @endif@~ The SBML specification contains more information about the format of annotations. We urge readers to consult Section 6 of the SBML Level 2 (Versions 2–4) and SBML Level 3 specification documents. @return a pointer to an XMLNode for the annotation. C<opydetails> doc_note_static_methods @see @if clike createRDFAnnotation() @else RDFAnnotationParser::createRDFAnnotation() @endif@~ =item RDFAnnotationParser::createRDFAnnotation Creates a blank RDF element suitable for use in SBML annotations. The annotation created by this method has namespace declarations for all the relevant XML namespaces used in RDF annotations and also has an empty RDF element. The result is the following XML: @verbatim <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/" > </rdf:RDF> @endverbatim Note that this does not create the containing SBML C<<annotation>> element; the method @if clike createAnnotation()@else RDFAnnotationParser::createAnnotation()@endif@~ is available for creating the container. @return a pointer to an XMLNode. C<opydetails> doc_note_static_methods @see @if clike createAnnotation() @else RDFAnnotationParser::createAnnotation() @endif@~ =item RDFAnnotationParser::createRDFDescription Takes an SBML object and creates an empty XMLNode corresponding to an RDF "Description" element. This method is a handy way of creating RDF description objects linked by the appropriate "metaid" field to the given C<object>, for insertion into RDF annotations in a model. The method retrieves the "metaid" attribute from the C<object> passed in as argument, then creates an empty element having the following form (where <span class="code" style="background-color: #eed0d0">metaid</span> the value of the "metaid" attribute of the argument): <pre class="fragment"> <rdf:Description rdf:about="#<span style="background-color: #eed0d0">metaid</span>" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> ... </rdf:Description> </pre> Note that this method does I<not> create a complete annotation or even an RDF element; it only creates the "Description" portion. Callers will need to use other methods such as @if clike createRDFAnnotation()@else RDFAnnotationParser::createRDFAnnotation()@endif@~ to create the rest of the structure for an annotation. @param obj the object to which the "Description" refers. @return a new XMLNode containing the "rdf:Description" element with its "about" attribute value set to the C<object> meta identifier. C<opydetails> doc_note_static_methods @see @if clike createRDFAnnotation() @else RDFAnnotationParser::createRDFAnnotation() @endif@~ =item RDFAnnotationParser::createCVTerms Takes a list of CVTerm objects and creates a the RDF "Description" element. This essentially takes the given SBML object, reads out the CVTerm objects attached to it, creates an RDF "Description" element to hold the terms, and adds each term with appropriate qualifiers. @param obj the SBML object to start from. @return the XMLNode tree corresponding to the Description element of an RDF annotation. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::parseCVTerms Takes a list of CVTerm objects and creates a complete SBML annotation around it. This essentially takes the given SBML object, reads out the CVTerm objects attached to it, calls @if clike createRDFAnnotation()@else RDFAnnotationParser::createRDFAnnotation()@endif@~ to create an RDF annotation to hold the terms, and finally calls @if clike createAnnotation()@else RDFAnnotationParser::createAnnotation()@endif@~ to wrap the result as an SBML C<<annotation>> element. @param obj the SBML object to start from. @return the XMLNode tree corresponding to the annotation. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::parseModelHistory Reads the model history and cvTerms stored in C<obj> and creates the XML structure for an SBML annotation representing that metadata if there is a model history stored in C<obj>. @param obj any SBase object. @return the XMLNode corresponding to an annotation containing MIRIAM-compliant model history and CV term information in RDF format. @note If the object does not have a history element stored then C<NULL> is returned even if CVTerms are present. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::parseOnlyModelHistory Reads the model history stored in C<obj> and creates the XML structure for an SBML annotation representing that history. @param obj any SBase object. @return the XMLNode corresponding to an annotation containing MIRIAM-compliant model history information in RDF format. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::deleteRDFAnnotation Deletes any SBML MIRIAM RDF annotation found in the given XMLNode tree and returns any remaining annotation content. The name of the XMLNode given as parameter C<annotation> must be "annotation", or else this method returns C<NULL>. The method will walk down the XML structure looking for elements that are in the RDF XML namespace, and remove them if they conform to the syntax of a History or CVTerm element. @param annotation the XMLNode tree within which the RDF annotation is to be found and deleted. @return the XMLNode structure that is left after RDF annotations are deleted. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::deleteRDFHistoryAnnotation Deletes any SBML MIRIAM RDF 'History' annotation found in the given XMLNode tree and returns any remaining annotation content. The name of the XMLNode given as parameter C<annotation> must be "annotation", or else this method returns C<NULL>. The method will walk down the XML structure looking for elements that are in the RDF XML namespace, and remove any that conform to the syntax of a History element. @param annotation the XMLNode tree within which the RDF annotation is to be found and deleted. @return the XMLNode structure that is left after RDF annotations are deleted. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::deleteRDFCVTermAnnotation Deletes any SBML MIRIAM RDF 'CVTerm' annotation found in the given XMLNode tree and returns any remaining annotation content. The name of the XMLNode given as parameter C<annotation> must be "annotation", or else this method returns C<NULL>. The method will walk down the XML structure looking for elements that are in the RDF XML namespace, and remove any that conform to the syntax of a CVTerm element. @param annotation the XMLNode tree within which the RDF annotation is to be found and deleted. @return the XMLNode structure that is left after RDF annotations are deleted. C<opydetails> doc_note_static_methods =item RDFAnnotationParser::hasRDFAnnotation @internal =item RDFAnnotationParser::hasAdditionalRDFAnnotation @internal =item RDFAnnotationParser::hasCVTermRDFAnnotation @internal =item RDFAnnotationParser::hasHistoryRDFAnnotation @internal =item RDFAnnotationParser::createRDFDescription @internal =item RDFAnnotationParser::createRDFDescriptionWithCVTerms @internal =item RDFAnnotationParser::createRDFDescriptionWithHistory @internal =item RDFAnnotationParser::createBagElement @internal =item RDFAnnotationParser::createQualifierElement @internal =item RDFAnnotationParser::deriveCVTermsFromAnnotation @internal =item RDFAnnotationParser::deriveHistoryFromAnnotation @internal =back =head2 ISBMLExtensionNamespaces @sbmlpackage{core} @htmlinclude pkg-marker-core.html @htmlinclude not-sbml-warning.html @internal =over =back =head2 SBaseExtensionPoint @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for extending SBML components @htmlinclude not-sbml-warning.html @ifnot clike @internal @endif@~ C<opydetails> doc_extension_sbaseextensionpoint =over =item SBaseExtensionPoint::SBaseExtensionPoint Constructor for SBaseExtensionPoint. The use of SBaseExtensionPoint is relatively straightforward. The class needs to be used for each extended SBML object implemented using SBMLDocumentPlugin or SBasePlugin. Doing so requires knowing just two things: @li The short-form name of the I<parent> package being extended. The parent package is often simply core SBML, identified in libSBML by the nickname C<"core">, but a SBML Level 3 package could conceivably extend another Level 3 package and the mechanism supports this. @li The libSBML type code assigned to the object being extended. For example, if an extension of Model is implemented, the relevant type code is SBML_MODEL, found in #SBMLTypeCode_t. @param pkgName the short-form name of the parent package where that this package extension is extending. @param typeCode the type code of the object being extended. =item SBaseExtensionPoint::SBaseExtensionPoint Constructor for SBaseExtensionPoint. The use of SBaseExtensionPoint is relatively straightforward. The class needs to be used for each extended SBML object implemented using SBMLDocumentPlugin or SBasePlugin. Doing so requires knowing just two things: @li The short-form name of the I<parent> package being extended. The parent package is often simply core SBML, identified in libSBML by the nickname C<"core">, but a SBML Level 3 package could conceivably extend another Level 3 package and the mechanism supports this. @li The libSBML type code assigned to the object being extended. For example, if an extension of Model is implemented, the relevant type code is SBML_MODEL, found in #SBMLTypeCode_t. @param pkgName the short-form name of the parent package where that this package extension is extending. @param typeCode the type code of the object being extended. @param elementName element name for the target element, in case multiple elements match the same type code (as will be the case for ListOf classes). @param elementOnly flag to be used during the registration of the package, when set then the plugin is only applied to elements whose elementName match. =item SBaseExtensionPoint::SBaseExtensionPoint Copy constructor. This creates a copy of an SBaseExtensionPoint instance. @param rhs the object to copy. =item SBaseExtensionPoint::clone Creates and returns a deep copy of this SBaseExtensionPoint object. @return the (deep) copy of this SBaseExtensionPoint object. =item SBaseExtensionPoint::getPackageName Returns the package name of this extension point. =item SBaseExtensionPoint::getTypeCode Returns the libSBML type code of this extension point. =item SBaseExtensionPoint::getElementName the target element name =item SBaseExtensionPoint::isElementOnly =back =head2 SBasePlugin @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for extending SBML objects in packages. @htmlinclude not-sbml-warning.html The SBasePlugin class is libSBML's base class for extensions of core SBML component objects. SBasePlugin defines basic virtual methods for reading/writing/checking additional attributes and/or subobjects; these methods should be overridden by subclasses to implement the necessary features of an extended SBML object. @if clike @section sbaseplugin-howto How to extend SBasePlugin for a package implementation C<opydetails> doc_extension_sbaseplugin @else C<opydetails> doc_basics_of_extensions @endif@~ =over =item SBasePlugin::getElementNamespace Returns the namespace URI of the package to which this plugin object belongs. @return the XML namespace URI of the SBML Level 3 package implemented by this libSBML package extension. =item SBasePlugin::getPrefix Returns the XML namespace prefix of the package to which this plugin object belongs. @return the XML namespace prefix of the SBML Level 3 package implemented by this libSBML package extension. =item SBasePlugin::getPackageName Returns the short-form name of the package to which this plugin object belongs. @return the short-form package name (or nickname) of the SBML package implemented by this package extension. =item SBasePlugin::clone Creates and returns a deep copy of this SBasePlugin object. @return the (deep) copy of this SBasePlugin object. =item SBasePlugin::getElementBySId Return the first child object found with a given identifier. This method searches all the subobjects under this one, compares their identifiers to C<id>, and returns the first one that machines. @if clike It uses SBasePlugin::getAllElements(ElementFilter filter) to get the list of identifiers, so the order in which identifiers are searched is the order in which they appear in the results returned by that method.@endif@~ Normally, C<SId> type identifier values are unique across a model in SBML. However, in some circumstances they may not be, such as if a model is invalid because of multiple objects having the same identifier. @param id string representing the identifier of the object to find. @return pointer to the first object with the given C<id>. =item SBasePlugin::getElementByMetaId Return the first child object found with a given meta identifier. This method searches all the subobjects under this one, compares their meta identifiers to C<metaid>, and returns the first one that machines. @param metaid string, the metaid of the object to find. @return pointer to the first object found with the given C<metaid>. =item SBasePlugin::getAllElements Returns all child objects of this object. This returns a List object containing all child SBase objects of this one, at any nesting depth. Optionally, callers can supply a filter that will establish the search criteria for matching objects. @param filter a pointer to an ElementFilter, which causes the function to return only elements that match a particular set of constraints. If NULL (the default), the function will return all child objects. @return a List of pointers to all children objects. =item SBasePlugin::setSBMLDocument @internal =item SBasePlugin::connectToParent @internal =item SBasePlugin::enablePackageInternal @internal =item SBasePlugin::stripPackage @internal =item SBasePlugin::getSBMLDocument Returns the SBMLDocument object containing this object instance. C<opydetails> doc_what_is_SBMLDocument This method allows the caller to obtain the SBMLDocument for the current object. @return the parent SBMLDocument object of this plugin object. @see getParentSBMLObject() =item SBasePlugin::getSBMLDocument Returns the SBMLDocument object containing this object instance. C<opydetails> doc_what_is_SBMLDocument This method allows the caller to obtain the SBMLDocument for the current object. @return the parent SBMLDocument object of this plugin object. @see getParentSBMLObject() =item SBasePlugin::getURI Returns the XML namespace URI for the package to which this object belongs. C<opydetails> doc_what_are_xmlnamespaces This method first looks into the SBMLNamespaces object possessed by the parent SBMLDocument object of the current object. If this cannot be found, this method returns the result of getElementNamespace(). @return a string, the URI of the XML namespace to which this object belongs. @see getPackageName() @see getElementNamespace() @see getSBMLDocument() =item SBasePlugin::getParentSBMLObject Returns the parent object to which this plugin object is connected. @return the parent object of this object. =item SBasePlugin::getParentSBMLObject Returns the parent object to which this plugin object is connected. @return the parent object of this object. =item SBasePlugin::setElementNamespace Sets the XML namespace to which this object belongs. C<opydetails> doc_what_are_xmlnamespaces @param uri the URI to assign to this object. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see getElementNamespace() =item SBasePlugin::getLevel Returns the SBML Level of the package extension of this plugin object. @return the SBML Level. @see getVersion() =item SBasePlugin::getVersion Returns the Version within the SBML Level of the package extension of this plugin object. @return the SBML Version. @see getLevel() =item SBasePlugin::getPackageVersion Returns the package version of the package extension of this plugin object. @return the package version of the package extension of this plugin object. @see getLevel() @see getVersion() =item SBasePlugin::replaceSIDWithFunction @internal =item SBasePlugin::divideAssignmentsToSIdByFunction @internal =item SBasePlugin::multiplyAssignmentsToSIdByFunction @internal =item SBasePlugin::hasIdentifierBeginningWith @internal =item SBasePlugin::prependStringToAllIdentifiers @internal =item SBasePlugin::renameSIdRefs C<opydoc> doc_renamesidref_common =item SBasePlugin::renameMetaIdRefs C<opydoc> doc_renamemetasidref_common =item SBasePlugin::renameUnitSIdRefs C<opydoc> doc_renameunitsidref_common =item SBasePlugin::transformIdentifiers @internal =item SBasePlugin::getLine @internal =item SBasePlugin::getColumn @internal =item SBasePlugin::getSBMLNamespaces @internal =item SBasePlugin::logUnknownElement @internal =item SBasePlugin::isValidTypeForList =item SBasePlugin::accept @internal =item SBasePlugin::getSBMLExtension @internal =item SBasePlugin::updateSBMLNamespace @internal =item SBasePlugin::SBasePlugin @internal =item SBasePlugin::SBasePlugin @internal =item SBasePlugin::getErrorLog @internal =item SBasePlugin::logUnknownAttribute @internal =item SBasePlugin::logEmptyString @internal =back =head2 SBMLDocumentPlugin @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for extending SBMLDocument in packages. @htmlinclude not-sbml-warning.html The SBMLDocumentPlugin class is a specialization of SBasePlugin designed specifically for extending SBMLDocument. All package extensions must extend SBMLDocument to implement support for SBML Level 3 packages; these extensions can be subclasses of this class or from a derived class of this class. All packages must additionally define a required flag named C<required>, which indicates whether that package's constructs can be used to change the core mathematics of the C<<model>> child of the C<<sbml>> element. If they can, this attribute must be set C<true>, and if they cannot, this attribute must be set C<false>. @if clike @section sbmldocumentplugin-howto How to extend SBMLDocumentPlugin for a package implementation C<opydetails> doc_extension_sbmldocumentplugin @else C<opydetails> doc_basics_of_extensions @endif@~ =over =item SBMLDocumentPlugin::SBMLDocumentPlugin Creates a new SBMLDocumentPlugin object using the given parameters. C<opydetails> doc_what_are_xmlnamespaces C<opydetails> doc_what_are_sbmlnamespaces @param uri the URI of the SBML Level 3 package implemented by this libSBML package extension. @param prefix the XML namespace prefix being used for the package. @param sbmlns the SBMLNamespaces object for the package. =item SBMLDocumentPlugin::SBMLDocumentPlugin Copy constructor. This creates a copy of this object. @param orig the SBMLDocumentPlugin instance to copy. =item SBMLDocumentPlugin::clone Creates and returns a deep copy of this SBMLDocumentPlugin object. @return the (deep) copy of this SBMLDocumentPlugin object. =item SBMLDocumentPlugin::setRequired Sets the SBML "required" attribute value. C<opydetails> doc_what_is_required_attribute @param value the value to be assigned to the "required" attribute. The "required" attribute takes a Boolean value, either C<true> or C<false>. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @see getRequired() @see isSetRequired() @see unsetRequired() =item SBMLDocumentPlugin::getRequired Returns the value of the "required" attribute. C<opydetails> doc_what_is_required_attribute @return the bool value of "required" attribute for the SBML package. @see setRequired(bool value) @see isSetRequired() @see unsetRequired() =item SBMLDocumentPlugin::isSetRequired Returns the value of the "required" attribute. C<opydetails> doc_what_is_required_attribute @return C<true> if the "required" attribute of this SBMLDocument has been set to C<true>, C<false> otherwise. =item SBMLDocumentPlugin::unsetRequired Unsets the value of the "required" attribute of this SBMLDocumentPlugin. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item SBMLDocumentPlugin::isCompFlatteningImplemented @internal =item SBMLDocumentPlugin::checkConsistency @internal =item SBMLDocumentPlugin::accept @internal =back =head2 SBMLExtension @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for SBML Level 3 package plug-ins. @htmlinclude not-sbml-warning.html The SBMLExtension class is a component of the libSBML package extension mechanism. It is an abstract class that is extended by each package extension implementation. @if clike The SBMLExtension class provides methods for managing common attributes of package extensions (e.g., package name, package version), registration of instantiated SBasePluginCreator objects, and initialization/registration of package extensions when the library code for the package is loaded. @endif@~ @if clike @section sbmlextension-howto How to extend SBMLExtension for a package implementation C<opydetails> doc_extension_sbmlextension @else C<opydetails> doc_basics_of_extensions @endif@~ @section sbmlextension-l2-special Special handling for SBML Level 2 C<opydetails> doc_extension_layout_plugin_is_special =over =item SBMLExtension::SBMLExtension Constructor; creates a new SBMLExtension object. =item SBMLExtension::SBMLExtension Copy constructor. This creates a copy of an SBMLExtension object. @param orig the SBMLExtension object to copy. =item SBMLExtension::getNumOfSBasePlugins Returns the number of SBasePluginCreatorBase objects stored in this object. @return the total number of SBasePluginCreatorBase objects stored in this SBMLExtension-derived object. =item SBMLExtension::getNumOfSupportedPackageURI Returns the number of supported package namespace URIs. @return the number of supported package XML namespace URIs of this package extension. =item SBMLExtension::isSupported Returns C<true> if the given XML namespace URI is supported by this package extension. @return C<true> if the given XML namespace URI (equivalent to a package version) is supported by this package extension, C<false> otherwise. =item SBMLExtension::getSupportedPackageURI Returns the nth XML namespace URI. @param n the index number of the namespace URI being sought. @return a string representing the XML namespace URI understood to be supported by this package. An empty string will be returned if there is no nth URI. =item SBMLExtension::clone Creates and returns a deep copy of this SBMLExtension object. @return a (deep) copy of this SBMLExtension object. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getName Returns the nickname of this package. This returns the short-form name of an SBML Level 3 package implemented by a given SBMLExtension-derived class. Examples of such names are "layout", "fbc", etc. @return a string, the nickname of SBML package. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getURI Returns the XML namespace URI for a given Level and Version. @param sbmlLevel the SBML Level. @param sbmlVersion the SBML Version. @param pkgVersion the version of the package. @return a string, the XML namespace URI for the package for the given SBML Level, SBML Version, and package version. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getLevel Returns the SBML Level associated with the given XML namespace URI. @param uri the string of URI that represents a version of the package. @return the SBML Level associated with the given URI of this package. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getVersion Returns the SBML Version associated with the given XML namespace URI. @param uri the string of URI that represents a version of the package. @return the SBML Version associated with the given URI of this package. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getPackageVersion Returns the package version associated with the given XML namespace URI. @param uri the string of URI that represents a version of this package. @return the package version associated with the given URI of this package. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getStringFromTypeCode Returns a string representation of a type code. This method takes a numerical type code C<typeCode> for a component object implemented by this package extension, and returns a string representing that type code. @param typeCode the type code to turn into a string. @return the string representation of C<typeCode>. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::getSBMLExtensionNamespaces Returns a specialized SBMLNamespaces object corresponding to a given namespace URI. LibSBML package extensions each define a subclass of @if clike SBMLExtensionNamespaces @else SBMLNamespaces@endif@~. @if clike This object has the form @verbatim SBMLExtensionNamespaces<class SBMLExtensionType> @endverbatim For example, this kind of object for the Layout package is @verbatim SBMLExtensionNamespaces<LayoutExtension> @endverbatim @endif@~ The present method returns the appropriate object corresponding to the given XML namespace URI in argument C<uri>. @param uri the namespace URI that represents one of versions of the package implemented in this extension. @return an @if clike SBMLExtensionNamespaces @else SBMLNamespaces @endif@~ object, or C<NULL> if the given C<uri> is not defined in the corresponding package. C<opydetails> doc_note_override_in_extensions =item SBMLExtension::setEnabled Enable or disable this package. @param isEnabled flag indicating whether to enable (if C<true>) or disable (C<false>) this package extension. @return C<true> if this call succeeded; C<false> otherwise. =item SBMLExtension::isEnabled Returns C<true> if this package is enabled. @return C<true> if this package is enabled, C<false> otherwise. =item SBMLExtension::removeL2Namespaces Removes the package's Level 2 namespace(s). @ifnot clike @internal @endif@~ C<opydetails> doc_virtual_method_for_l2namespaces @param xmlns an XMLNamespaces object that will be used for the annotation. Implementations should override this method with something that removes the package's namespace(s) from the set of namespaces in C<xmlns>. For instance, here is the code from the Layout package extension: C<ode{>.cpp} for (int n = 0; n E<lt> xmlns->getNumNamespaces(); n++) { if (xmlns->getURI(n) == LayoutExtension::getXmlnsL2()) xmlns->remove(n); } @endcode =item SBMLExtension::addL2Namespaces Adds the package's Level 2 namespace(s). @ifnot clike @internal @endif@~ C<opydetails> doc_virtual_method_for_l2namespaces @param xmlns an XMLNamespaces object that will be used for the annotation. Implementation should override this method with something that adds the package's namespace(s) to the set of namespaces in C<xmlns>. For instance, here is the code from the Layout package extension: C<ode{>.cpp} if (!xmlns->containsUri( LayoutExtension::getXmlnsL2())) xmlns->add(LayoutExtension::getXmlnsL2(), "layout"); @endcode =item SBMLExtension::enableL2NamespaceForDocument Called to enable the package on the SBMLDocument object. @ifnot clike @internal @endif@~ C<opydetails> doc_virtual_method_for_l2namespaces @param doc the SBMLDocument object for the model. Implementations should override this method with something that enables the package based on the package's namespace(s). For example, here is the code from the Layout package extension: C<ode{>.cpp} if (doc->getLevel() == 2) doc->enablePackage(LayoutExtension::getXmlnsL2(), "layout", true); @endcode =item SBMLExtension::isInUse Indicates whether this extension is being used by the given SBMLDocument. The default implementation returns C<true>. This means that when a document had this extension enabled, it will not be possible to convert it to SBML Level 2 as we cannot make sure that the extension can be converted. @param doc the SBML document to test. @return a boolean indicating whether the extension is actually being used by the document. =item SBMLExtension::hasMutiplePackageVersions @internal =item SBMLExtension::getErrorTableIndex @internal =item SBMLExtension::getErrorIdOffset @internal =item SBMLExtension::getSeverity @internal =item SBMLExtension::getCategory @internal =item SBMLExtension::getMessage @internal =item SBMLExtension::getShortMessage @internal =back =head2 SBMLExtensionException @sbmlpackage{core} @htmlinclude pkg-marker-core.html Exception used by package extensions @htmlinclude not-sbml-warning.html C<opydetails> doc_extension_sbmlextensionexception @see SBMLNamespaces =over =item SBMLExtensionException::SBMLExtensionException Creates a new SBMLExtensionException object with a given message. @param errmsg a string, the text of the error message to store with this exception. =back =head2 SBMLExtensionNamespaces @sbmlpackage{core} @htmlinclude pkg-marker-core.html Set of SBML Level + Version + namespace triples. @htmlinclude not-sbml-warning.html SBMLExtensionNamespaces is a template class. It is extended from SBMLNamespaces and is meant to be used by package extensions to store the SBML Level, Version within a Level, and package version of the SBML Level 3 package implemented by a libSBML package extension. @if clike @section sbmlextensionnamespaces-howto How to use SBMLExtensionNamespaces for a package implementation C<opydetails> doc_extension_sbmlextensionnamespaces @else C<opydetails> doc_basics_of_extensions @endif@~ =over =back =head2 SBMLExtensionRegistry @sbmlpackage{core} @htmlinclude pkg-marker-core.html Registry where package extensions are registered. @htmlinclude not-sbml-warning.html This class provides a central registry of all extensions known to libSBML. Each package extension must be registered with the registry. The registry class is accessed by various classes to retrieve information about known package extensions and to create additional attributes and/or elements by factory objects of the package extensions. C<opydetails> doc_extension_sbmlextensionregistry =over =item SBMLExtensionRegistry::getInstance Returns a singleton instance of the registry. Callers need to obtain a copy of the package extension registry before they can invoke its methods. The registry is implemented as a singleton, and this is the method callers can use to get a copy of it. @return the instance of the SBMLExtensionRegistry object. =item SBMLExtensionRegistry::addExtension Add the given SBMLExtension object to this SBMLExtensionRegistry. @param ext the SBMLExtension object to be added. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_PKG_CONFLICT LIBSBML_PKG_CONFLICT@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink =item SBMLExtensionRegistry::getExtension Returns an SBMLExtension object with the given package URI or package name. @param package a string representing the URI or name of the SBML package whose package extension is being sought. @return a clone of the SBMLExtension object with the given package URI or name. @note The caller is responsible for freeing the object returned. Since the object is a clone, freeing it will not result in the deletion of the original package extension object. =item SBMLExtensionRegistry::removeL2Namespaces Removes SBML Level 2 namespaces from the namespace list. @if clike This will call all overridden C<SBMLExtension::removeL2Namespaces()> methods. @endif@~ @param xmlns an XMLNamespaces object listing one or more namespaces to be removed. =item SBMLExtensionRegistry::addL2Namespaces Adds SBML Level 2 namespaces to the namespace list. @if clike This will call all overridden C<SBMLExtension::addL2Namespaces()> methods. @endif@~ @param xmlns an XMLNamespaces object providing one or more namespaces to be added. =item SBMLExtensionRegistry::enableL2NamespaceForDocument Enables package extensions that support serialization to SBML annotations. SBML Level 2 does not have a package mechanism in the way that SBML Level 3 does. However, SBML annotations can be used to store SBML constructs. In fact, a widely-used approach to developing SBML Level 3 packages involves first using them as annotations. @param doc the SBMLDocument object for which this should be enabled. =item SBMLExtensionRegistry::disableUnusedPackages Disables unused packages. This method walks through all extensions in the list of plugins of the given SBML document C<doc>, and disables all that are not being used. @param doc the SBMLDocument object whose unused package extensions should be disabled. =item SBMLExtensionRegistry::disablePackage Disables the package with the given URI or name. @param package a string representing the URI or name of the SBML package whose package extension is to be disabled. =item SBMLExtensionRegistry::isPackageEnabled Returns C<true> if the named package is enabled. @param package the name or URI of a package to test. @return C<true> if the package is enabled, C<false> otherwise. =item SBMLExtensionRegistry::enablePackage Enables the package with the given URI / name. @param package the name or URI of a package to enable. =item SBMLExtensionRegistry::getExtensionInternal @internal Returns an SBMLExtension object with the given package URI or package name (string). @param package the URI or name of the package extension. @return the SBMLExtension object with the given package URI or name. The returned extension is NOT ALLOWED to be freed (i.e.: deleted)! =item SBMLExtensionRegistry::getNumExtension Returns the number of extensions that have a given extension point. @param extPoint the SBaseExtensionPoint object. @return the number of SBMLExtension-derived objects with the given extension point. =item SBMLExtensionRegistry::setEnabled Enables or disable the package with the given URI. @param uri the URI of the target package. @param isEnabled C<true> to enable the package, C<false> to disable. @return C<false> if C<isEnabled> is C<false> or the given package is not registered, otherwise this method returns C<true>. =item SBMLExtensionRegistry::isEnabled Returns C<true> if the given extension is enabled. @param uri the URI of the target package. @return C<false> if the given package is disabled or not registered, C<true> otherwise. =item SBMLExtensionRegistry::isRegistered Returns C<true> if a package extension is registered for the corresponding package URI. @param uri the URI of the target package. @return C<true> if the package with the given URI is registered, otherwise returns C<false>. =item SBMLExtensionRegistry::getRegisteredPackageNames Returns a list of registered packages. This method returns a List object containing the nicknames of the SBML packages for which package extensions are registered with this copy of libSBML. The list will contain strings (e.g., C<"layout">, C<"fbc">, etc.) and has to be freed by the caller. @return a list of strings representing the names of the registered packages. =item SBMLExtensionRegistry::getAllRegisteredPackageNames Returns a list of registered packages. This method returns a vector of strings containing the nicknames of the SBML packages for which package extensions are registered with this copy of libSBML. The vector will contain C<std::string> objects. @return a vector of strings of the registered package names. =item SBMLExtensionRegistry::getNumRegisteredPackages Returns the number of registered packages. @return a count of the registered package extensions. @if clike @see getRegisteredPackageNames() @endif@~ =item SBMLExtensionRegistry::getRegisteredPackageName Returns the nth registered package. @param index zero-based index of the package name to return. @return the package name with the given index, or C<NULL> if none such exists. @see getNumRegisteredPackages() =item SBMLExtensionRegistry::getASTPlugins =item SBMLExtensionRegistry::getNumASTPlugins =item SBMLExtensionRegistry::getASTPlugin =item SBMLExtensionRegistry::SBMLExtensionRegistry @internal =item SBMLExtensionRegistry::SBMLExtensionRegistry @internal =item Callback::process The processing function to be implemented by the callback In order to stop processing return a value other than LIBSBML_OPERATION_SUCCESS. @return LIBSBML_OPERATION_SUCCESS to continue the operations any other value to stop =item CallbackRegistry::invokeCallbacks Invokes all registered callbacks on the given document. If the callbacks indicate that processing should be stopped they return a value other than operation success. @return LIBSBML_OPERATION_SUCCESS to indicate that processing should be continued, any other value to stop processing =item CallbackRegistry::clearCallbacks Clears all registered processing callbacks =item CallbackRegistry::addCallback Registers a new processing callback that will be called with a newly instantiated ModelDefinition object. This allows for all post processing on it that needs to happen before integrating it with the target document. @param cb the callback. =item CallbackRegistry::getNumCallbacks @return the number of registered callbacks. =item CallbackRegistry::removeCallback Removes the callback with given index. @param index the index of the callback to be removed from the list. =item CallbackRegistry::removeCallback Removes the specified callback from the list of registered callbacks @param cb the callback to be removed. =item CallbackRegistry::getInstance @internal the static instance of the class =item CallbackRegistry::CallbackRegistry @internal protected constructor, use the static methods for access. =back =head2 OStream Wrapper class for the C++ standard streams C<cout>, C<cerr>, and C<clog>. A few libSBML methods accept an argument for indicating where to send text string output. An example is the SBMLDocument::printErrors(OStream stream) method. However, the methods use C++ style streams and not Java stream objects. The OStream object exists to bridge the Java and underlying native implementation. It is a simple wrapper around the underlying stream object and provides a few basic methods for manipulating it. =over =back =head2 OFStream Wrapper class for the C++ standard file stream C<ofstream>. The C++ C<ofstream> ("output file stream") provides an interface for writing data to files as output streams. This class, OFStream, wraps the C++ C<ofstream> and provides an OStream interface to it. The file to be associated with the stream can be specified as a parameter to the constructors in this class. This class may be useful because some libSBML methods accept an argument for indicating where to send text string output. An example is the SBMLDocument::printErrors(OStream stream) method. The methods use C++ style streams and not Java stream objects. The OStream object exists to bridge the Java and underlying native implementation. It is a simple wrapper around the underlying stream object and provides a few basic methods for manipulating it. =over =back =head2 OStringStream Wrapper class for the C++ standard stream C<ostringstream>. The C++ C<ostringstream> ("output string stream class") provides an interface to manipulating strings as if they were output streams. This class class, OStringStream, wraps the C<ostringstream> and provides an OStream interface to it. This class may be useful because some libSBML methods accept an argument for indicating where to send text string output. An example is the SBMLDocument::printErrors(OStream stream) method. The methods use C++ style streams and not Java stream objects. The OStream object exists to bridge the Java and underlying native implementation. It is a simple wrapper around the underlying stream object and provides a few basic methods for manipulating it. =over =item OStream::OStream Creates a new OStream object with one of standard output stream objects. @param sot a value from the StdOSType enumeration(COUT, CERR, or CLOG) indicating the type of stream to create. =item OStream::get_ostream Returns the stream object. <p> @return the stream object =item OStream::endl Writes an end-of-line character on this tream. =item OFStream::OFStream Creates a new OFStream object for a file. <p> This opens the given file C<filename> with the C<is_append> flag (default is C<false>), and creates an OFStream object instance that associates the file's content with an OStream object. <p> @param filename the name of the file to open @param is_append whether to open the file for appending (default: C<false>, meaning overwrite the content instead) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif =item OFStream::open Opens a file and associates this stream object with it. <p> This method opens a given file C<filename> with the given C<is_append> flag (whose default value is C<false>), and associates <i>this</i> stream object with the file's content. <p> @param filename the name of the file to open @param is_append whether to open the file for appending (default: C<false>, meaning overwrite the content instead) @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif =item OFStream::close Closes the file currently associated with this stream object. =item OFStream::is_open Returns C<true> if this stream object is currently associated with a file. <p> @return C<true> if the stream object is currently associated with a file, C<false> otherwise =item OStringStream::OStringStream Creates a new OStringStream object =item OStringStream::str Returns the copy of the string object currently assosiated with this C<ostringstream> buffer. <p> @return a copy of the string object for this stream =item OStringStream::str Sets string C<s> to the string object currently assosiated with this stream buffer. <p> @param s the string to write to this stream =back =head2 ASTNode @sbmlpackage{core} @htmlinclude pkg-marker-core.html Abstract Syntax Tree (AST) representation of a mathematical expression. @htmlinclude not-sbml-warning.html Abstract Syntax Trees (ASTs) are a simple kind of data structure used in libSBML for storing mathematical expressions. The ASTNode is the cornerstone of libSBML's AST representation. An AST "node" represents the most basic, indivisible part of a mathematical formula and come in many types. For instance, there are node types to represent numbers (with subtypes to distinguish integer, real, and rational numbers), names (e.g., constants or variables), simple mathematical operators, logical or relational operators and functions. LibSBML ASTs provide a canonical, in-memory representation for all mathematical formulas regardless of their original format (which might be MathML or might be text strings). C<opydetails> doc_what_is_astnode @if clike <h3><a class="anchor" name="ASTNodeType_t"> ASTNodeType_t</a></h3> @else <h3><a class="anchor" name="ASTNodeType_t">The set of possible ASTNode types</a></h3> @endif@~ C<opydetails> doc_astnode_types <h3><a class="anchor" name="math-convert">Converting between ASTs and text strings</a></h3> The text-string form of mathematical formulas produced by @sbmlfunction{formulaToString,ASTNode_t} and @sbmlfunction{formulaToL3String,ASTNode_t}, and read by @sbmlfunction{parseFormula,String} and @sbmlfunction{parseL3Formula,String} are in a simple C-inspired infix notation. A formula in this text-string form can be handed to a program that understands SBML mathematical expressions, or used as part of a translation system. The libSBML distribution comes with an example program in the C<"examples"> subdirectory called C<translateMath> that implements an interactive command-line demonstration of translating infix formulas into MathML and vice-versa. The formula strings may contain operators, function calls, symbols, and white space characters. The allowable white space characters are tab and space. The following are illustrative examples of formulas expressed in the syntax: @verbatim 0.10 k4^2 @endverbatim @verbatim (vm s1)/(km + s1) @endverbatim The following table shows the precedence rules in this syntax. In the Class column, I<operand> implies the construct is an operand, @em prefix implies the operation is applied to the following arguments, @em unary implies there is one argument, and I<binary> implies there are two arguments. The values in the Precedence column show how the order of different types of operation are determined. For example, the expression <em>a b + c</em> is evaluated as <em>(a b) + c</em> because the C< > operator has higher precedence. The Associates column shows how the order of similar precedence operations is determined; for example, <em>a - b + c</em> is evaluated as <em>(a - b) + c</em> because the C<+> and C<-> operators are left-associative. The precedence and associativity rules are taken from the C programming language, except for the symbol C<^>, which is used in C for a different purpose. (Exponentiation can be invoked using either C<^> or the function C<power>.) @htmlinclude math-precedence-table.html A program parsing a formula in an SBML model should assume that names appearing in the formula are the identifiers of Species, Parameter, Compartment, FunctionDefinition, Reaction (in SBML Levels 2 and 3), or SpeciesReference (in SBML Level 3 only) objects defined in a model. When a function call is involved, the syntax consists of a function identifier, followed by optional white space, followed by an opening parenthesis, followed by a sequence of zero or more arguments separated by commas (with each comma optionally preceded and/or followed by zero or more white space characters), followed by a closing parenthesis. There is an almost one-to-one mapping between the list of predefined functions available, and those defined in MathML. All of the MathML functions are recognized; this set is larger than the functions defined in SBML Level 1. In the subset of functions that overlap between MathML and SBML Level 1, there exist a few differences. The following table summarizes the differences between the predefined functions in SBML Level 1 and the MathML equivalents in SBML Levels 2 and  3: @htmlinclude math-functions.html C<opydetails> doc_note_l3_parser_encouraged @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToString, ASTNode} @see @sbmlfunction{getDefaultL3ParserSettings,} =over =item ASTNode::ASTNode Creates and returns a new ASTNode. Unless the argument C<type> is given, the returned node will by default have a type of @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink. If the type isn't supplied when caling this constructor, the caller should set the node type to something else as soon as possible using @if clike setType()@else ASTNode::setType(int)@endif. @param type an optional @if clike #ASTNodeType_t@else type@endif@~ code indicating the type of node to create. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ =item ASTNode::ASTNode Creates a new ASTNode from the given Token. The resulting ASTNode will contain the same data as the C<token>. @param token the token to use as a starting point for creating the ASTNode object. =item ASTNode::ASTNode Copy constructor; creates a deep copy of the given ASTNode. @param orig the ASTNode to be copied. =item ASTNode::freeName Frees the name of this ASTNode and sets it to C<NULL>. This operation is only applicable to ASTNode objects corresponding to operators, numbers, or @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink. This method has no effect on other types of nodes. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink =item ASTNode::canonicalize Converts this ASTNode to a canonical form and returns C<true> if successful, C<false> otherwise. The rules determining the canonical form conversion are as follows: @li If the node type is @link ASTNodeType_t#AST_NAME AST_NAME@endlink and the node name matches C<"ExponentialE">, C<"Pi">, C<"True"> or @c "False" the node type is converted to the corresponding C<AST_CONSTANT_><em><span class="placeholder">X</span></em> type. @li If the node type is an @link ASTNodeType_t#AST_FUNCTION AST_FUNCTION@endlink and the node name matches an SBML (MathML) function name, logical operator name, or relational operator name, the node is converted to the corresponding C<AST_FUNCTION_><em><span class="placeholder">X</span></em> or C<AST_LOGICAL_><em><span class="placeholder">X</span></em> type. SBML Level 1 function names are searched first; thus, for example, canonicalizing C<log> will result in a node type of @link ASTNodeType_t#AST_FUNCTION_LN AST_FUNCTION_LN@endlink. (See the SBML Level 1 Version 2 Specification, Appendix C.) Sometimes, canonicalization of a node results in a structural conversion of the node as a result of adding a child. For example, a node with the SBML Level 1 function name C<sqr> and a single child node (the argument) will be transformed to a node of type @link ASTNodeType_t#AST_FUNCTION_POWER AST_FUNCTION_POWER@endlink with two children. The first child will remain unchanged, but the second child will be an ASTNode of type @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink and a value of 2. The function names that result in structural changes are: C<log10>, C<sqr>, and C<sqrt>. =item ASTNode::addChild Adds the given node as a child of this ASTNode. Child nodes are added in-order, from left to right. @param disownedChild the ASTNode instance to add. @param inRead C<false> by default; may be set to C<true> when reading XML where there may be a lambda function with no bvar arguments. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C<opydetails> doc_warning_modifying_structure @see prependChild(ASTNode disownedChild) @see replaceChild(unsigned int n, ASTNode disownedChild, bool delreplaced) @see insertChild(unsigned int n, ASTNode disownedChild) @see removeChild(unsigned int n) @see isWellFormedASTNode() =item ASTNode::prependChild Adds the given node as a child of this ASTNode. This method adds child nodes from right to left. @param disownedChild the ASTNode instance to add. Will become a child of the parent node. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C<opydetails> doc_warning_modifying_structure @see addChild(ASTNode disownedChild) @see replaceChild(unsigned int n, ASTNode disownedChild, bool delreplaced) @see insertChild(unsigned int n, ASTNode disownedChild) @see removeChild(unsigned int n) =item ASTNode::removeChild Removes the nth child of this ASTNode object. @param n unsigned int the index of the child to remove. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink C<opydetails> doc_warning_modifying_structure @see addChild(ASTNode disownedChild) @see prependChild(ASTNode disownedChild) @see replaceChild(unsigned int n, ASTNode disownedChild, bool delreplaced) @see insertChild(unsigned int n, ASTNode disownedChild) =item ASTNode::replaceChild Replaces and optionally deletes the nth child of this ASTNode with the given ASTNode. @param n unsigned int the index of the child to replace. @param disownedChild ASTNode to replace the nth child. Will become a child of the parent node. @param delreplaced Boolean indicating whether to delete the replaced child. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink C<opydetails> doc_warning_modifying_structure @see addChild(ASTNode disownedChild) @see prependChild(ASTNode disownedChild) @see insertChild(unsigned int n, ASTNode disownedChild) @see removeChild(unsigned int n) =item ASTNode::insertChild Inserts the given ASTNode at point n in the list of children of this ASTNode. @param n unsigned int the index of the ASTNode being added. @param disownedChild ASTNode to insert as the nth child. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INDEX_EXCEEDS_SIZE LIBSBML_INDEX_EXCEEDS_SIZE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink C<opydetails> doc_warning_modifying_structure @see addChild(ASTNode disownedChild) @see prependChild(ASTNode disownedChild) @see replaceChild(unsigned int n, ASTNode disownedChild, bool delreplaced) @see removeChild(unsigned int n) =item ASTNode::deepCopy Creates a recursive copy of this node and all its children. @return a copy of this ASTNode and all its children. The caller owns the returned ASTNode and is responsible for deleting it. =item ASTNode::getChild Returns the child at index n of this node. @param n the index of the child to get. @return the nth child of this ASTNode or C<NULL> if this node has no nth child (C<n > > @if clike getNumChildren()@else ASTNode::getNumChildren()@endif@~ C<- 1>). @see getNumChildren() @see getLeftChild() @see getRightChild() =item ASTNode::getLeftChild Returns the left child of this node. @return the left child of this ASTNode. This is equivalent to calling @if clike getChild()@else ASTNode::getChild(unsigned int)@endif@~ with an argument of C<0>. @see getNumChildren() @see getChild(@if java unsigned int@endif) @see getRightChild() =item ASTNode::getRightChild Returns the right child of this node. @return the right child of this ASTNode, or C<NULL> if this node has no right child. If @if clike getNumChildren()@else ASTNode::getNumChildren()@endif@~ C<> 1>, then this is equivalent to: @verbatim getChild( getNumChildren() - 1 ); @endverbatim @see getNumChildren() @see getLeftChild() @see getChild(@if java unsigned int@endif) =item ASTNode::getNumChildren Returns the number of children of this node. @return the number of children of this ASTNode, or 0 is this node has no children. =item ASTNode::addSemanticsAnnotation Adds the given XMLNode as a MathML C<<semantics>> element to this ASTNode. @htmlinclude about-semantic-annotations.html @param disownedAnnotation the annotation to add. Will become a child of the parent node. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink C<opydetails> doc_note_mathml_semantic_annotations_uncommon @see getNumSemanticsAnnotations() @see getSemanticsAnnotation(@if java unsigned int@endif) =item ASTNode::getNumSemanticsAnnotations Returns the number of MathML C<<semantics>> element elements on this node. @htmlinclude about-semantic-annotations.html @return the number of annotations of this ASTNode. C<opydetails> doc_note_mathml_semantic_annotations_uncommon @see addSemanticsAnnotation(@if java XMLNode@endif) @see getSemanticsAnnotation(@if java unsigned int@endif) =item ASTNode::getSemanticsAnnotation Returns the nth MathML C<<semantics>> element on this ASTNode. @htmlinclude about-semantic-annotations.html @param n the index of the annotation to return. Callers should use ASTNode::getNumSemanticsAnnotations() to first find out how many annotations there are. @return the nth annotation inside this ASTNode, or C<NULL> if this node has no nth annotation (C<n >> @if clike getNumSemanticsAnnotations()@else ASTNode::getNumSemanticsAnnotations()@endif@~ C<- 1>). C<opydetails> doc_note_mathml_semantic_annotations_uncommon @see getNumSemanticsAnnotations() @see addSemanticsAnnotation(@if java XMLNode@endif) =item ASTNode::getListOfNodes Returns a list of nodes satisfying a given predicate. This performs a depth-first search of the tree rooted at this ASTNode object, and returns a List of nodes for which the given function C<predicate(node)> returns C<true> (nonzero). For portability between different programming languages, the predicate is passed in as a pointer to a function. @if clike The function definition must have the type @link ASTNode.h::ASTNodePredicate ASTNodePredicate@endlink, which is defined as @verbatim int ( ASTNodePredicate) (const ASTNode node); @endverbatim where a return value of nonzero represents C<true> and zero represents C<false>. @endif @param predicate the predicate to use. @return the list of nodes for which the predicate returned C<true> (nonzero). The List returned is owned by the caller and should be deleted after the caller is done using it. The ASTNode objects in the list; however, are not owned by the caller (as they still belong to the tree itself), and therefore should not be deleted. =item ASTNode::fillListOfNodes Returns a list of nodes rooted at a given node and satisfying a given predicate. This method is identical to calling getListOfNodes(ASTNodePredicate predicate) const, except that instead of creating a new List object, it uses the one passed in as argument C<lst>. This method a depth-first search of the tree rooted at this ASTNode object, and adds to the list C<lst> the nodes for which the given function C<predicate(node)> returns C<true> (nonzero). For portability between different programming languages, the predicate is passed in as a pointer to a function. The function definition must have the type @link ASTNode.h::ASTNodePredicate ASTNodePredicate @endlink, which is defined as @verbatim int ( ASTNodePredicate) (const ASTNode_t node); @endverbatim where a return value of nonzero represents C<true> and zero represents C<false>. @param predicate the predicate to use. @param lst the List to which ASTNode objects should be added. @see getListOfNodes(@if java ASTNodePredicate@endif) =item ASTNode::getCharacter Returns the value of this node as a single character. This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_PLUS AST_PLUS@endlink, @link ASTNodeType_t#AST_MINUS AST_MINUS@endlink, @link ASTNodeType_t#AST_TIMES AST_TIMES@endlink, @link ASTNodeType_t#AST_DIVIDE AST_DIVIDE@endlink or @link ASTNodeType_t#AST_POWER AST_POWER@endlink. @return the value of this ASTNode as a single character =item ASTNode::getId Returns the MathML C<id> attribute value of this ASTNode. @return the MathML id of this ASTNode. @see isSetId() @see setId(const std::string& id) @see unsetId() =item ASTNode::getClass Returns the MathML C<class> attribute value of this ASTNode. @return the MathML class of this ASTNode, or an empty string if it does not exist. @see isSetClass() @see @if java setClassName(const std::string& id)@else setClass()@endif@~ @see unsetClass() =item ASTNode::getStyle Returns the MathML C<style> attribute value of this ASTNode. @return the MathML style of this ASTNode, or an empty string if it does not exist. @see isSetStyle() @see setStyle(const std::string& id) @see unsetStyle() =item ASTNode::getInteger Returns the value of this node as an integer. If this node type is @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink, this method returns the value of the numerator. @return the value of this ASTNode as a (C<long>) integer if type @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink; the numerator if type @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink, and C<0> otherwise. @note This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink or @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink. It will return C<0> if the node type is I<not> one of these, but since C<0> may be a valid value for integer, it is important to be sure that the node type is one of the expected types in order to understand if C<0> is the actual value. @see getNumerator() @see getDenominator() =item ASTNode::getName Returns the value of this node as a string. This function may be called on nodes that (1) are not operators, i.e., nodes for which @if clike isOperator()@else ASTNode::isOperator()@endif@~ returns C<false>, and (2) are not numbers, i.e., @if clike isNumber()@else ASTNode::isNumber()@endif@~ returns C<NULL>. @return the value of this ASTNode as a string, or C<NULL> if it is a node that does not have a name equivalent (e.g., if it is a number). =item ASTNode::getOperatorName Returns the value of this operator node as a string. This function may be called on nodes that are operators, i.e., nodes for which @if clike isOperator()@else ASTNode::isOperator()@endif@~ returns C<true>. @return the name of this operator ASTNode as a string (or C<NULL> if not an operator). =item ASTNode::getNumerator Returns the value of the numerator of this node if of type @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink, or the numerical value of the node if of type @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink; C<0> otherwise. This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink or @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink. It will return C<0> if the node type is another type, but since C<0> may be a valid value for the denominator of a rational number or of an integer, it is important to be sure that the node type is the correct type in order to correctly interpret the returned value. @return the value of the numerator of this ASTNode if @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink, the value if @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink, or C<0> otherwise. @see getDenominator() @see getInteger() =item ASTNode::getDenominator Returns the value of the denominator of this node. @return the value of the denominator of this ASTNode, or C<1> (true) if this node is not of type @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink. @note This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink. It will return C<1> if the node type is another type, but since C<1> may be a valid value for the denominator of a rational number, it is important to be sure that the node type is the correct type in order to correctly interpret the returned value. @see getNumerator() =item ASTNode::getReal Returns the real-numbered value of this node. This function performs the necessary arithmetic if the node type is @link ASTNodeType_t#AST_REAL_E AST_REAL_E@endlink (<em>mantissa 10<sup>exponent</sup></em>) or @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink (<em>numerator / denominator</em>). @return the value of this ASTNode as a real (double), or C<0> if this is not a node that holds a number. @note This function should be called only when this ASTNode has a numerical value type. It will return C<0> if the node type is another type, but since C<0> may be a valid value, it is important to be sure that the node type is the correct type in order to correctly interpret the returned value. =item ASTNode::getMantissa Returns the mantissa value of this node. If @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_REAL AST_REAL@endlink, this method is identical to ASTNode::getReal(). @return the value of the mantissa of this ASTNode, or C<0> if this node is not a type that has a real-numbered value. @note This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_REAL_E AST_REAL_E@endlink, @link ASTNodeType_t#AST_REAL AST_REAL@endlink or @link ASTNodeType_t#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink. It will return C<0> if the node type is another type, but since C<0> may be a valid value, it is important to be sure that the node type is the correct type in order to correctly interpret the returned value. @see getExponent() =item ASTNode::getExponent Returns the exponent value of this ASTNode. @return the value of the exponent of this ASTNode, or C<0> if this is not a type of node that has an exponent. @note This function should be called only when @if clike getType()@else ASTNode::getType()@endif@~ returns @link ASTNodeType_t#AST_REAL_E AST_REAL_E@endlink. It will return C<0> if the node type is another type, but since C<0> may be a valid value, it is important to be sure that the node type is the correct type in order to correctly interpret the returned value. @see getMantissa() =item ASTNode::getValue Returns the numerical value of this ASTNode. @return the numerical value of this ASTNode, or C<NaN> if this is not a type of node that has a numerical value. @note This function will return a numerical value (as a double) for any ASTNode_t that represents a number, a constant such as @link ASTNodeType_t#AST_CONSTANT_PI AST_CONSTANT_PI@endlink, @link ASTNodeType_t#AST_CONSTANT_E AST_CONSTANT_E@endlink, or @link ASTNodeType_t#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink, or C<1> for nodes of type @link ASTNodeType_t#AST_CONSTANT_TRUE AST_CONSTANT_TRUE@endlink and C<0> for nodes of type @link ASTNodeType_t#AST_CONSTANT_FALSE AST_CONSTANT_FALSE@endlink. It does not evaluate the node in any way so, for example, it will not return the value of a named ASTNode_t or attempt to evaluate a function. This includes a node representing C<time> i.e. nodes of type @link ASTNodeType_t#AST_NAME_TIME AST_NAME_TIME@endlink. =item ASTNode::getPrecedence Returns the precedence of this node in the infix math syntax of SBML Level 1. For more information about the infix syntax, see the discussion about <a href="#math-convert">text string formulas</a> at the top of the documentation for ASTNode. @return an integer indicating the precedence of this ASTNode =item ASTNode::getType Returns the type of this ASTNode. The value returned is one of the Core AST type codes such as @link ASTNodeType_t#AST_LAMBDA AST_LAMBDA@endlink, @link ASTNodeType_t#AST_PLUS AST_PLUS@endlink, etc. @return the type of this ASTNode. =item ASTNode::getUnits Returns the units of this ASTNode. @htmlinclude about-sbml-units-attrib.html @return the units of this ASTNode. @note The C<sbml:units> attribute is only available in SBML Level 3. It may not be used in Levels 1–2 of SBML. @see @sbmlfunction{parseL3Formula, String} =item ASTNode::isAvogadro Returns C<true> (nonzero) if this node is the special symbol C<avogadro>. The predicate returns C<false> (zero) otherwise. SBML Level 3 introduced a predefined MathML C<<csymbol>> for the value of Avogadro's constant. LibSBML stores this internally as a node of type @link ASTNodeType_t#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink. This method returns C<true> if this node has that type. @return C<true> if this ASTNode is the special symbol avogadro, C<false> otherwise. @see @sbmlfunction{parseL3Formula, String} =item ASTNode::isBoolean Returns C<true> if this node has a Boolean type. The ASTNode objects that have Boolean types are the logical operators, relational operators, and the constants C<true> or C<false>. @return C<true> if this ASTNode has a Boolean type, C<false> otherwise. =item ASTNode::returnsBoolean Returns C<true> (nonzero) if this node returns a Boolean type or C<false> (zero) otherwise. This function looks at the whole ASTNode rather than just the top level of the ASTNode. Thus it will consider return values from piecewise statements. In addition, if this ASTNode uses a function call, the return value of the functionDefinition will be determined. Note that this is only possible where the ASTNode can trace its parent Model, that is, the ASTNode must represent the C<<math>> element of some SBML object that has already been added to an instance of an SBMLDocument. If this is not the case, this function will return C<false> unless isBoolean() returns C<true>. @see isBoolean() @return C<true> if this ASTNode returns a Boolean, C<false> otherwise. =item ASTNode::isConstant Returns C<true> (nonzero) if this node represents a MathML constant (e.g., C<true>, C<Pi>). @return C<true> if this ASTNode is a MathML constant, C<false> otherwise. @note this function will also return C<true> for nodes of type @link ASTNodeType_t#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level 3. =item ASTNode::isCiNumber Returns C<true> (nonzero) if this node represents a MathML ci element representing a value not a function (e.g., C<true>, C<Pi>). @return C<true> if this ASTNode is a MathML ci element, C<false> otherwise. =item ASTNode::isConstantNumber Returns C<true> (nonzero) if this node represents a MathML constant with numeric value (e.g., C<Pi>). @return C<true> if this ASTNode is a MathML constant, C<false> otherwise. @note this function will also return C<true> for @link ASTNodeType_t#AST_NAME_AVOGADRO AST_NAME_AVOGADRO@endlink in SBML Level 3. =item ASTNode::isCSymbolFunction Returns C<true> (nonzero) if this node represents a MathML csymbol representing a function. @return C<true> if this ASTNode is a MathML csymbol function, C<false> otherwise. =item ASTNode::isFunction Returns C<true> if this node represents a function. The three types of functions in SBML are MathML functions (e.g., C<abs()>), SBML Level 1 functions (in the SBML Level 1 math syntax), and user-defined functions (using FunctionDefinition in SBML Level 2 and 3). @return C<true> if this ASTNode is a function, C<false> otherwise. =item ASTNode::isInfinity Returns C<true> (nonzero) if this node represents the special IEEE 754 value infinity, C<false> (zero) otherwise. @return C<true> if this ASTNode is the special IEEE 754 value infinity, C<false> otherwise. =item ASTNode::isInteger Returns C<true> (nonzero) if this node contains an integer value, C<false> (zero) otherwise. @return C<true> if this ASTNode is of type @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink, C<false> otherwise. =item ASTNode::isLambda Returns C<true> (nonzero) if this node is a MathML C<<lambda>>, C<false> (zero) otherwise. @return C<true> if this ASTNode is of type @link ASTNodeType_t#AST_LAMBDA AST_LAMBDA@endlink, C<false> otherwise. =item ASTNode::isLog10 Returns C<true> (nonzero) if this node represents a C<log10> function, C<false> (zero) otherwise. More precisely, this predicate returns C<true> if the node type is @link ASTNodeType_t#AST_FUNCTION_LOG AST_FUNCTION_LOG@endlink with two children, the first of which is an @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink equal to 10. @return C<true> if the given ASTNode represents a log10() function, C<false> otherwise. @see @sbmlfunction{parseL3Formula, String} =item ASTNode::isLogical Returns C<true> (nonzero) if this node is a MathML logical operator. The possible MathML logical operators in SBML core are C<and>, C<or>, C<not>, C<xor>, and (as of SBML Level 3 Version 2) C<implies>. If the node represents a logical operator defined in a Level 3 package, it will also return C<true>. @return C<true> if this ASTNode is a MathML logical operator, C<false> otherwise. =item ASTNode::isName Returns C<true> if this node is a user-defined variable name or the symbols for time or Avogadro's constant. SBML Levels 2 and 3 provides C<<csymbol>> definitions for "time" and "avogadro", which can be used to represent simulation time and Avogadro's constant in MathML. Note that this method does I<not> return C<true> for the other C<csymbol> values defined by SBML, "delay", because the "delay" is a function and not a constant or variable. Similarly, this function returns C<false> for the csymbol functions added by the 'Distributions' package. @return C<true> if this ASTNode is a user-defined variable name in SBML or the special symbols for time or Avogadro's constant. It returns C<false> otherwise. =item ASTNode::isNaN Returns C<true> (nonzero) if this node represents the special IEEE 754 value "not a number" (NaN), C<false> (zero) otherwise. @return C<true> if this ASTNode is the special IEEE 754 NaN, C<false> otherwise. =item ASTNode::isNegInfinity Returns C<true> (nonzero) if this node represents the special IEEE 754 value "negative infinity", C<false> (zero) otherwise. @return C<true> if this ASTNode is the special IEEE 754 value negative infinity, C<false> otherwise. =item ASTNode::isNumber Returns C<true> (nonzero) if this node contains a number, C<false> (zero) otherwise. This is functionally equivalent to the following code: @verbatim isInteger() || isReal() @endverbatim @return C<true> if this ASTNode is a number, C<false> otherwise. =item ASTNode::isOperator Returns C<true> if this node is a mathematical operator. The possible mathematical operators in the MathML syntax supported by SBML are C<+>, C<->, C< >, C</> and C<^> (power). @return C<true> if this ASTNode is an operator, C<false> otherwise. =item ASTNode::isPiecewise Returns C<true> (nonzero) if this node is the MathML C<<piecewise>> construct. @return C<true> if this ASTNode is a MathML C<piecewise> function, C<false> (zero) otherwise. =item ASTNode::isRational Returns C<true> (nonzero) if this node represents a rational number. @return C<true> if this ASTNode is of type @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink, C<false> (zero) otherwise. =item ASTNode::isReal Returns C<true> (nonzero) if this node can represent a real number, C<false> (zero) otherwise. More precisely, this node must be of one of the following types: @link ASTNodeType_t#AST_REAL AST_REAL@endlink, @link ASTNodeType_t#AST_REAL_E AST_REAL_E@endlink or @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink. @return C<true> if the value of this ASTNode can represented as a real number, C<false> otherwise. =item ASTNode::isRelational Returns C<true> if this node is a MathML relational operator. The MathML relational operators are C<==>, C<>=>, C<>>, C<<>, and C<!=>. @return C<true> if this ASTNode is a MathML relational operator, @c false otherwise =item ASTNode::isSqrt Returns C<true> (nonzero) if this node represents a square root function, C<false> (zero) otherwise. More precisely, the node type must be @link ASTNodeType_t#AST_FUNCTION_ROOT AST_FUNCTION_ROOT@endlink with two children, the first of which is an @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink node having value equal to 2. @return C<true> if the given ASTNode represents a sqrt() function, C<false> otherwise. =item ASTNode::isUMinus Returns C<true> (nonzero) if this node is a unary minus operator, C<false> (zero) otherwise. A node is defined as a unary minus node if it is of type @link ASTNodeType_t#AST_MINUS AST_MINUS@endlink and has exactly one child. For numbers, unary minus nodes can be "collapsed" by negating the number. In fact, @sbmlfunction{parseFormula, String} does this during its parsing process, and @sbmlfunction{parseL3Formula, String} has a configuration option that allows this behavior to be turned on or off. However, unary minus nodes for symbols (@link ASTNodeType_t#AST_NAME AST_NAME@endlink) cannot be "collapsed", so this predicate function is necessary. @return C<true> if this ASTNode is a unary minus, C<false> otherwise. @see @sbmlfunction{parseL3Formula, String} =item ASTNode::isUPlus Returns C<true> (nonzero) if this node is a unary plus operator, C<false> (zero) otherwise. A node is defined as a unary minus node if it is of type @link ASTNodeType_t#AST_MINUS AST_MINUS@endlink and has exactly one child. @return C<true> if this ASTNode is a unary plus, C<false> otherwise. =item ASTNode::isUserFunction Returns C<true> (nonzero) if this node represents a MathML user-defined function. @return C<true> if this ASTNode is a user-defined function, C<false> otherwise. =item ASTNode::hasTypeAndNumChildren Returns C<true> if this node is of type C<type> and has C<numchildren> number of children. Designed for use in cases where it is useful to discover if the node is a unary not or unary minus, or a times node with no children, etc. @return C<true> if this ASTNode is has the specified type and number of children, C<false> otherwise. =item ASTNode::isUnknown Returns C<true> (nonzero) if this node has an unknown type. "Unknown" nodes have the type @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink. Nodes with unknown types will not appear in an ASTNode tree returned by libSBML based upon valid SBML input; the only situation in which a node with type @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink may appear is immediately after having create a new, untyped node using the ASTNode constructor. Callers creating nodes should endeavor to set the type to a valid node type as soon as possible after creating new nodes. @return C<true> if this ASTNode is of type @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink, C<false> otherwise. =item ASTNode::isSetId Returns C<true> (nonzero) if this node has a value for the MathML attribute "id". @return C<true> if this ASTNode has an attribute id, C<false> otherwise. @see isSetClass() @see isSetStyle() @see setId(const std::string& id) @see unsetId() =item ASTNode::isSetClass Returns C<true> (nonzero) if this node has a value for the MathML attribute "class". @return C<true> if this ASTNode has an attribute class, C<false> otherwise. @see isSetId() @see isSetStyle() @see @if java setClassName(const std::string& id)@else setClass()@endif@~ @see unsetClass() =item ASTNode::isSetStyle Returns C<true> (nonzero) if this node has a value for the MathML attribute "style". @return C<true> if this ASTNode has an attribute style, C<false> otherwise. @see isSetClass() @see isSetId() @see setStyle(const std::string& id) @see unsetStyle() =item ASTNode::isSetUnits Returns C<true> (nonzero) if this node has the attribute C<sbml:units>. @htmlinclude about-sbml-units-attrib.html @return C<true> if this ASTNode has units associated with it, C<false> otherwise. @note The C<sbml:units> attribute is only available in SBML Level 3. It may not be used in Levels 1–2 of SBML. @see hasUnits() @see setUnits(const std::string& units) =item ASTNode::hasUnits Returns C<true> (nonzero) if this node or any of its children nodes have the attribute C<sbml:units>. @htmlinclude about-sbml-units-attrib.html @return C<true> if this ASTNode or its children has units associated with it, C<false> otherwise. @note The C<sbml:units> attribute is only available in SBML Level 3. It may not be used in Levels 1–2 of SBML. @see isSetUnits() @see setUnits(const std::string& units) =item ASTNode::setCharacter Sets the value of this ASTNode to the given character. If character is one of C<+>, C<->, C< >, C</> or C<^>, the node type will be set accordingly. For all other characters, the node type will be set to @link ASTNodeType_t#AST_UNKNOWN AST_UNKNOWN@endlink. @param value the character value to which the node's value should be set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setId Sets the MathML attribute C<id> of this ASTNode. @param id C<string> representing the identifier. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see isSetId() @see getId() @see unsetId() =item ASTNode::setClass Sets the MathML attribute C<class> of this ASTNode to C<className>. @param className C<string> representing the MathML class for this node. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @if java @note In the API interfaces for languages other than Java, this method is named C<setClass()>, but in Java it is renamed C<setClassName()> to avoid a name collision with Java's standard object method of the same name. @endif@~ @see isSetClass() @see getClass() @see unsetClass() =item ASTNode::setStyle Sets the MathML attribute C<style> of this ASTNode to style. @param style C<string> representing the identifier. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @see isSetStyle() @see getStyle() @see unsetStyle() =item ASTNode::setName Sets the value of this ASTNode to the given name. As a side effect, this ASTNode object's type will be reset to @link ASTNodeType_t#AST_NAME AST_NAME@endlink if (and <em>only if</em>) the ASTNode was previously an operator ( @if clike isOperator()@else ASTNode::isOperator()@endif@~ C<== true>), number ( @if clike isNumber()@else ASTNode::isNumber()@endif@~ C<== true>), or unknown. This allows names to be set for @link ASTNodeType_t#AST_FUNCTION AST_FUNCTION@endlink nodes and the like. @param name the string containing the name to which this node's value should be set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setValue Sets the value of this ASTNode to the given integer and sets the node type to @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink. @param value the integer to which this node's value should be set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setValue Sets the value of this ASTNode to the given (C<long>) integer and sets the node type to @link ASTNodeType_t#AST_INTEGER AST_INTEGER@endlink. @param value the integer to which this node's value should be set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setValue Sets the value of this ASTNode to the given rational in two parts: the numerator and denominator. The node type is set to @link ASTNodeType_t#AST_RATIONAL AST_RATIONAL@endlink. @param numerator the numerator value of the rational. @param denominator the denominator value of the rational. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setValue Sets the value of this ASTNode to the given real (C<double>) and sets the node type to @link ASTNodeType_t#AST_REAL AST_REAL@endlink. This is functionally equivalent to: @verbatim setValue(value, 0); @endverbatim @param value the C<double> format number to which this node's value should be set. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setValue Sets the value of this ASTNode to the given real (C<double>) in two parts: the mantissa and the exponent. The node type is set to @link ASTNodeType_t#AST_REAL_E AST_REAL_E@endlink. @param mantissa the mantissa of this node's real-numbered value. @param exponent the exponent of this node's real-numbered value. C<opydetails> doc_returns_one_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink =item ASTNode::setType Sets the type of this ASTNode to the given type code. @param type the type to which this node should be set. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note A side-effect of doing this is that any numerical values previously stored in this node are reset to zero. =item ASTNode::setUnits Sets the units of this ASTNode to units. The units will be set I<only> if this ASTNode object represents a MathML C<<cn>> element, i.e., represents a number. Callers may use @if clike isNumber()@else ASTNode::isNumber()@endif@~ to inquire whether the node is of that type. @htmlinclude about-sbml-units-attrib.html @param units C<string> representing the unit identifier. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_ATTRIBUTE_VALUE LIBSBML_INVALID_ATTRIBUTE_VALUE@endlink @note The C<sbml:units> attribute is only available in SBML Level 3. It may not be used in Levels 1–2 of SBML. @see isSetUnits() @see hasUnits() =item ASTNode::swapChildren Swaps the children of this ASTNode object with the children of the given ASTNode object. @param that the other node whose children should be used to replace <em>this</em> node's children. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ASTNode::renameSIdRefs Renames all the SIdRef attributes on this node and any child node =item ASTNode::renameUnitSIdRefs Renames all the UnitSIdRef attributes on this node and any child node. The only place UnitSIDRefs appear is in MathML C<<cn>> elements, so the effects of this method are limited to that. @param oldid the old identifier. @param newid the new identifier. =item ASTNode::replaceIDWithFunction @internal =item ASTNode::multiplyTimeBy @internal =item ASTNode::unsetUnits Unsets the units of this ASTNode. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_UNEXPECTED_ATTRIBUTE LIBSBML_UNEXPECTED_ATTRIBUTE@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ASTNode::unsetId Unsets the MathML C<id> attribute of this ASTNode. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ASTNode::unsetClass Unsets the MathML C<class> attribute of this ASTNode. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ASTNode::unsetStyle Unsets the MathML C<style> attribute of this ASTNode. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink =item ASTNode::setSemanticsFlag @internal =item ASTNode::unsetSemanticsFlag @internal =item ASTNode::getSemanticsFlag @internal =item ASTNode::setDefinitionURL @internal =item ASTNode::setDefinitionURL @internal =item ASTNode::getDefinitionURL Returns the MathML C<definitionURL> attribute value. @return the value of the C<definitionURL> attribute, in the form of a libSBML XMLAttributes object. @see setDefinitionURL(XMLAttributes url) @see setDefinitionURL(const std::string& url) @see getDefinitionURLString() =item ASTNode::replaceArgument Replaces occurrences of a given name with a given ASTNode. For example, if the formula in this ASTNode is C<x + y>, and the function is called with C<bvar> = C<"x"> and C<arg> = an ASTNode representing the real value C<3>. This method would substitute C<3> for C<x> within this ASTNode object, resulting in the forula C<3 + y>. @param bvar a string representing the variable name to be substituted. @param arg an ASTNode representing the name/value/formula to use as a replacement. =item ASTNode::setParentSBMLObject @internal =item ASTNode::getParentSBMLObject Returns the parent SBML object. @return the parent SBML object of this ASTNode. @see isSetParentSBMLObject() @if clike @see setParentSBMLObject()@endif@~ @see unsetParentSBMLObject() =item ASTNode::unsetParentSBMLObject Unsets the parent SBML object. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @see isSetParentSBMLObject() @see getParentSBMLObject() @if clike @see setParentSBMLObject()@endif@~ =item ASTNode::isSetParentSBMLObject Returns C<true> if this node has a value for the parent SBML object. @return C<true> if this ASTNode has an parent SBML object set, C<false> otherwise. @see getParentSBMLObject() @if clike @see setParentSBMLObject()@endif@~ @see unsetParentSBMLObject() =item ASTNode::reduceToBinary Reduces this ASTNode to a binary tree. Example: if this ASTNode is C<and(x, y, z)>, then the formula of the reduced node is C<and(and(x, y), z)>. The operation replaces the formula stored in the current ASTNode object. =item ASTNode::setUserData Sets the user data of this node. The user data can be used by the application developer to attach custom information to the node. In case of a deep copy, this attribute will passed as it is. The attribute will be never interpreted by this class. @param userData specifies the new user data. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @if clike @see isSetUserData() @see getUserData() @see unsetUserData() @endif =item ASTNode::*getUserData Returns the user data that has been previously set via setUserData(). @return the user data of this node, or C<NULL> if no user data has been set. @if clike @see isSetUserData() @see setUserData() @see unsetUserData() @endif@~ =item ASTNode::unsetUserData Unsets the user data of this node. The user data can be used by the application developer to attach custom information to the node. In case of a deep copy, this attribute will passed as it is. The attribute will be never interpreted by this class. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_OPERATION_FAILED LIBSBML_OPERATION_FAILED@endlink @if clike @see setUserData() @see getUserData() @see isSetUserData() @endif@~ =item ASTNode::isSetUserData Returns C<true> if this node has a user data object. @return C<true> if this ASTNode has a user data object set, C<false> otherwise. @if clike @see setUserData() @see getUserData() @see unsetUserData() @endif@~ =item ASTNode::isWellFormedASTNode Returns C<true> or C<false> depending on whether this ASTNode is well-formed. @note An ASTNode may be well-formed, with each node and its children having the appropriate number of children for the given type, but may still be invalid in the context of its use within an SBML model. @return C<true> if this ASTNode is well-formed, C<false> otherwise. @see hasCorrectNumberArguments() =item ASTNode::hasCorrectNumberArguments Returns C<true> if this ASTNode has the correct number of children for its type. For example, an ASTNode with type @link ASTNodeType_t#AST_MINUS AST_MINUS@endlink expects 1 or 2 child nodes. @return C<true> if this ASTNode has the appropriate number of children for its type, C<false> otherwise. @note This function performs a check on the top-level node only. Child nodes are not checked. @see isWellFormedASTNode() =item ASTNode::getDefinitionURLString Returns the MathML C<definitionURL> attribute value as a string. @return the value of the C<definitionURL> attribute, as a string. @see getDefinitionURL() @see setDefinitionURL(const std::string& url) @see setDefinitionURL(XMLAttributes url) =item ASTNode::representsBvar @internal =item ASTNode::isBvar @internal =item ASTNode::setBvar @internal =item ASTNode::usesL3V2MathConstructs @internal =item ASTNode::usesRateOf @internal =item ASTNode::isQualifier @internal =item ASTNode::isSemantics @internal =item ASTNode::getNumBvars @internal =item ASTNode::addPlugin @internal =item ASTNode::loadASTPlugins @internal =item ASTNode::loadASTPlugin @internal =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension with the given C<sbmlns>. @param sbmlns the namespace of the plugin to return. @return the plug-in object (the libSBML extension interface) of a package extension with the given package name or URI, or C<NULL> if none exist. =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension for the package that defines the given C<type>. @param type the @if clike #ASTNodeType_t@else type@endif@~ that is defined by the given plugin. @return the plug-in object (the libSBML extension interface) of a package extension that defines the given C<type>, or C<NULL> if none exist. =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension for the package with the given constraints. @param name the type or csymbol defined by the returned plugin. @param isCsymbol Boolean indicator of whether the C<name> is a csymbol (if C<true>) or type (if C<false>). @param strCmpIsCaseSensitive whether to search for the matching type or csymbol in case-sensitve manner (if C<true>) or case-insensitive manner (if C<false>). @return the plug-in object (the libSBML extension interface) of a package extension that defines the given C<name>, or C<NULL> if none exist. =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension with the given C<sbmlns>. @param sbmlns the namespace of the plugin to return. @return the plug-in object (the libSBML extension interface) of a package extension with the given package name or URI, or C<NULL> if none exist. =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension for the package that defines the given C<type>. @param type the @if clike #ASTNodeType_t@else type@endif@~ that is defined by the given plugin. @return the plug-in object (the libSBML extension interface) of a package extension that defines the given C<type>, or C<NULL> if none exist. =item ASTNode::getASTPlugin Returns a plug-in object (extension interface) for an SBML Level 3 package extension for the package with the given constraints. @param name the type or csymbol defined by the returned plugin. @param isCsymbol Boolean indicator of whether the C<name> is a csymbol (if C<true>) or type (if C<false>). @param strCmpIsCaseSensitive whether to search for the matching type or csymbol in case-sensitve manner (if C<true>) or case-insensitive manner (if C<false>). @return the plug-in object (the libSBML extension interface) of a package extension that defines the given C<name>, or C<NULL> if none exist. =item ASTNode::getPlugin @internal =item ASTNode::getPlugin @internal =item ASTNode::getPlugin @internal =item ASTNode::getPlugin @internal =item ASTNode::getNumPlugins @internal =item ASTNode::containsVariable @internal =item ASTNode::getNumVariablesWithUndeclaredUnits @internal =item ASTNode::canonicalizeConstant @internal =item ASTNode::canonicalizeFunction @internal =item ASTNode::canonicalizeFunctionL1 @internal =item ASTNode::canonicalizeLogical @internal =item ASTNode::canonicalizeRelational @internal =item ASTNode::clearPlugins @internal =item readMathML @internal =item writeMathML @internal =item readMathMLFromString Reads the MathML from the given XML string, constructs a corresponding abstract syntax tree, and returns a pointer to the root of the tree. @param xml a string containing a full MathML expression. @return the root of an AST corresponding to the given mathematical expression, otherwise C<NULL> is returned if the given string is C<NULL> or invalid. @if conly @memberof ASTNode_t @endif =item readMathMLFromStringWithNamespaces Reads the MathML from the given XML string, constructs a corresponding abstract syntax tree, and returns a pointer to the root of the tree. @param xml a string containing a full MathML expression. @param xmlns an @if conly XMLNamespaces_t structure @else XMLNamespaces object@endif@~ containing namespaces that are considered active during the read. (For example, an SBML Level 3 package namespace.) @return the root of an AST corresponding to the given mathematical expression, otherwise C<NULL> is returned if the given string is C<NULL> or invalid. @if conly @memberof ASTNode_t @endif =item writeMathMLToString Writes the given AST node (and its children) to a string as MathML, and returns the string. @param node the root of an AST to write out to the stream. @return a string containing the written-out MathML representation of the given AST. @note The string is owned by the caller and should be freed (with free()) when no longer needed. C<NULL> is returned if the given argument is C<NULL>. @if conly @memberof ASTNode_t @endif =item writeMathMLWithNamespaceToString Writes the given AST node (and its children) to a string as MathML, and returns the string. @param node the root of an AST to write out to the stream. @param sbmlns the SBML namespace to be used @return a string containing the written-out MathML representation of the given AST. @note The string is owned by the caller and should be freed (with free()) when no longer needed. C<NULL> is returned if the given argument is C<NULL>. @if conly @memberof ASTNode_t @endif =item SBML_parseFormula Parses a text string as a mathematical formula and returns an AST representation of it. C<opydetails> doc_summary_of_string_math @param formula the text-string formula expression to be parsed. @return the root node of the AST corresponding to the C<formula>, or C<NULL> if an error occurred in parsing the formula @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{formulaToString, ASTNode} @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see L3ParserSettings C<opydetails> doc_note_l3_parser_encouraged C<opydetails> doc_note_math_string_syntax @if conly @memberof ASTNode_t @endif =item SBML_formulaToL3String Converts an AST to a string representation of a formula using a syntax derived from SBML Level 1, but extended to include elements from SBML Level 2 and SBML Level 3. C<opydetails> doc_summary_of_string_math_l3 @param tree the AST to be converted. @return the formula from the given AST as text string, with a syntax oriented towards the capabilities defined in SBML Level 3. The caller owns the returned string and is responsible for freeing it when it is no longer needed. If C<tree> is a null pointer, then a null pointer is returned. @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{formulaToString, ASTNode} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see L3ParserSettings @see @sbmlfunction{getDefaultL3ParserSettings,} @see @sbmlfunction{getLastParseL3Error,} @if conly @memberof ASTNode_t @endif =item SBML_formulaToL3StringWithSettings Converts an AST to a text string representation of a formula, using specific formatter settings. This function behaves identically to @sbmlfunction{formulaToL3String, ASTNode} but its behavior is controlled by two fields in the @p settings object, namely: @li <em>parseunits</em> ("parse units"): If this field in the C<settings> object is set to C<true> (the default), the function will write out the units of any numerical ASTNodes that have them, producing (for example) "C<3 mL>", "C<(3/4) m>", or "C<5.5e-10 M>". If this is set to C<false>, this function will only write out the number itself ("C<3>", "C<(3/4)>", and "C<5.5e-10>", in the previous examples). @li <em>collapseminus</em> ("collapse minus"): If this field in the @p settings object is set to C<false> (the default), the function will write out explicitly any doubly-nested unary minus ASTNodes, producing (for example) "C<- -x>" or even "C<- - - - -3.1>". If this is set to C<true>, the function will collapse the nodes before producing the infix form, producing "C<x>" and "C<-3.1>" in the previous examples. All the other settings of the L3ParserSettings object passed in as @p settings will be ignored for the purposes of this function: the <em>parselog</em> ("parse log") setting is ignored so that "C<log10(x)>", "C<ln(x)>", and "C<log(x, y)>" are always produced; the <em>avocsymbol</em> ("Avogadro csymbol") is irrelevant to the behavior of this function; and nothing in the Model object set via the <em>model</em> setting is used. @param tree the AST to be converted. @param settings the L3ParserSettings object used to modify the behavior of this function. @return the formula from the given AST as text string, with a syntax oriented towards the capabilities defined in SBML Level 3. The caller owns the returned string and is responsible for freeing it when it is no longer needed. If C<tree> is a null pointer, then a null pointer is returned. @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToString, ASTNode} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see L3ParserSettings @see @sbmlfunction{getDefaultL3ParserSettings,} @see @sbmlfunction{getLastParseL3Error,} @if conly @memberof ASTNode_t @endif =item SBML_formulaToString Converts an AST to a string representation of a formula using a syntax basically derived from SBML Level 1. C<opydetails> doc_summary_of_string_math C<opydetails> doc_note_l3_parser_encouraged @param tree the AST to be converted. @return the formula from the given AST as an SBML Level 1 text-string mathematical formula. The caller owns the returned string and is responsible for freeing it when it is no longer needed. @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} C<opydetails> doc_note_math_string_syntax @if conly @memberof ASTNode_t @endif =item SBML_parseL3Formula Parses a text string as a mathematical formula and returns an AST representation of it. C<opydetails> doc_summary_of_string_math_l3 @param formula the text-string formula expression to be parsed. @return the root node of an AST representing the mathematical formula, or C<NULL> if an error occurred while parsing the formula. When C<NULL> is returned, an error is recorded internally; information about the error can be retrieved using @sbmlfunction{getLastParseL3Error,}. @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToString, ASTNode} @see L3ParserSettings @see @sbmlfunction{getDefaultL3ParserSettings,} @see @sbmlfunction{getLastParseL3Error,} C<opydetails> doc_note_math_string_syntax @if conly @memberof ASTNode_t @endif =item SBML_parseL3FormulaWithModel Parses a text string as a mathematical formula using a Model to resolve symbols, and returns an AST representation of the result. This is identical to @sbmlfunction{parseL3Formula, String}, except that this function uses the given model in the argument C<model> to check against identifiers that appear in the C<formula>. For more information about the parser, please see the definition of L3ParserSettings and the function @sbmlfunction{parseL3Formula, String}. @param formula the mathematical formula expression to be parsed. @param model the Model object to use for checking identifiers. @return the root node of an AST representing the mathematical formula, or C<NULL> if an error occurred while parsing the formula. When C<NULL> is returned, an error is recorded internally; information about the error can be retrieved using @sbmlfunction{getLastParseL3Error,}. @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see @sbmlfunction{getLastParseL3Error,} @see L3ParserSettings @if conly @memberof ASTNode_t @endif =item SBML_parseL3FormulaWithSettings Parses a text string as a mathematical formula using specific parser settings and returns an AST representation of the result. This is identical to @sbmlfunction{parseL3Formula, String}, except that this function uses the parser settings given in the argument @p settings. The settings override the default parsing behavior. The following parsing behaviors can be configured: C<opydetails> doc_l3_parser_configuration_options For more details about the parser, please see the definition of L3ParserSettings and @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}. @param formula the mathematical formula expression to be parsed. @param settings the settings to be used for this parser invocation. @return the root node of an AST representing the mathematical formula, or C<NULL> if an error occurred while parsing the formula. When C<NULL> is returned, an error is recorded internally; information about the error can be retrieved using @sbmlfunction{getLastParseL3Error,}. @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see @sbmlfunction{getLastParseL3Error,} @see L3ParserSettings @if conly @memberof ASTNode_t @endif =item SBML_getDefaultL3ParserSettings Returns a copy of the default Level 3 ("L3") formula parser settings. The data structure storing the settings allows callers to change the following parsing behaviors: C<opydetails> doc_summary_of_string_math_l3 For more details about the parser, please see the definition of L3ParserSettings and @sbmlfunction{parseL3Formula, String}. @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see L3ParserSettings @if conly @memberof L3ParserSettings_t @endif =item SBML_getLastParseL3Error Returns the last error reported by the "L3" mathematical formula parser. If the functions @sbmlfunction{parseL3Formula, String}, @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}, or @sbmlfunction{parseL3FormulaWithModel, String\, Model} return C<NULL>, an error is set internally. This function allows callers to retrieve information about the error. @return a string describing the error that occurred. This will contain the input string the parser was trying to parse, the character it had parsed when it encountered the error, and a description of the error. @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{getDefaultL3ParserSettings,} @if conly @memberof ASTNode_t @endif =item SBML_deleteL3Parser @internal =back =head2 L3ParserSettings @sbmlpackage{core} @htmlinclude pkg-marker-core.html Controls the behavior of the Level 3 formula parser. @htmlinclude not-sbml-warning.html The function @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings}, along with its variants @sbmlfunction{parseL3Formula, String} and @sbmlfunction{parseL3FormulaWithModel, String\, Model}, are the interfaces to a parser for mathematical formulas written as text strings. The inverse function is @sbmlfunction{formulaToL3String, ASTNode} and its variants such as @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings}. The parsers and the formula writers convert between a text-string representation of mathematical formulas and Abstract Syntax Trees (ASTs), represented in libSBML using ASTNode objects. Compared to the parser and writer implemented by the functions @sbmlfunction{parseFormula, String} and @sbmlfunction{formulaToString, ASTNode}, which were designed primarily for converting the mathematical formula strings in SBML Level 1, the SBML Level 3 or "L3" variants of the parser and writer use an extended formula syntax. They also have a number of configurable behaviors. This class (L3ParserSettings) is an object used to communicate the configuration settings with callers. The following aspects of the parser are configurable using L3ParserSettings objects. (For the formula writer, only a subset of these settings is relevant; please see the documentation for @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} for more information about which ones). C<opydetails> doc_l3_parser_configuration_options To obtain the default configuration values, callers can use the function @sbmlfunction{getDefaultL3ParserSettings,}. To change the configuration, callers can create an L3ParserSettings object, set the desired characteristics using the methods provided, and pass that object to @sbmlfunction{parseL3FormulaWithSettings, String formula\, L3ParserSettings settings}. @see @sbmlfunction{parseL3Formula, String} @see @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} @see @sbmlfunction{parseL3FormulaWithModel, String\, Model} @see @sbmlfunction{parseFormula, String} @see @sbmlfunction{formulaToL3StringWithSettings, ASTNode\, L3ParserSettings} @see @sbmlfunction{formulaToL3String, ASTNode} @see @sbmlfunction{formulaToString, ASTNode} @see @sbmlfunction{getDefaultL3ParserSettings,} =over =item L3ParserSettings::L3ParserSettings Creates a new L3ParserSettings object with default values. This is the default constructor for the L3ParserSettings object. It sets the stored Model object to C<NULL> and sets the following field values in the L3ParserSettings object: @li <em>parseunits</em> ("parse units") is set to @link #L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink. @li <em>collapseminus</em> ("collapse minus") is set to @link #L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink. @li <em>parselog</em> ("parse log") is set to @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink. @li <em>avocsymbol</em> ("Avogadro csymbol") is set to @link #L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink. @li <em>caseSensitive</em> ("case sensitive") is set to @link #L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink. @li <em>moduloL3v2</em> ("modulo l3v2") is set to @link #L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink. @li <em>sbmlns</em> ("SBML namespaces") is set to C<NULL> (which indicates that no syntax extensions due to SBML Level 3 packages will be assumed---the formula parser will only understand the core syntax described in the documentation for @sbmlfunction{parseL3Formula, String}). =item L3ParserSettings::L3ParserSettings Creates a new L3ParserSettings object with specific values for all possible settings. @param model a Model object to be used for disambiguating identifiers encountered by @sbmlfunction{parseL3FormulaWithSettings, String\, L3ParserSettings} in mathematical formulas. @param parselog ("parse log") a flag that controls how the parser will handle the symbol C<log> in mathematical formulas. The function C<log> with a single argument ("C<log(x)>") can be parsed as C<log10(x)>, C<ln(x)>, or treated as an error, as desired, by using the parameter values @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink, @link ParseLogType_t#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, or @link ParseLogType_t#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink, respectively. @param collapseminus ("collapse minus") a flag that controls how the parser will handle minus signs in formulas. Unary minus signs can be collapsed or preserved; that is, sequential pairs of unary minuses (e.g., "C<- -3>") can be removed from the input entirely and single unary minuses can be incorporated into the number node, or all minuses can be preserved in the AST node structure. The possible values of this field are @link #L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink (to collapse unary minuses) and @link #L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink (to expand unary minuses). @param parseunits ("parse units") a flag that controls how the parser will handle apparent references to units of measurement associated with raw numbers in a formula. If set to the value @link #L3P_PARSE_UNITS L3P_PARSE_UNITS@endlink, units are parsed; if set to the value @link #L3P_NO_UNITS L3P_NO_UNITS@endlink, units are not parsed. @param avocsymbol ("Avogadro csymbol") a flag that controls how the parser will handle the appearance of the symbol C<avogadro> in a formula. If set to the value @link #L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink, the symbol is interpreted as the SBML/MathML I<csymbol> C<avogadro>; if set to the value @link #L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink, the symbol is interpreted as a plain symbol name. @param caseSensitive ("case sensitive") a flag that controls how the cases of alphabetical characters are treated when symbols are compared. If the flag is set to the value @link #L3P_COMPARE_BUILTINS_CASE_INSENSITIVE L3P_COMPARE_BUILTINS_CASE_INSENSITIVE@endlink, symbols are compared in a case-insensitive manner, which means that mathematical functions such as C<"sin"> will be matched no matter what their case is: C<"Sin">, C<"SIN">, etc. If the flag is set to the value @link #L3P_COMPARE_BUILTINS_CASE_SENSITIVE L3P_COMPARE_BUILTINS_CASE_SENSITIVE@endlink, symbols are interpreted in a case-sensitive manner. @param sbmlns ("SBML namespaces") an SBML namespaces object. The namespaces identify the SBML Level 3 packages that can extend the syntax understood by the formula parser. When non-C<NULL>, the parser will interpret additional syntax defined by the packages; for example, it may understand vector/array extensions introduced by the SBML Level 3 I<Arrays> package. @param moduloL3v2 ("modulo L3v2") a flag that controls how the parser will handle the @% ('modulo') symbol in formulas. By default, the parser will convert 'a % b' to a piecewise function that properly calculates the remainder of a with respect to be, but the parser can also be set to produce the MathML C<rem> function, should the target of the produced ASTNode be an SBML Level 3 Version 2 document, where the C<rem> function is legal. The possible values of this field are @link #L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink (to parse @% as a piecewise function) and @link #L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink (to parse @% as C<rem>). @param l3v2functions ("parse L3v2 functions directly") is a Boolean flag that controls how to translate certain mathematical functions added in SBML Level 3 Version 2 Core. The parser can either turn them into specific AST node types, or turn them all into @link ASTNodeType_t#AST_FUNCTION AST_FUNCTION@endlink with the name set to the function name in question. @ifnot hasDefaultArgs @htmlinclude warn-default-args-in-docs.html @endif@~ @see getModel() @see setModel(@if java Model@endif) @see unsetModel() @see getParseLog() @see setParseLog(@if java int@endif) @see getParseUnits() @see setParseUnits(@if java boolean@endif) @see getParseCollapseMinus() @see setParseCollapseMinus(@if java boolean@endif) @see getParseAvogadroCsymbol() @see setParseAvogadroCsymbol(@if java boolean@endif) @see getParseModuloL3v2() @see setParseModuloL3v2(@if java boolean@endif) @see getParseL3v2Functions() @see setParseL3v2Functions(@if java boolean@endif) =item L3ParserSettings::L3ParserSettings Copy constructor. @param source the instance to copy. =item L3ParserSettings::setModel Sets the model reference in this L3ParserSettings object. C<opydetails> doc_use_of_model @param model a Model object to be used for disambiguating identifiers. @warning <span class="warning">This does I<not> copy the Model object. This means that modifications made to the Model after invoking this method may affect parsing behavior, because the parser will query the I<current> contents of the model.</span> @see getModel() @see unsetModel() =item L3ParserSettings::getModel Returns the Model object referenced by this L3ParserSettings object. C<opydetails> doc_use_of_model @see setModel(@if java Model@endif) @see unsetModel() =item L3ParserSettings::unsetModel Unsets the Model reference in this L3ParserSettings object. The effect of calling this method is to set the stored model value to C<NULL>. @see setModel(@if java Model@endif) @see getModel() =item L3ParserSettings::setParseLog Sets the behavior for handling C<log> in mathematical formulas. The function C<log> with a single argument ("C<log(x)>") can be parsed as C<log10(x)>, C<ln(x)>, or treated as an error. These three behaviors are set, respectively, by using the value @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink, @link ParseLogType_t#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, or @link ParseLogType_t#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink for the C<type> parameter. @param type a constant, one of following three possibilities: @li @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink @li @link ParseLogType_t#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink @li @link ParseLogType_t#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink @see getParseLog() =item L3ParserSettings::getParseLog Indicates the current behavior set for handling the function C<log> with one argument. The function C<log> with a single argument ("C<log(x)>") can be parsed as C<log10(x)>, C<ln(x)>, or treated as an error, as desired. These three possible behaviors are indicated, respectively, by the values @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink, @link ParseLogType_t#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink, and @link ParseLogType_t#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink. @return One of following three constants: @li @link ParseLogType_t#L3P_PARSE_LOG_AS_LOG10 L3P_PARSE_LOG_AS_LOG10@endlink @li @link ParseLogType_t#L3P_PARSE_LOG_AS_LN L3P_PARSE_LOG_AS_LN@endlink @li @link ParseLogType_t#L3P_PARSE_LOG_AS_ERROR L3P_PARSE_LOG_AS_ERROR@endlink @see setParseLog(@if java int@endif) =item L3ParserSettings::setParseCollapseMinus Sets the behavior for handling unary minuses appearing in mathematical formulas. C<opydetails> doc_unary_minus_settings This method lets you tell the parser which behavior to use---either collapse minuses or always preserve them. The two possibilities are represented using the following constants: C<opydetails> doc_unary_minus_values @param collapseminus a boolean value (one of the constants @link #L3P_COLLAPSE_UNARY_MINUS L3P_COLLAPSE_UNARY_MINUS@endlink or @link #L3P_EXPAND_UNARY_MINUS L3P_EXPAND_UNARY_MINUS@endlink) indicating how unary minus signs in the input should be handled. @see getParseCollapseMinus() =item L3ParserSettings::getParseCollapseMinus Indicates the current behavior set for handling multiple unary minuses in formulas. C<opydetails> doc_unary_minus_settings @return A boolean indicating the behavior currently set. The possible values are as follows: C<opydetails> doc_unary_minus_values @see setParseCollapseMinus(@if java boolean@endif) =item L3ParserSettings::setParseUnits Sets the parser's behavior in handling units associated with numbers in a mathematical formula. C<opydetails> doc_parsing_units This method sets the formula parser's behavior with respect to units. @param units a boolean indicating whether to parse units. The possible values are as follows: C<opydetails> doc_parsing_units_values @see getParseUnits() =item L3ParserSettings::getParseUnits Indicates the current behavior set for handling units in text-string mathematical formulas. C<opydetails> doc_parsing_units Since SBML Level 2 does not have the ability to associate units with pure numbers, the value should be expected to be C<false> (@link #L3P_NO_UNITS L3P_NO_UNITS@endlink) when parsing text-string formulas intended for use in SBML Level 2 documents. @return A boolean indicating whether to parse units. The possible values are as follows: C<opydetails> doc_parsing_units_values @see setParseUnits(@if java boolean@endif) =item L3ParserSettings::setParseAvogadroCsymbol Sets the parser's behavior in handling the symbol C<avogadro> in mathematical formulas. C<opydetails> doc_parsing_avogadro This method allows callers to set the C<avogadro>-handling behavior in this L3ParserSettings object. The possible values of @p l2only are as follows: C<opydetails> doc_avogadro_values Since SBML Level 2 does not define a symbol for Avogadro's constant, the value should be set to @link #L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink when parsing text-string formulas intended for use in SBML Level 2 documents. @param l2only a boolean value indicating how the string C<avogadro> should be treated when encountered in a formula. This will be one of the values @link #L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink or @link #L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink. @see getParseAvogadroCsymbol() =item L3ParserSettings::getParseAvogadroCsymbol Indicates the current behavior set for handling C<avogadro> for SBML Level 3. C<opydetails> doc_parsing_avogadro This method returns the current setting of the C<avogadro>-handling behavior in this L3ParserSettings object. The possible values are as follows: C<opydetails> doc_avogadro_values @return A boolean indicating which mode is currently set; one of @link #L3P_AVOGADRO_IS_CSYMBOL L3P_AVOGADRO_IS_CSYMBOL@endlink or @link #L3P_AVOGADRO_IS_NAME L3P_AVOGADRO_IS_NAME@endlink. @see setParseAvogadroCsymbol(@if java boolean@endif) =item L3ParserSettings::setComparisonCaseSensitivity Sets the parser's behavior with respect to case sensitivity for recognizing predefined symbols. C<opydetails> doc_case_sensitivity @param strcmp a boolean indicating whether to be case sensitive (if C<true>) or be case insensitive (if C<false>). @see getComparisonCaseSensitivity() =item L3ParserSettings::getComparisonCaseSensitivity Returns C<true> if the parser is configured to match built-in symbols in a case-insensitive way. C<opydetails> doc_case_sensitivity @return C<true> if matches are done in a case-sensitive manner, and C<false> if the parser will recognize built-in functions and constants regardless of case,. @see setComparisonCaseSensitivity(@if java boolean@endif) =item L3ParserSettings::setParseModuloL3v2 Sets the behavior for handling the @% symbol in mathematical formulas. C<opydetails> doc_modulo_l3v2_settings This method lets you tell the parser which behavior to use---either parse @% as the 'rem' function or as a piecewise function with the same interpretation. The two possibilities are represented using the following constants: C<opydetails> doc_modulo_l3v2_values @param modulol3v2 a boolean value (one of the constants @link #L3P_MODULO_IS_PIECEWISE L3P_MODULO_IS_PIECEWISE@endlink or @link #L3P_MODULO_IS_REM L3P_MODULO_IS_REM@endlink) indicating how the @% symbol in the input should be handled. @see getParseModuloL3v2() =item L3ParserSettings::getParseModuloL3v2 Indicates the current behavior set for handling the @% symbol in mathematical formulas. C<opydetails> doc_modulo_l3v2_settings @return A boolean indicating the behavior currently set. The possible values are as follows: C<opydetails> doc_modulo_l3v2_values @see setParseModuloL3v2(@if java boolean@endif) =item L3ParserSettings::setParseL3v2Functions Sets the behavior for handling functions added in SBML L3v2 C<opydetails> doc_l3v2_function_settings This method lets you tell the parser which behavior to use---either to parse the functions added in L3v2 as their built-in counterparts, or as generic functions with that name (to be defined by SBML as function definitions). The two possibilities are represented using the following constants: C<opydetails> doc_l3v2_function_values @param l3v2functions a boolean value (one of the constants @link #L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink or @link #L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink) indicating how to interpret those function names. @see getParseL3v2Functions() =item L3ParserSettings::getParseL3v2Functions Indicates the current behavior set for handling whether to parse the functions added in L3v2 as that MathML or not. C<opydetails> doc_l3v2_function_settings @return A boolean indicating the behavior currently set. The possible values are as follows: C<opydetails> doc_l3v2_function_values @see setParseL3v2Functions(@if java boolean@endif) =item L3ParserSettings::setParsePackageMath Sets the behavior for handling functions added in SBML packages C<opydetails> doc_package_math_settings This method lets you tell the parser which behavior to use---either to parse the functions added in a given package as their built-in counterparts, or as generic functions with that name (to be defined by SBML as function definitions). The two possibilities are represented using the following constants: C<opydetails> doc_package_math_values @param package an ExtendedMathType_t indicating the extended math package to be queried. @param parsepackage a boolean value (one of the constants @link #L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY@endlink or @link #L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC@endlink) indicating how to interpret those function names. @see getParsePackageMath(@if java ExtendedMathType_t@endif) =item L3ParserSettings::getParsePackageMath Indicates the current behavior set for handling whether to parse the functions added in the given package as that MathML or not. C<opydetails> doc_package_math_settings @param package an ExtendedMathType_t indicating the extended math package to be set. @return A boolean indicating the behavior currently set. The possible values are as follows: C<opydetails> doc_package_math_values @see setParsePackageMath(@if java ExtendedMathType_t, boolean@endif) =item L3ParserSettings::visitPackageInfixSyntax @internal =item L3ParserSettings::checkNumArgumentsForPackage @internal =item L3ParserSettings::parsePackageInfix @internal =item L3ParserSettings::getPackageFunctionFor @internal =item L3ParserSettings::getPackageSymbolFor @internal =back =head2 DefinitionURLRegistry @sbmlpackage{core} @htmlinclude pkg-marker-core.html Registry of all libSBML SBML DefinitionURLs. @htmlinclude libsbml-facility-only-warning.html LibSBML provides facilities for transforming and converting SBML documents in various ways. These transformations can involve essentially anything that can be written algorithmically; examples include converting the units of measurement in a model, or converting from one Level+Version combination of SBML to another. DefinitionURLs are implemented as objects derived from the class DefinitionURL. The DefinitionURL registry, implemented as a singleton object of class DefinitionURLRegistry, maintains a list of known DefinitionURLs and provides methods for discovering them. Callers can use the method DefinitionURLRegistry::getNumDefinitionURLs() to find out how many DefinitionURLs are registered, then use DefinitionURLRegistry::getDefinitionURLByIndex(@if java int@endif) to iterate over each one; alternatively, callers can use DefinitionURLRegistry::getDefinitionURLFor(@if java const ConversionProperties@endif) to search for a DefinitionURL having specific properties. =over =item DefinitionURLRegistry::getInstance Returns the singleton instance for the DefinitionURL registry. Prior to using the registry, callers have to obtain a copy of the registry. This static method provides the means for doing that. @return the singleton for the DefinitionURL registry. =item DefinitionURLRegistry::addDefinitionURL Adds the given DefinitionURL to the registry of SBML DefinitionURLs. @param url the DefinitionURL to add to the registry. @param type the ASTNodeType_t of the URL to add to the registry. C<opydetails> doc_returns_success_code @li @link OperationReturnValues_t#LIBSBML_OPERATION_SUCCESS LIBSBML_OPERATION_SUCCESS@endlink @li @link OperationReturnValues_t#LIBSBML_INVALID_OBJECT LIBSBML_INVALID_OBJECT@endlink =item DefinitionURLRegistry::getNumDefinitionURLs Returns the number of DefinitionURLs known by the registry. @return the number of registered DefinitionURLs. @see getDefinitionURLByIndex(@if java int@endif) =item DefinitionURLRegistry::addSBMLDefinitions =item DefinitionURLRegistry::getCoreDefinitionsAdded =item DefinitionURLRegistry::getType =item DefinitionURLRegistry::getDefinitionUrlByIndex =item DefinitionURLRegistry::clearDefinitions =item DefinitionURLRegistry::DefinitionURLRegistry @internal =item DefinitionURLRegistry::setCoreDefinitionsAdded @internal =back =head2 MathFilter @sbmlpackage{core} @htmlinclude pkg-marker-core.html @internal =over =back =head2 ASTBasePlugin @sbmlpackage{core} @htmlinclude pkg-marker-core.html Base class for extensions that plug into AST classes. @htmlinclude not-sbml-warning.html @internal =over =item ASTBasePlugin::allowedInFunctionDefinition @internal =item ASTBasePlugin::clone @internal =item ASTBasePlugin::getElementNamespace @internal =item ASTBasePlugin::getPrefix @internal =item ASTBasePlugin::getPackageName @internal =item ASTBasePlugin::setSBMLExtension @internal =item ASTBasePlugin::setPrefix @internal =item ASTBasePlugin::connectToParent @internal =item ASTBasePlugin::enablePackageInternal @internal =item ASTBasePlugin::stripPackage @internal =item ASTBasePlugin::getURI @internal =item ASTBasePlugin::getParentASTObject @internal =item ASTBasePlugin::getParentASTObject @internal =item ASTBasePlugin::setElementNamespace @internal =item ASTBasePlugin::getLevel @internal =item ASTBasePlugin::getVersion @internal =item ASTBasePlugin::getPackageVersion @internal =item ASTBasePlugin::getSBMLNamespaces @internal =item ASTBasePlugin::renameSIdRefs @internal =item ASTBasePlugin::renameUnitSIdRefs @internal =item ASTBasePlugin::replaceIDWithFunction @internal =item ASTBasePlugin::checkNumArguments @internal =item ASTBasePlugin::getL3PackageInfixPrecedence @internal =item ASTBasePlugin::hasCorrectNumArguments @internal =item ASTBasePlugin::hasPackageOnlyInfixSyntax @internal =item ASTBasePlugin::hasUnambiguousPackageInfixGrammar @internal =item ASTBasePlugin::isPackageInfixFunction @internal =item ASTBasePlugin::ASTBasePlugin @internal =item ASTBasePlugin::ASTBasePlugin @internal =item ASTBasePlugin::ASTBasePlugin @internal =item ASTBasePlugin::visitPackageInfixSyntax @internal =item ASTBasePlugin::parsePackageInfix @internal =item ASTBasePlugin::getPackageFunctionFor @internal =item ASTBasePlugin::getPackageSymbolFor @internal =cut # ---------- BASE METHODS ------------- package LibSBML; sub TIEHASH { my ($classname,$obj) = @_; return bless $obj, $classname; } sub CLEAR { } sub FIRSTKEY { } sub NEXTKEY { } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; $self->$member_func(); } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; $self->$member_func($newval); } sub this { my $ptr = shift; return tied(%$ptr); } # ------- FUNCTION WRAPPERS -------- package LibSBML; *getLibSBMLVersion = *LibSBMLc::getLibSBMLVersion; *getLibSBMLDottedVersion = *LibSBMLc::getLibSBMLDottedVersion; *getLibSBMLVersionString = *LibSBMLc::getLibSBMLVersionString; *isLibSBMLCompiledWith = *LibSBMLc::isLibSBMLCompiledWith; *getLibSBMLDependencyVersionOf = *LibSBMLc::getLibSBMLDependencyVersionOf; *OperationReturnValue_toString = *LibSBMLc::OperationReturnValue_toString; *readSBML = *LibSBMLc::readSBML; *readSBMLFromFile = *LibSBMLc::readSBMLFromFile; *readSBMLFromString = *LibSBMLc::readSBMLFromString; *writeSBML = *LibSBMLc::writeSBML; *writeSBMLToString = *LibSBMLc::writeSBMLToString; *writeSBMLToFile = *LibSBMLc::writeSBMLToFile; *SBMLTypeCode_toString = *LibSBMLc::SBMLTypeCode_toString; *UnitKind_equals = *LibSBMLc::UnitKind_equals; *UnitKind_forName = *LibSBMLc::UnitKind_forName; *UnitKind_toString = *LibSBMLc::UnitKind_toString; *UnitKind_isValidUnitKindString = *LibSBMLc::UnitKind_isValidUnitKindString; *ModelQualifierType_toString = *LibSBMLc::ModelQualifierType_toString; *BiolQualifierType_toString = *LibSBMLc::BiolQualifierType_toString; *ModelQualifierType_fromString = *LibSBMLc::ModelQualifierType_fromString; *BiolQualifierType_fromString = *LibSBMLc::BiolQualifierType_fromString; *readMathMLFromString = *LibSBMLc::readMathMLFromString; *readMathMLFromStringWithNamespaces = *LibSBMLc::readMathMLFromStringWithNamespaces; *writeMathMLToString = *LibSBMLc::writeMathMLToString; *writeMathMLWithNamespaceToString = *LibSBMLc::writeMathMLWithNamespaceToString; *parseFormula = *LibSBMLc::parseFormula; *formulaToL3String = *LibSBMLc::formulaToL3String; *formulaToL3StringWithSettings = *LibSBMLc::formulaToL3StringWithSettings; *formulaToString = *LibSBMLc::formulaToString; *parseL3Formula = *LibSBMLc::parseL3Formula; *parseL3FormulaWithModel = *LibSBMLc::parseL3FormulaWithModel; *parseL3FormulaWithSettings = *LibSBMLc::parseL3FormulaWithSettings; *getDefaultL3ParserSettings = *LibSBMLc::getDefaultL3ParserSettings; *getLastParseL3Error = *LibSBMLc::getLastParseL3Error; *SBML_deleteL3Parser = *LibSBMLc::SBML_deleteL3Parser; ############# Class : LibSBML::ModelCreatorList ############## package LibSBML::ModelCreatorList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ModelCreatorList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ModelCreatorList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::ModelCreatorList_add; *get = *LibSBMLc::ModelCreatorList_get; *prepend = *LibSBMLc::ModelCreatorList_prepend; *remove = *LibSBMLc::ModelCreatorList_remove; *getSize = *LibSBMLc::ModelCreatorList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::DateList ############## package LibSBML::DateList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_DateList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_DateList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::DateList_add; *get = *LibSBMLc::DateList_get; *prepend = *LibSBMLc::DateList_prepend; *remove = *LibSBMLc::DateList_remove; *getSize = *LibSBMLc::DateList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::CVTermList ############## package LibSBML::CVTermList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_CVTermList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_CVTermList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::CVTermList_add; *get = *LibSBMLc::CVTermList_get; *prepend = *LibSBMLc::CVTermList_prepend; *remove = *LibSBMLc::CVTermList_remove; *getSize = *LibSBMLc::CVTermList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ASTNodeList ############## package LibSBML::ASTNodeList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ASTNodeList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ASTNodeList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::ASTNodeList_add; *get = *LibSBMLc::ASTNodeList_get; *prepend = *LibSBMLc::ASTNodeList_prepend; *remove = *LibSBMLc::ASTNodeList_remove; *getSize = *LibSBMLc::ASTNodeList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLNamespacesList ############## package LibSBML::SBMLNamespacesList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLNamespacesList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLNamespacesList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::SBMLNamespacesList_add; *get = *LibSBMLc::SBMLNamespacesList_get; *prepend = *LibSBMLc::SBMLNamespacesList_prepend; *remove = *LibSBMLc::SBMLNamespacesList_remove; *getSize = *LibSBMLc::SBMLNamespacesList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBaseList ############## package LibSBML::SBaseList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBaseList(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBaseList($self); delete $OWNER{$self}; } } *add = *LibSBMLc::SBaseList_add; *get = *LibSBMLc::SBaseList_get; *prepend = *LibSBMLc::SBaseList_prepend; *remove = *LibSBMLc::SBaseList_remove; *getSize = *LibSBMLc::SBaseList_getSize; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::OStream ############## package LibSBML::OStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *COUT = *LibSBMLc::OStream_COUT; *CERR = *LibSBMLc::OStream_CERR; *CLOG = *LibSBMLc::OStream_CLOG; sub new { my $pkg = shift; my $self = LibSBMLc::new_OStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_OStream($self); delete $OWNER{$self}; } } *get_ostream = *LibSBMLc::OStream_get_ostream; *endl = *LibSBMLc::OStream_endl; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::OFStream ############## package LibSBML::OFStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::OStream LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_OFStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_OFStream($self); delete $OWNER{$self}; } } *open = *LibSBMLc::OFStream_open; *close = *LibSBMLc::OFStream_close; *is_open = *LibSBMLc::OFStream_is_open; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::OStringStream ############## package LibSBML::OStringStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::OStream LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_OStringStream(@_); bless $self, $pkg if defined($self); } *str = *LibSBMLc::OStringStream_str; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_OStringStream($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::IdList ############## package LibSBML::IdList; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_IdList(@_); bless $self, $pkg if defined($self); } *append = *LibSBMLc::IdList_append; *contains = *LibSBMLc::IdList_contains; *empty = *LibSBMLc::IdList_empty; *removeIdsBefore = *LibSBMLc::IdList_removeIdsBefore; *size = *LibSBMLc::IdList_size; *clear = *LibSBMLc::IdList_clear; *at = *LibSBMLc::IdList_at; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_IdList($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::IdentifierTransformer ############## package LibSBML::IdentifierTransformer; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_IdentifierTransformer(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_IdentifierTransformer($self); delete $OWNER{$self}; } } *transform = *LibSBMLc::IdentifierTransformer_transform; sub DISOWN { my $self = shift; LibSBMLc::disown_IdentifierTransformer($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_IdentifierTransformer($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_IdentifierTransformer($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::ElementFilter ############## package LibSBML::ElementFilter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_ElementFilter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ElementFilter($self); delete $OWNER{$self}; } } *filter = *LibSBMLc::ElementFilter_filter; sub DISOWN { my $self = shift; LibSBMLc::disown_ElementFilter($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_ElementFilter($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_ElementFilter($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::SBMLReader ############## package LibSBML::SBMLReader; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLReader(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLReader($self); delete $OWNER{$self}; } } *readSBML = *LibSBMLc::SBMLReader_readSBML; *readSBMLFromFile = *LibSBMLc::SBMLReader_readSBMLFromFile; *readSBMLFromString = *LibSBMLc::SBMLReader_readSBMLFromString; *hasZlib = *LibSBMLc::SBMLReader_hasZlib; *hasBzip2 = *LibSBMLc::SBMLReader_hasBzip2; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLWriter ############## package LibSBML::SBMLWriter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLWriter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLWriter($self); delete $OWNER{$self}; } } *setProgramName = *LibSBMLc::SBMLWriter_setProgramName; *setProgramVersion = *LibSBMLc::SBMLWriter_setProgramVersion; *writeSBML = *LibSBMLc::SBMLWriter_writeSBML; *writeToString = *LibSBMLc::SBMLWriter_writeToString; *writeSBMLToFile = *LibSBMLc::SBMLWriter_writeSBMLToFile; *writeSBMLToString = *LibSBMLc::SBMLWriter_writeSBMLToString; *hasZlib = *LibSBMLc::SBMLWriter_hasZlib; *hasBzip2 = *LibSBMLc::SBMLWriter_hasBzip2; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBase ############## package LibSBML::SBase; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBase($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBase_clone; *getElementBySId = *LibSBMLc::SBase_getElementBySId; *getElementByMetaId = *LibSBMLc::SBase_getElementByMetaId; *renameSIdRefs = *LibSBMLc::SBase_renameSIdRefs; *renameMetaIdRefs = *LibSBMLc::SBase_renameMetaIdRefs; *renameUnitSIdRefs = *LibSBMLc::SBase_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::SBase_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::SBase_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::SBase_multiplyAssignmentsToSIdByFunction; *getElementFromPluginsBySId = *LibSBMLc::SBase_getElementFromPluginsBySId; *getElementFromPluginsByMetaId = *LibSBMLc::SBase_getElementFromPluginsByMetaId; *hasNonstandardIdentifierBeginningWith = *LibSBMLc::SBase_hasNonstandardIdentifierBeginningWith; *prependStringToAllIdentifiers = *LibSBMLc::SBase_prependStringToAllIdentifiers; *transformIdentifiers = *LibSBMLc::SBase_transformIdentifiers; *getMetaId = *LibSBMLc::SBase_getMetaId; *getId = *LibSBMLc::SBase_getId; *getIdAttribute = *LibSBMLc::SBase_getIdAttribute; *getName = *LibSBMLc::SBase_getName; *getNotes = *LibSBMLc::SBase_getNotes; *getNotesString = *LibSBMLc::SBase_getNotesString; *getAnnotation = *LibSBMLc::SBase_getAnnotation; *getAnnotationString = *LibSBMLc::SBase_getAnnotationString; *getNamespaces = *LibSBMLc::SBase_getNamespaces; *getSBMLDocument = *LibSBMLc::SBase_getSBMLDocument; *getParentSBMLObject = *LibSBMLc::SBase_getParentSBMLObject; *getAncestorOfType = *LibSBMLc::SBase_getAncestorOfType; *getSBOTerm = *LibSBMLc::SBase_getSBOTerm; *getSBOTermID = *LibSBMLc::SBase_getSBOTermID; *getSBOTermAsURL = *LibSBMLc::SBase_getSBOTermAsURL; *getLine = *LibSBMLc::SBase_getLine; *getColumn = *LibSBMLc::SBase_getColumn; *getModelHistory = *LibSBMLc::SBase_getModelHistory; *isSetMetaId = *LibSBMLc::SBase_isSetMetaId; *isSetId = *LibSBMLc::SBase_isSetId; *isSetIdAttribute = *LibSBMLc::SBase_isSetIdAttribute; *isSetName = *LibSBMLc::SBase_isSetName; *isSetNotes = *LibSBMLc::SBase_isSetNotes; *isSetAnnotation = *LibSBMLc::SBase_isSetAnnotation; *isSetSBOTerm = *LibSBMLc::SBase_isSetSBOTerm; *setMetaId = *LibSBMLc::SBase_setMetaId; *isSetModelHistory = *LibSBMLc::SBase_isSetModelHistory; *setId = *LibSBMLc::SBase_setId; *setIdAttribute = *LibSBMLc::SBase_setIdAttribute; *setName = *LibSBMLc::SBase_setName; *setAnnotation = *LibSBMLc::SBase_setAnnotation; *appendAnnotation = *LibSBMLc::SBase_appendAnnotation; *removeTopLevelAnnotationElement = *LibSBMLc::SBase_removeTopLevelAnnotationElement; *replaceTopLevelAnnotationElement = *LibSBMLc::SBase_replaceTopLevelAnnotationElement; *setNotes = *LibSBMLc::SBase_setNotes; *appendNotes = *LibSBMLc::SBase_appendNotes; *setModelHistory = *LibSBMLc::SBase_setModelHistory; *connectToParent = *LibSBMLc::SBase_connectToParent; *connectToChild = *LibSBMLc::SBase_connectToChild; *setSBOTerm = *LibSBMLc::SBase_setSBOTerm; *setNamespaces = *LibSBMLc::SBase_setNamespaces; *unsetMetaId = *LibSBMLc::SBase_unsetMetaId; *unsetId = *LibSBMLc::SBase_unsetId; *unsetIdAttribute = *LibSBMLc::SBase_unsetIdAttribute; *unsetName = *LibSBMLc::SBase_unsetName; *unsetNotes = *LibSBMLc::SBase_unsetNotes; *unsetAnnotation = *LibSBMLc::SBase_unsetAnnotation; *unsetSBOTerm = *LibSBMLc::SBase_unsetSBOTerm; *addCVTerm = *LibSBMLc::SBase_addCVTerm; *getCVTerms = *LibSBMLc::SBase_getCVTerms; *getNumCVTerms = *LibSBMLc::SBase_getNumCVTerms; *getCVTerm = *LibSBMLc::SBase_getCVTerm; *unsetCVTerms = *LibSBMLc::SBase_unsetCVTerms; *unsetModelHistory = *LibSBMLc::SBase_unsetModelHistory; *getResourceBiologicalQualifier = *LibSBMLc::SBase_getResourceBiologicalQualifier; *getResourceModelQualifier = *LibSBMLc::SBase_getResourceModelQualifier; *getModel = *LibSBMLc::SBase_getModel; *getLevel = *LibSBMLc::SBase_getLevel; *getVersion = *LibSBMLc::SBase_getVersion; *getPackageCoreVersion = *LibSBMLc::SBase_getPackageCoreVersion; *getPackageVersion = *LibSBMLc::SBase_getPackageVersion; *getPackageName = *LibSBMLc::SBase_getPackageName; *getTypeCode = *LibSBMLc::SBase_getTypeCode; *hasValidLevelVersionNamespaceCombination = *LibSBMLc::SBase_hasValidLevelVersionNamespaceCombination; *getElementName = *LibSBMLc::SBase_getElementName; *toSBML = *LibSBMLc::SBase_toSBML; *toXMLNode = *LibSBMLc::SBase_toXMLNode; *getPlugin = *LibSBMLc::SBase_getPlugin; *getDisabledPlugin = *LibSBMLc::SBase_getDisabledPlugin; *getNumPlugins = *LibSBMLc::SBase_getNumPlugins; *getNumDisabledPlugins = *LibSBMLc::SBase_getNumDisabledPlugins; *deleteDisabledPlugins = *LibSBMLc::SBase_deleteDisabledPlugins; *enablePackage = *LibSBMLc::SBase_enablePackage; *disablePackage = *LibSBMLc::SBase_disablePackage; *enablePackageInternal = *LibSBMLc::SBase_enablePackageInternal; *isPackageURIEnabled = *LibSBMLc::SBase_isPackageURIEnabled; *isPackageEnabled = *LibSBMLc::SBase_isPackageEnabled; *isPkgURIEnabled = *LibSBMLc::SBase_isPkgURIEnabled; *isPkgEnabled = *LibSBMLc::SBase_isPkgEnabled; *writeExtensionElements = *LibSBMLc::SBase_writeExtensionElements; *read = *LibSBMLc::SBase_read; *write = *LibSBMLc::SBase_write; *hasRequiredAttributes = *LibSBMLc::SBase_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::SBase_hasRequiredElements; *checkCompatibility = *LibSBMLc::SBase_checkCompatibility; *setSBMLNamespacesAndOwn = *LibSBMLc::SBase_setSBMLNamespacesAndOwn; *getSBMLNamespaces = *LibSBMLc::SBase_getSBMLNamespaces; *removeDuplicateAnnotations = *LibSBMLc::SBase_removeDuplicateAnnotations; *checkMathMLNamespace = *LibSBMLc::SBase_checkMathMLNamespace; *getDerivedUnitDefinition = *LibSBMLc::SBase_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::SBase_containsUndeclaredUnits; *removeFromParentAndDelete = *LibSBMLc::SBase_removeFromParentAndDelete; *matchesSBMLNamespaces = *LibSBMLc::SBase_matchesSBMLNamespaces; *matchesRequiredSBMLNamespacesForAddition = *LibSBMLc::SBase_matchesRequiredSBMLNamespacesForAddition; *isSetUserData = *LibSBMLc::SBase_isSetUserData; *unsetUserData = *LibSBMLc::SBase_unsetUserData; *getURI = *LibSBMLc::SBase_getURI; *getPrefix = *LibSBMLc::SBase_getPrefix; *hasOptionalAttributes = *LibSBMLc::SBase_hasOptionalAttributes; *hasOptionalElements = *LibSBMLc::SBase_hasOptionalElements; *updateSBMLNamespace = *LibSBMLc::SBase_updateSBMLNamespace; *getListOfAllElements = *LibSBMLc::SBase_getListOfAllElements; *getListOfAllElementsFromPlugins = *LibSBMLc::SBase_getListOfAllElementsFromPlugins; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOf ############## package LibSBML::ListOf; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOf($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOf(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOf_clone; *append = *LibSBMLc::ListOf_append; *appendAndOwn = *LibSBMLc::ListOf_appendAndOwn; *appendFrom = *LibSBMLc::ListOf_appendFrom; *insert = *LibSBMLc::ListOf_insert; *insertAndOwn = *LibSBMLc::ListOf_insertAndOwn; *get = *LibSBMLc::ListOf_get; *getElementBySId = *LibSBMLc::ListOf_getElementBySId; *getElementByMetaId = *LibSBMLc::ListOf_getElementByMetaId; *clear = *LibSBMLc::ListOf_clear; *removeFromParentAndDelete = *LibSBMLc::ListOf_removeFromParentAndDelete; *remove = *LibSBMLc::ListOf_remove; *size = *LibSBMLc::ListOf_size; *connectToChild = *LibSBMLc::ListOf_connectToChild; *getTypeCode = *LibSBMLc::ListOf_getTypeCode; *getItemTypeCode = *LibSBMLc::ListOf_getItemTypeCode; *getElementName = *LibSBMLc::ListOf_getElementName; *enablePackageInternal = *LibSBMLc::ListOf_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::ListOf_updateSBMLNamespace; *hasOptionalElements = *LibSBMLc::ListOf_hasOptionalElements; *isExplicitlyListed = *LibSBMLc::ListOf_isExplicitlyListed; *setExplicitlyListed = *LibSBMLc::ListOf_setExplicitlyListed; *sort = *LibSBMLc::ListOf_sort; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Model ############## package LibSBML::Model; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Model($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Model(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Model_clone; *getElementBySId = *LibSBMLc::Model_getElementBySId; *getElementByMetaId = *LibSBMLc::Model_getElementByMetaId; *getId = *LibSBMLc::Model_getId; *getName = *LibSBMLc::Model_getName; *getSubstanceUnits = *LibSBMLc::Model_getSubstanceUnits; *getTimeUnits = *LibSBMLc::Model_getTimeUnits; *getVolumeUnits = *LibSBMLc::Model_getVolumeUnits; *getAreaUnits = *LibSBMLc::Model_getAreaUnits; *getLengthUnits = *LibSBMLc::Model_getLengthUnits; *getExtentUnits = *LibSBMLc::Model_getExtentUnits; *getConversionFactor = *LibSBMLc::Model_getConversionFactor; *isSetId = *LibSBMLc::Model_isSetId; *isSetName = *LibSBMLc::Model_isSetName; *isSetSubstanceUnits = *LibSBMLc::Model_isSetSubstanceUnits; *isSetTimeUnits = *LibSBMLc::Model_isSetTimeUnits; *isSetVolumeUnits = *LibSBMLc::Model_isSetVolumeUnits; *isSetAreaUnits = *LibSBMLc::Model_isSetAreaUnits; *isSetLengthUnits = *LibSBMLc::Model_isSetLengthUnits; *isSetExtentUnits = *LibSBMLc::Model_isSetExtentUnits; *isSetConversionFactor = *LibSBMLc::Model_isSetConversionFactor; *setId = *LibSBMLc::Model_setId; *setName = *LibSBMLc::Model_setName; *setSubstanceUnits = *LibSBMLc::Model_setSubstanceUnits; *setTimeUnits = *LibSBMLc::Model_setTimeUnits; *setVolumeUnits = *LibSBMLc::Model_setVolumeUnits; *setAreaUnits = *LibSBMLc::Model_setAreaUnits; *setLengthUnits = *LibSBMLc::Model_setLengthUnits; *setExtentUnits = *LibSBMLc::Model_setExtentUnits; *setConversionFactor = *LibSBMLc::Model_setConversionFactor; *unsetId = *LibSBMLc::Model_unsetId; *unsetName = *LibSBMLc::Model_unsetName; *unsetSubstanceUnits = *LibSBMLc::Model_unsetSubstanceUnits; *unsetTimeUnits = *LibSBMLc::Model_unsetTimeUnits; *unsetVolumeUnits = *LibSBMLc::Model_unsetVolumeUnits; *unsetAreaUnits = *LibSBMLc::Model_unsetAreaUnits; *unsetLengthUnits = *LibSBMLc::Model_unsetLengthUnits; *unsetExtentUnits = *LibSBMLc::Model_unsetExtentUnits; *unsetConversionFactor = *LibSBMLc::Model_unsetConversionFactor; *addFunctionDefinition = *LibSBMLc::Model_addFunctionDefinition; *addUnitDefinition = *LibSBMLc::Model_addUnitDefinition; *addCompartmentType = *LibSBMLc::Model_addCompartmentType; *addSpeciesType = *LibSBMLc::Model_addSpeciesType; *addCompartment = *LibSBMLc::Model_addCompartment; *addSpecies = *LibSBMLc::Model_addSpecies; *addParameter = *LibSBMLc::Model_addParameter; *addInitialAssignment = *LibSBMLc::Model_addInitialAssignment; *addRule = *LibSBMLc::Model_addRule; *addConstraint = *LibSBMLc::Model_addConstraint; *addReaction = *LibSBMLc::Model_addReaction; *addEvent = *LibSBMLc::Model_addEvent; *createFunctionDefinition = *LibSBMLc::Model_createFunctionDefinition; *createUnitDefinition = *LibSBMLc::Model_createUnitDefinition; *createUnit = *LibSBMLc::Model_createUnit; *createCompartmentType = *LibSBMLc::Model_createCompartmentType; *createSpeciesType = *LibSBMLc::Model_createSpeciesType; *createCompartment = *LibSBMLc::Model_createCompartment; *createSpecies = *LibSBMLc::Model_createSpecies; *createParameter = *LibSBMLc::Model_createParameter; *createInitialAssignment = *LibSBMLc::Model_createInitialAssignment; *createAlgebraicRule = *LibSBMLc::Model_createAlgebraicRule; *createAssignmentRule = *LibSBMLc::Model_createAssignmentRule; *createRateRule = *LibSBMLc::Model_createRateRule; *createConstraint = *LibSBMLc::Model_createConstraint; *createReaction = *LibSBMLc::Model_createReaction; *createReactant = *LibSBMLc::Model_createReactant; *createProduct = *LibSBMLc::Model_createProduct; *createModifier = *LibSBMLc::Model_createModifier; *createKineticLaw = *LibSBMLc::Model_createKineticLaw; *createKineticLawParameter = *LibSBMLc::Model_createKineticLawParameter; *createKineticLawLocalParameter = *LibSBMLc::Model_createKineticLawLocalParameter; *createEvent = *LibSBMLc::Model_createEvent; *createEventAssignment = *LibSBMLc::Model_createEventAssignment; *createTrigger = *LibSBMLc::Model_createTrigger; *createDelay = *LibSBMLc::Model_createDelay; *setAnnotation = *LibSBMLc::Model_setAnnotation; *appendAnnotation = *LibSBMLc::Model_appendAnnotation; sub getListOfFunctionDefinitions { my $lox = LibSBMLc::Model_getListOfFunctionDefinitions(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfUnitDefinitions { my $lox = LibSBMLc::Model_getListOfUnitDefinitions(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfCompartmentTypes { my $lox = LibSBMLc::Model_getListOfCompartmentTypes(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfSpeciesTypes { my $lox = LibSBMLc::Model_getListOfSpeciesTypes(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfCompartments { my $lox = LibSBMLc::Model_getListOfCompartments(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfSpecies { my $lox = LibSBMLc::Model_getListOfSpecies(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfParameters { my $lox = LibSBMLc::Model_getListOfParameters(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfInitialAssignments { my $lox = LibSBMLc::Model_getListOfInitialAssignments(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfRules { my $lox = LibSBMLc::Model_getListOfRules(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfConstraints { my $lox = LibSBMLc::Model_getListOfConstraints(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfReactions { my $lox = LibSBMLc::Model_getListOfReactions(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfEvents { my $lox = LibSBMLc::Model_getListOfEvents(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getFunctionDefinition = *LibSBMLc::Model_getFunctionDefinition; *getUnitDefinition = *LibSBMLc::Model_getUnitDefinition; *getCompartmentType = *LibSBMLc::Model_getCompartmentType; *getSpeciesType = *LibSBMLc::Model_getSpeciesType; *getCompartment = *LibSBMLc::Model_getCompartment; *getSpecies = *LibSBMLc::Model_getSpecies; *getParameter = *LibSBMLc::Model_getParameter; *getInitialAssignment = *LibSBMLc::Model_getInitialAssignment; *getInitialAssignmentBySymbol = *LibSBMLc::Model_getInitialAssignmentBySymbol; *getRule = *LibSBMLc::Model_getRule; *getRuleByVariable = *LibSBMLc::Model_getRuleByVariable; *getAssignmentRule = *LibSBMLc::Model_getAssignmentRule; *getRateRule = *LibSBMLc::Model_getRateRule; *getAssignmentRuleByVariable = *LibSBMLc::Model_getAssignmentRuleByVariable; *getRateRuleByVariable = *LibSBMLc::Model_getRateRuleByVariable; *getConstraint = *LibSBMLc::Model_getConstraint; *getReaction = *LibSBMLc::Model_getReaction; *getSpeciesReference = *LibSBMLc::Model_getSpeciesReference; *getModifierSpeciesReference = *LibSBMLc::Model_getModifierSpeciesReference; *getEvent = *LibSBMLc::Model_getEvent; *getNumFunctionDefinitions = *LibSBMLc::Model_getNumFunctionDefinitions; *getNumUnitDefinitions = *LibSBMLc::Model_getNumUnitDefinitions; *getNumCompartmentTypes = *LibSBMLc::Model_getNumCompartmentTypes; *getNumSpeciesTypes = *LibSBMLc::Model_getNumSpeciesTypes; *getNumCompartments = *LibSBMLc::Model_getNumCompartments; *getNumSpecies = *LibSBMLc::Model_getNumSpecies; *getNumSpeciesWithBoundaryCondition = *LibSBMLc::Model_getNumSpeciesWithBoundaryCondition; *getNumParameters = *LibSBMLc::Model_getNumParameters; *getNumInitialAssignments = *LibSBMLc::Model_getNumInitialAssignments; *getNumRules = *LibSBMLc::Model_getNumRules; *getNumConstraints = *LibSBMLc::Model_getNumConstraints; *getNumReactions = *LibSBMLc::Model_getNumReactions; *getNumEvents = *LibSBMLc::Model_getNumEvents; *removeFromParentAndDelete = *LibSBMLc::Model_removeFromParentAndDelete; *renameAllIds = *LibSBMLc::Model_renameAllIds; *renameSIdRefs = *LibSBMLc::Model_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Model_renameUnitSIdRefs; *convertL1ToL2 = *LibSBMLc::Model_convertL1ToL2; *convertL1ToL3 = *LibSBMLc::Model_convertL1ToL3; *convertL2ToL3 = *LibSBMLc::Model_convertL2ToL3; *convertL2ToL1 = *LibSBMLc::Model_convertL2ToL1; *convertL3ToL1 = *LibSBMLc::Model_convertL3ToL1; *convertL3ToL2 = *LibSBMLc::Model_convertL3ToL2; *convertFromL3V2 = *LibSBMLc::Model_convertFromL3V2; *dealWithFast = *LibSBMLc::Model_dealWithFast; *dealWithL3Fast = *LibSBMLc::Model_dealWithL3Fast; *addModifiers = *LibSBMLc::Model_addModifiers; *addConstantAttribute = *LibSBMLc::Model_addConstantAttribute; *setSpatialDimensions = *LibSBMLc::Model_setSpatialDimensions; *addDefinitionsForDefaultUnits = *LibSBMLc::Model_addDefinitionsForDefaultUnits; *dealWithDefaultValues = *LibSBMLc::Model_dealWithDefaultValues; *convertParametersToLocals = *LibSBMLc::Model_convertParametersToLocals; *setSpeciesReferenceConstantValueAndStoichiometry = *LibSBMLc::Model_setSpeciesReferenceConstantValueAndStoichiometry; *removeParameterRuleUnits = *LibSBMLc::Model_removeParameterRuleUnits; *convertStoichiometryMath = *LibSBMLc::Model_convertStoichiometryMath; *assignRequiredValues = *LibSBMLc::Model_assignRequiredValues; *dealWithModelUnits = *LibSBMLc::Model_dealWithModelUnits; *dealWithStoichiometry = *LibSBMLc::Model_dealWithStoichiometry; *dealWithEvents = *LibSBMLc::Model_dealWithEvents; *removeSpeciesTypes = *LibSBMLc::Model_removeSpeciesTypes; *removeCompartmentTypes = *LibSBMLc::Model_removeCompartmentTypes; *connectToChild = *LibSBMLc::Model_connectToChild; *getTypeCode = *LibSBMLc::Model_getTypeCode; *getElementName = *LibSBMLc::Model_getElementName; *populateListFormulaUnitsData = *LibSBMLc::Model_populateListFormulaUnitsData; *isPopulatedListFormulaUnitsData = *LibSBMLc::Model_isPopulatedListFormulaUnitsData; *getFormulaUnitsDataForVariable = *LibSBMLc::Model_getFormulaUnitsDataForVariable; *getFormulaUnitsDataForAssignment = *LibSBMLc::Model_getFormulaUnitsDataForAssignment; *populateAllElementIdList = *LibSBMLc::Model_populateAllElementIdList; *isPopulatedAllElementIdList = *LibSBMLc::Model_isPopulatedAllElementIdList; *getAllElementIdList = *LibSBMLc::Model_getAllElementIdList; *clearAllElementIdList = *LibSBMLc::Model_clearAllElementIdList; *populateAllElementMetaIdList = *LibSBMLc::Model_populateAllElementMetaIdList; *isPopulatedAllElementMetaIdList = *LibSBMLc::Model_isPopulatedAllElementMetaIdList; *getAllElementMetaIdList = *LibSBMLc::Model_getAllElementMetaIdList; *clearAllElementMetaIdList = *LibSBMLc::Model_clearAllElementMetaIdList; *hasRequiredElements = *LibSBMLc::Model_hasRequiredElements; *removeFunctionDefinition = *LibSBMLc::Model_removeFunctionDefinition; *removeUnitDefinition = *LibSBMLc::Model_removeUnitDefinition; *removeCompartmentType = *LibSBMLc::Model_removeCompartmentType; *removeSpeciesType = *LibSBMLc::Model_removeSpeciesType; *removeCompartment = *LibSBMLc::Model_removeCompartment; *removeSpecies = *LibSBMLc::Model_removeSpecies; *removeParameter = *LibSBMLc::Model_removeParameter; *removeInitialAssignment = *LibSBMLc::Model_removeInitialAssignment; *removeRule = *LibSBMLc::Model_removeRule; *removeRuleByVariable = *LibSBMLc::Model_removeRuleByVariable; *removeConstraint = *LibSBMLc::Model_removeConstraint; *removeReaction = *LibSBMLc::Model_removeReaction; *removeEvent = *LibSBMLc::Model_removeEvent; *appendFrom = *LibSBMLc::Model_appendFrom; *enablePackageInternal = *LibSBMLc::Model_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::Model_updateSBMLNamespace; *renameIDs = *LibSBMLc::Model_renameIDs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLDocument ############## package LibSBML::SBMLDocument; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); *getDefaultLevel = *LibSBMLc::SBMLDocument_getDefaultLevel; *getDefaultVersion = *LibSBMLc::SBMLDocument_getDefaultVersion; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLDocument($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLDocument(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLDocument_clone; *isSetModel = *LibSBMLc::SBMLDocument_isSetModel; *getModel = *LibSBMLc::SBMLDocument_getModel; *getElementBySId = *LibSBMLc::SBMLDocument_getElementBySId; *getElementByMetaId = *LibSBMLc::SBMLDocument_getElementByMetaId; *expandFunctionDefinitions = *LibSBMLc::SBMLDocument_expandFunctionDefinitions; *expandInitialAssignments = *LibSBMLc::SBMLDocument_expandInitialAssignments; *setLevelAndVersion = *LibSBMLc::SBMLDocument_setLevelAndVersion; *updateSBMLNamespace = *LibSBMLc::SBMLDocument_updateSBMLNamespace; *setModel = *LibSBMLc::SBMLDocument_setModel; *createModel = *LibSBMLc::SBMLDocument_createModel; *setLocationURI = *LibSBMLc::SBMLDocument_setLocationURI; *getLocationURI = *LibSBMLc::SBMLDocument_getLocationURI; *setConsistencyChecks = *LibSBMLc::SBMLDocument_setConsistencyChecks; *setConsistencyChecksForConversion = *LibSBMLc::SBMLDocument_setConsistencyChecksForConversion; *checkConsistency = *LibSBMLc::SBMLDocument_checkConsistency; *checkConsistencyWithStrictUnits = *LibSBMLc::SBMLDocument_checkConsistencyWithStrictUnits; *validateSBML = *LibSBMLc::SBMLDocument_validateSBML; *checkInternalConsistency = *LibSBMLc::SBMLDocument_checkInternalConsistency; *checkL1Compatibility = *LibSBMLc::SBMLDocument_checkL1Compatibility; *checkL2v1Compatibility = *LibSBMLc::SBMLDocument_checkL2v1Compatibility; *checkL2v2Compatibility = *LibSBMLc::SBMLDocument_checkL2v2Compatibility; *checkL2v3Compatibility = *LibSBMLc::SBMLDocument_checkL2v3Compatibility; *checkL2v4Compatibility = *LibSBMLc::SBMLDocument_checkL2v4Compatibility; *checkL2v5Compatibility = *LibSBMLc::SBMLDocument_checkL2v5Compatibility; *checkL3v1Compatibility = *LibSBMLc::SBMLDocument_checkL3v1Compatibility; *checkL3v2Compatibility = *LibSBMLc::SBMLDocument_checkL3v2Compatibility; *getError = *LibSBMLc::SBMLDocument_getError; *getErrorWithSeverity = *LibSBMLc::SBMLDocument_getErrorWithSeverity; *getNumErrors = *LibSBMLc::SBMLDocument_getNumErrors; *printErrors = *LibSBMLc::SBMLDocument_printErrors; *connectToChild = *LibSBMLc::SBMLDocument_connectToChild; *convert = *LibSBMLc::SBMLDocument_convert; *enablePackageInternal = *LibSBMLc::SBMLDocument_enablePackageInternal; *getTypeCode = *LibSBMLc::SBMLDocument_getTypeCode; *getElementName = *LibSBMLc::SBMLDocument_getElementName; *getErrorLog = *LibSBMLc::SBMLDocument_getErrorLog; *getNamespaces = *LibSBMLc::SBMLDocument_getNamespaces; *enableDefaultNS = *LibSBMLc::SBMLDocument_enableDefaultNS; *isEnabledDefaultNS = *LibSBMLc::SBMLDocument_isEnabledDefaultNS; *setPackageRequired = *LibSBMLc::SBMLDocument_setPackageRequired; *getPackageRequired = *LibSBMLc::SBMLDocument_getPackageRequired; *isSetPackageRequired = *LibSBMLc::SBMLDocument_isSetPackageRequired; *isIgnoredPackage = *LibSBMLc::SBMLDocument_isIgnoredPackage; *isDisabledIgnoredPackage = *LibSBMLc::SBMLDocument_isDisabledIgnoredPackage; *setPkgRequired = *LibSBMLc::SBMLDocument_setPkgRequired; *getPkgRequired = *LibSBMLc::SBMLDocument_getPkgRequired; *isSetPkgRequired = *LibSBMLc::SBMLDocument_isSetPkgRequired; *isIgnoredPkg = *LibSBMLc::SBMLDocument_isIgnoredPkg; *getApplicableValidators = *LibSBMLc::SBMLDocument_getApplicableValidators; *getConversionValidators = *LibSBMLc::SBMLDocument_getConversionValidators; *setApplicableValidators = *LibSBMLc::SBMLDocument_setApplicableValidators; *setConversionValidators = *LibSBMLc::SBMLDocument_setConversionValidators; *getNumValidators = *LibSBMLc::SBMLDocument_getNumValidators; *clearValidators = *LibSBMLc::SBMLDocument_clearValidators; *addValidator = *LibSBMLc::SBMLDocument_addValidator; *getValidator = *LibSBMLc::SBMLDocument_getValidator; *addUnknownPackageRequired = *LibSBMLc::SBMLDocument_addUnknownPackageRequired; *hasUnknownPackage = *LibSBMLc::SBMLDocument_hasUnknownPackage; *getNumUnknownPackages = *LibSBMLc::SBMLDocument_getNumUnknownPackages; *getUnknownPackageURI = *LibSBMLc::SBMLDocument_getUnknownPackageURI; *getUnknownPackagePrefix = *LibSBMLc::SBMLDocument_getUnknownPackagePrefix; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::FunctionDefinition ############## package LibSBML::FunctionDefinition; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_FunctionDefinition($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_FunctionDefinition(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::FunctionDefinition_clone; *getId = *LibSBMLc::FunctionDefinition_getId; *getName = *LibSBMLc::FunctionDefinition_getName; *getMath = *LibSBMLc::FunctionDefinition_getMath; *isSetId = *LibSBMLc::FunctionDefinition_isSetId; *isSetName = *LibSBMLc::FunctionDefinition_isSetName; *isSetMath = *LibSBMLc::FunctionDefinition_isSetMath; *setId = *LibSBMLc::FunctionDefinition_setId; *setName = *LibSBMLc::FunctionDefinition_setName; *setMath = *LibSBMLc::FunctionDefinition_setMath; *unsetName = *LibSBMLc::FunctionDefinition_unsetName; *getArgument = *LibSBMLc::FunctionDefinition_getArgument; *getBody = *LibSBMLc::FunctionDefinition_getBody; *isSetBody = *LibSBMLc::FunctionDefinition_isSetBody; *getNumArguments = *LibSBMLc::FunctionDefinition_getNumArguments; *getTypeCode = *LibSBMLc::FunctionDefinition_getTypeCode; *getElementName = *LibSBMLc::FunctionDefinition_getElementName; *hasRequiredAttributes = *LibSBMLc::FunctionDefinition_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::FunctionDefinition_hasRequiredElements; *renameUnitSIdRefs = *LibSBMLc::FunctionDefinition_renameUnitSIdRefs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfFunctionDefinitions ############## package LibSBML::ListOfFunctionDefinitions; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfFunctionDefinitions(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfFunctionDefinitions_clone; *getItemTypeCode = *LibSBMLc::ListOfFunctionDefinitions_getItemTypeCode; *getElementName = *LibSBMLc::ListOfFunctionDefinitions_getElementName; *get = *LibSBMLc::ListOfFunctionDefinitions_get; *remove = *LibSBMLc::ListOfFunctionDefinitions_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfFunctionDefinitions($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Unit ############## package LibSBML::Unit; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Unit($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Unit(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Unit_clone; *initDefaults = *LibSBMLc::Unit_initDefaults; *getKind = *LibSBMLc::Unit_getKind; *getExponent = *LibSBMLc::Unit_getExponent; *getExponentAsDouble = *LibSBMLc::Unit_getExponentAsDouble; *getScale = *LibSBMLc::Unit_getScale; *getMultiplier = *LibSBMLc::Unit_getMultiplier; *getOffset = *LibSBMLc::Unit_getOffset; *isAmpere = *LibSBMLc::Unit_isAmpere; *isAvogadro = *LibSBMLc::Unit_isAvogadro; *isBecquerel = *LibSBMLc::Unit_isBecquerel; *isCandela = *LibSBMLc::Unit_isCandela; *isCelsius = *LibSBMLc::Unit_isCelsius; *isCoulomb = *LibSBMLc::Unit_isCoulomb; *isDimensionless = *LibSBMLc::Unit_isDimensionless; *isFarad = *LibSBMLc::Unit_isFarad; *isGram = *LibSBMLc::Unit_isGram; *isGray = *LibSBMLc::Unit_isGray; *isHenry = *LibSBMLc::Unit_isHenry; *isHertz = *LibSBMLc::Unit_isHertz; *isItem = *LibSBMLc::Unit_isItem; *isJoule = *LibSBMLc::Unit_isJoule; *isKatal = *LibSBMLc::Unit_isKatal; *isKelvin = *LibSBMLc::Unit_isKelvin; *isKilogram = *LibSBMLc::Unit_isKilogram; *isLitre = *LibSBMLc::Unit_isLitre; *isLumen = *LibSBMLc::Unit_isLumen; *isLux = *LibSBMLc::Unit_isLux; *isMetre = *LibSBMLc::Unit_isMetre; *isMole = *LibSBMLc::Unit_isMole; *isNewton = *LibSBMLc::Unit_isNewton; *isOhm = *LibSBMLc::Unit_isOhm; *isPascal = *LibSBMLc::Unit_isPascal; *isRadian = *LibSBMLc::Unit_isRadian; *isSecond = *LibSBMLc::Unit_isSecond; *isSiemens = *LibSBMLc::Unit_isSiemens; *isSievert = *LibSBMLc::Unit_isSievert; *isSteradian = *LibSBMLc::Unit_isSteradian; *isTesla = *LibSBMLc::Unit_isTesla; *isVolt = *LibSBMLc::Unit_isVolt; *isWatt = *LibSBMLc::Unit_isWatt; *isWeber = *LibSBMLc::Unit_isWeber; *isSetKind = *LibSBMLc::Unit_isSetKind; *isSetExponent = *LibSBMLc::Unit_isSetExponent; *isSetScale = *LibSBMLc::Unit_isSetScale; *isSetMultiplier = *LibSBMLc::Unit_isSetMultiplier; *isSetOffset = *LibSBMLc::Unit_isSetOffset; *setKind = *LibSBMLc::Unit_setKind; *setExponent = *LibSBMLc::Unit_setExponent; *setScale = *LibSBMLc::Unit_setScale; *setMultiplier = *LibSBMLc::Unit_setMultiplier; *setOffset = *LibSBMLc::Unit_setOffset; *unsetKind = *LibSBMLc::Unit_unsetKind; *unsetExponent = *LibSBMLc::Unit_unsetExponent; *unsetScale = *LibSBMLc::Unit_unsetScale; *unsetMultiplier = *LibSBMLc::Unit_unsetMultiplier; *unsetOffset = *LibSBMLc::Unit_unsetOffset; *getTypeCode = *LibSBMLc::Unit_getTypeCode; *getElementName = *LibSBMLc::Unit_getElementName; *isBuiltIn = *LibSBMLc::Unit_isBuiltIn; *isUnitKind = *LibSBMLc::Unit_isUnitKind; *areIdentical = *LibSBMLc::Unit_areIdentical; *areEquivalent = *LibSBMLc::Unit_areEquivalent; *removeScale = *LibSBMLc::Unit_removeScale; *merge = *LibSBMLc::Unit_merge; *convertToSI = *LibSBMLc::Unit_convertToSI; *hasRequiredAttributes = *LibSBMLc::Unit_hasRequiredAttributes; *setExponentUnitChecking = *LibSBMLc::Unit_setExponentUnitChecking; *getExponentUnitChecking = *LibSBMLc::Unit_getExponentUnitChecking; *isUnitChecking = *LibSBMLc::Unit_isUnitChecking; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfUnits ############## package LibSBML::ListOfUnits; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfUnits(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfUnits_clone; *getItemTypeCode = *LibSBMLc::ListOfUnits_getItemTypeCode; *getElementName = *LibSBMLc::ListOfUnits_getElementName; *get = *LibSBMLc::ListOfUnits_get; *remove = *LibSBMLc::ListOfUnits_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfUnits($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::UnitDefinition ############## package LibSBML::UnitDefinition; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_UnitDefinition($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_UnitDefinition(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::UnitDefinition_clone; *getElementBySId = *LibSBMLc::UnitDefinition_getElementBySId; *getElementByMetaId = *LibSBMLc::UnitDefinition_getElementByMetaId; *getId = *LibSBMLc::UnitDefinition_getId; *getName = *LibSBMLc::UnitDefinition_getName; *isSetId = *LibSBMLc::UnitDefinition_isSetId; *isSetName = *LibSBMLc::UnitDefinition_isSetName; *setId = *LibSBMLc::UnitDefinition_setId; *setName = *LibSBMLc::UnitDefinition_setName; *unsetName = *LibSBMLc::UnitDefinition_unsetName; *isVariantOfArea = *LibSBMLc::UnitDefinition_isVariantOfArea; *isVariantOfLength = *LibSBMLc::UnitDefinition_isVariantOfLength; *isVariantOfSubstance = *LibSBMLc::UnitDefinition_isVariantOfSubstance; *isVariantOfTime = *LibSBMLc::UnitDefinition_isVariantOfTime; *isVariantOfVolume = *LibSBMLc::UnitDefinition_isVariantOfVolume; *isVariantOfDimensionless = *LibSBMLc::UnitDefinition_isVariantOfDimensionless; *isVariantOfMass = *LibSBMLc::UnitDefinition_isVariantOfMass; *isVariantOfSubstancePerTime = *LibSBMLc::UnitDefinition_isVariantOfSubstancePerTime; *addUnit = *LibSBMLc::UnitDefinition_addUnit; *createUnit = *LibSBMLc::UnitDefinition_createUnit; sub getListOfUnits { my $lox = LibSBMLc::UnitDefinition_getListOfUnits(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getUnit = *LibSBMLc::UnitDefinition_getUnit; *getNumUnits = *LibSBMLc::UnitDefinition_getNumUnits; *removeUnit = *LibSBMLc::UnitDefinition_removeUnit; *connectToChild = *LibSBMLc::UnitDefinition_connectToChild; *enablePackageInternal = *LibSBMLc::UnitDefinition_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::UnitDefinition_updateSBMLNamespace; *getTypeCode = *LibSBMLc::UnitDefinition_getTypeCode; *getElementName = *LibSBMLc::UnitDefinition_getElementName; *simplify = *LibSBMLc::UnitDefinition_simplify; *reorder = *LibSBMLc::UnitDefinition_reorder; *convertToSI = *LibSBMLc::UnitDefinition_convertToSI; *areIdentical = *LibSBMLc::UnitDefinition_areIdentical; *areEquivalent = *LibSBMLc::UnitDefinition_areEquivalent; *combine = *LibSBMLc::UnitDefinition_combine; *divide = *LibSBMLc::UnitDefinition_divide; *printUnits = *LibSBMLc::UnitDefinition_printUnits; *hasRequiredAttributes = *LibSBMLc::UnitDefinition_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::UnitDefinition_hasRequiredElements; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfUnitDefinitions ############## package LibSBML::ListOfUnitDefinitions; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfUnitDefinitions(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfUnitDefinitions_clone; *getItemTypeCode = *LibSBMLc::ListOfUnitDefinitions_getItemTypeCode; *getElementName = *LibSBMLc::ListOfUnitDefinitions_getElementName; *get = *LibSBMLc::ListOfUnitDefinitions_get; *getElementBySId = *LibSBMLc::ListOfUnitDefinitions_getElementBySId; *remove = *LibSBMLc::ListOfUnitDefinitions_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfUnitDefinitions($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::CompartmentType ############## package LibSBML::CompartmentType; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_CompartmentType($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_CompartmentType(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::CompartmentType_clone; *getId = *LibSBMLc::CompartmentType_getId; *getName = *LibSBMLc::CompartmentType_getName; *isSetId = *LibSBMLc::CompartmentType_isSetId; *isSetName = *LibSBMLc::CompartmentType_isSetName; *setId = *LibSBMLc::CompartmentType_setId; *setName = *LibSBMLc::CompartmentType_setName; *unsetName = *LibSBMLc::CompartmentType_unsetName; *getTypeCode = *LibSBMLc::CompartmentType_getTypeCode; *getElementName = *LibSBMLc::CompartmentType_getElementName; *hasRequiredAttributes = *LibSBMLc::CompartmentType_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfCompartmentTypes ############## package LibSBML::ListOfCompartmentTypes; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfCompartmentTypes(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfCompartmentTypes_clone; *getItemTypeCode = *LibSBMLc::ListOfCompartmentTypes_getItemTypeCode; *getElementName = *LibSBMLc::ListOfCompartmentTypes_getElementName; *get = *LibSBMLc::ListOfCompartmentTypes_get; *remove = *LibSBMLc::ListOfCompartmentTypes_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfCompartmentTypes($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SpeciesType ############## package LibSBML::SpeciesType; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SpeciesType($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_SpeciesType(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SpeciesType_clone; *getId = *LibSBMLc::SpeciesType_getId; *getName = *LibSBMLc::SpeciesType_getName; *isSetId = *LibSBMLc::SpeciesType_isSetId; *isSetName = *LibSBMLc::SpeciesType_isSetName; *setId = *LibSBMLc::SpeciesType_setId; *setName = *LibSBMLc::SpeciesType_setName; *unsetName = *LibSBMLc::SpeciesType_unsetName; *getTypeCode = *LibSBMLc::SpeciesType_getTypeCode; *getElementName = *LibSBMLc::SpeciesType_getElementName; *hasRequiredAttributes = *LibSBMLc::SpeciesType_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfSpeciesTypes ############## package LibSBML::ListOfSpeciesTypes; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfSpeciesTypes(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfSpeciesTypes_clone; *getItemTypeCode = *LibSBMLc::ListOfSpeciesTypes_getItemTypeCode; *getElementName = *LibSBMLc::ListOfSpeciesTypes_getElementName; *get = *LibSBMLc::ListOfSpeciesTypes_get; *remove = *LibSBMLc::ListOfSpeciesTypes_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfSpeciesTypes($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Compartment ############## package LibSBML::Compartment; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Compartment($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Compartment(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Compartment_clone; *initDefaults = *LibSBMLc::Compartment_initDefaults; *getId = *LibSBMLc::Compartment_getId; *getName = *LibSBMLc::Compartment_getName; *getCompartmentType = *LibSBMLc::Compartment_getCompartmentType; *getSpatialDimensions = *LibSBMLc::Compartment_getSpatialDimensions; *getSpatialDimensionsAsDouble = *LibSBMLc::Compartment_getSpatialDimensionsAsDouble; *getSize = *LibSBMLc::Compartment_getSize; *getVolume = *LibSBMLc::Compartment_getVolume; *getUnits = *LibSBMLc::Compartment_getUnits; *getOutside = *LibSBMLc::Compartment_getOutside; *getConstant = *LibSBMLc::Compartment_getConstant; *isSetId = *LibSBMLc::Compartment_isSetId; *isSetName = *LibSBMLc::Compartment_isSetName; *isSetCompartmentType = *LibSBMLc::Compartment_isSetCompartmentType; *isSetSize = *LibSBMLc::Compartment_isSetSize; *isSetVolume = *LibSBMLc::Compartment_isSetVolume; *isSetUnits = *LibSBMLc::Compartment_isSetUnits; *isSetOutside = *LibSBMLc::Compartment_isSetOutside; *isSetSpatialDimensions = *LibSBMLc::Compartment_isSetSpatialDimensions; *isSetConstant = *LibSBMLc::Compartment_isSetConstant; *setId = *LibSBMLc::Compartment_setId; *setName = *LibSBMLc::Compartment_setName; *setCompartmentType = *LibSBMLc::Compartment_setCompartmentType; *setSpatialDimensions = *LibSBMLc::Compartment_setSpatialDimensions; *setSize = *LibSBMLc::Compartment_setSize; *setVolume = *LibSBMLc::Compartment_setVolume; *setUnits = *LibSBMLc::Compartment_setUnits; *setOutside = *LibSBMLc::Compartment_setOutside; *setConstant = *LibSBMLc::Compartment_setConstant; *renameSIdRefs = *LibSBMLc::Compartment_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Compartment_renameUnitSIdRefs; *unsetName = *LibSBMLc::Compartment_unsetName; *unsetCompartmentType = *LibSBMLc::Compartment_unsetCompartmentType; *unsetConstant = *LibSBMLc::Compartment_unsetConstant; *unsetSize = *LibSBMLc::Compartment_unsetSize; *unsetVolume = *LibSBMLc::Compartment_unsetVolume; *unsetUnits = *LibSBMLc::Compartment_unsetUnits; *unsetOutside = *LibSBMLc::Compartment_unsetOutside; *unsetSpatialDimensions = *LibSBMLc::Compartment_unsetSpatialDimensions; *getDerivedUnitDefinition = *LibSBMLc::Compartment_getDerivedUnitDefinition; *getTypeCode = *LibSBMLc::Compartment_getTypeCode; *getElementName = *LibSBMLc::Compartment_getElementName; *hasRequiredAttributes = *LibSBMLc::Compartment_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfCompartments ############## package LibSBML::ListOfCompartments; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfCompartments(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfCompartments_clone; *getItemTypeCode = *LibSBMLc::ListOfCompartments_getItemTypeCode; *getElementName = *LibSBMLc::ListOfCompartments_getElementName; *get = *LibSBMLc::ListOfCompartments_get; *remove = *LibSBMLc::ListOfCompartments_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfCompartments($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Species ############## package LibSBML::Species; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Species($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Species(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Species_clone; *initDefaults = *LibSBMLc::Species_initDefaults; *getId = *LibSBMLc::Species_getId; *getName = *LibSBMLc::Species_getName; *getSpeciesType = *LibSBMLc::Species_getSpeciesType; *getCompartment = *LibSBMLc::Species_getCompartment; *getInitialAmount = *LibSBMLc::Species_getInitialAmount; *getInitialConcentration = *LibSBMLc::Species_getInitialConcentration; *getSubstanceUnits = *LibSBMLc::Species_getSubstanceUnits; *getSpatialSizeUnits = *LibSBMLc::Species_getSpatialSizeUnits; *getUnits = *LibSBMLc::Species_getUnits; *getHasOnlySubstanceUnits = *LibSBMLc::Species_getHasOnlySubstanceUnits; *getBoundaryCondition = *LibSBMLc::Species_getBoundaryCondition; *getCharge = *LibSBMLc::Species_getCharge; *getConstant = *LibSBMLc::Species_getConstant; *getConversionFactor = *LibSBMLc::Species_getConversionFactor; *isSetId = *LibSBMLc::Species_isSetId; *isSetName = *LibSBMLc::Species_isSetName; *isSetSpeciesType = *LibSBMLc::Species_isSetSpeciesType; *isSetCompartment = *LibSBMLc::Species_isSetCompartment; *isSetInitialAmount = *LibSBMLc::Species_isSetInitialAmount; *isSetInitialConcentration = *LibSBMLc::Species_isSetInitialConcentration; *isSetSubstanceUnits = *LibSBMLc::Species_isSetSubstanceUnits; *isSetSpatialSizeUnits = *LibSBMLc::Species_isSetSpatialSizeUnits; *isSetUnits = *LibSBMLc::Species_isSetUnits; *isSetCharge = *LibSBMLc::Species_isSetCharge; *isSetConversionFactor = *LibSBMLc::Species_isSetConversionFactor; *isSetBoundaryCondition = *LibSBMLc::Species_isSetBoundaryCondition; *isSetHasOnlySubstanceUnits = *LibSBMLc::Species_isSetHasOnlySubstanceUnits; *isSetConstant = *LibSBMLc::Species_isSetConstant; *setId = *LibSBMLc::Species_setId; *setName = *LibSBMLc::Species_setName; *setSpeciesType = *LibSBMLc::Species_setSpeciesType; *setCompartment = *LibSBMLc::Species_setCompartment; *setInitialAmount = *LibSBMLc::Species_setInitialAmount; *setInitialConcentration = *LibSBMLc::Species_setInitialConcentration; *setSubstanceUnits = *LibSBMLc::Species_setSubstanceUnits; *setSpatialSizeUnits = *LibSBMLc::Species_setSpatialSizeUnits; *setUnits = *LibSBMLc::Species_setUnits; *setHasOnlySubstanceUnits = *LibSBMLc::Species_setHasOnlySubstanceUnits; *setBoundaryCondition = *LibSBMLc::Species_setBoundaryCondition; *setCharge = *LibSBMLc::Species_setCharge; *setConstant = *LibSBMLc::Species_setConstant; *setConversionFactor = *LibSBMLc::Species_setConversionFactor; *unsetName = *LibSBMLc::Species_unsetName; *unsetConstant = *LibSBMLc::Species_unsetConstant; *unsetSpeciesType = *LibSBMLc::Species_unsetSpeciesType; *unsetInitialAmount = *LibSBMLc::Species_unsetInitialAmount; *unsetInitialConcentration = *LibSBMLc::Species_unsetInitialConcentration; *unsetSubstanceUnits = *LibSBMLc::Species_unsetSubstanceUnits; *unsetSpatialSizeUnits = *LibSBMLc::Species_unsetSpatialSizeUnits; *unsetUnits = *LibSBMLc::Species_unsetUnits; *unsetCharge = *LibSBMLc::Species_unsetCharge; *unsetConversionFactor = *LibSBMLc::Species_unsetConversionFactor; *unsetCompartment = *LibSBMLc::Species_unsetCompartment; *unsetBoundaryCondition = *LibSBMLc::Species_unsetBoundaryCondition; *unsetHasOnlySubstanceUnits = *LibSBMLc::Species_unsetHasOnlySubstanceUnits; *getDerivedUnitDefinition = *LibSBMLc::Species_getDerivedUnitDefinition; *getTypeCode = *LibSBMLc::Species_getTypeCode; *getElementName = *LibSBMLc::Species_getElementName; *hasRequiredAttributes = *LibSBMLc::Species_hasRequiredAttributes; *renameSIdRefs = *LibSBMLc::Species_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Species_renameUnitSIdRefs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfSpecies ############## package LibSBML::ListOfSpecies; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfSpecies(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfSpecies_clone; *getItemTypeCode = *LibSBMLc::ListOfSpecies_getItemTypeCode; *getElementName = *LibSBMLc::ListOfSpecies_getElementName; *get = *LibSBMLc::ListOfSpecies_get; *remove = *LibSBMLc::ListOfSpecies_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfSpecies($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Parameter ############## package LibSBML::Parameter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Parameter($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Parameter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Parameter_clone; *initDefaults = *LibSBMLc::Parameter_initDefaults; *getId = *LibSBMLc::Parameter_getId; *getName = *LibSBMLc::Parameter_getName; *getValue = *LibSBMLc::Parameter_getValue; *getUnits = *LibSBMLc::Parameter_getUnits; *getConstant = *LibSBMLc::Parameter_getConstant; *isSetId = *LibSBMLc::Parameter_isSetId; *isSetName = *LibSBMLc::Parameter_isSetName; *isSetValue = *LibSBMLc::Parameter_isSetValue; *isSetUnits = *LibSBMLc::Parameter_isSetUnits; *isSetConstant = *LibSBMLc::Parameter_isSetConstant; *setId = *LibSBMLc::Parameter_setId; *setName = *LibSBMLc::Parameter_setName; *setValue = *LibSBMLc::Parameter_setValue; *setUnits = *LibSBMLc::Parameter_setUnits; *setConstant = *LibSBMLc::Parameter_setConstant; *unsetName = *LibSBMLc::Parameter_unsetName; *unsetConstant = *LibSBMLc::Parameter_unsetConstant; *unsetValue = *LibSBMLc::Parameter_unsetValue; *unsetUnits = *LibSBMLc::Parameter_unsetUnits; *getDerivedUnitDefinition = *LibSBMLc::Parameter_getDerivedUnitDefinition; *getTypeCode = *LibSBMLc::Parameter_getTypeCode; *getElementName = *LibSBMLc::Parameter_getElementName; *hasRequiredAttributes = *LibSBMLc::Parameter_hasRequiredAttributes; *renameUnitSIdRefs = *LibSBMLc::Parameter_renameUnitSIdRefs; *setCalculatingUnits = *LibSBMLc::Parameter_setCalculatingUnits; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfParameters ############## package LibSBML::ListOfParameters; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfParameters(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfParameters_clone; *getItemTypeCode = *LibSBMLc::ListOfParameters_getItemTypeCode; *getElementName = *LibSBMLc::ListOfParameters_getElementName; *get = *LibSBMLc::ListOfParameters_get; *remove = *LibSBMLc::ListOfParameters_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfParameters($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::LocalParameter ############## package LibSBML::LocalParameter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::Parameter LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_LocalParameter($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_LocalParameter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::LocalParameter_clone; *getDerivedUnitDefinition = *LibSBMLc::LocalParameter_getDerivedUnitDefinition; *getTypeCode = *LibSBMLc::LocalParameter_getTypeCode; *getElementName = *LibSBMLc::LocalParameter_getElementName; *hasRequiredAttributes = *LibSBMLc::LocalParameter_hasRequiredAttributes; *getConstant = *LibSBMLc::LocalParameter_getConstant; *isSetConstant = *LibSBMLc::LocalParameter_isSetConstant; *setConstant = *LibSBMLc::LocalParameter_setConstant; *unsetConstant = *LibSBMLc::LocalParameter_unsetConstant; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfLocalParameters ############## package LibSBML::ListOfLocalParameters; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOfParameters LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfLocalParameters(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfLocalParameters_clone; *getItemTypeCode = *LibSBMLc::ListOfLocalParameters_getItemTypeCode; *getElementName = *LibSBMLc::ListOfLocalParameters_getElementName; *get = *LibSBMLc::ListOfLocalParameters_get; *getElementBySId = *LibSBMLc::ListOfLocalParameters_getElementBySId; *remove = *LibSBMLc::ListOfLocalParameters_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfLocalParameters($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::InitialAssignment ############## package LibSBML::InitialAssignment; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_InitialAssignment($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_InitialAssignment(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::InitialAssignment_clone; *getSymbol = *LibSBMLc::InitialAssignment_getSymbol; *getMath = *LibSBMLc::InitialAssignment_getMath; *isSetSymbol = *LibSBMLc::InitialAssignment_isSetSymbol; *isSetMath = *LibSBMLc::InitialAssignment_isSetMath; *setSymbol = *LibSBMLc::InitialAssignment_setSymbol; *unsetSymbol = *LibSBMLc::InitialAssignment_unsetSymbol; *setMath = *LibSBMLc::InitialAssignment_setMath; *getDerivedUnitDefinition = *LibSBMLc::InitialAssignment_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::InitialAssignment_containsUndeclaredUnits; *getTypeCode = *LibSBMLc::InitialAssignment_getTypeCode; *getElementName = *LibSBMLc::InitialAssignment_getElementName; *hasRequiredAttributes = *LibSBMLc::InitialAssignment_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::InitialAssignment_hasRequiredElements; *getId = *LibSBMLc::InitialAssignment_getId; *renameSIdRefs = *LibSBMLc::InitialAssignment_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::InitialAssignment_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::InitialAssignment_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::InitialAssignment_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::InitialAssignment_multiplyAssignmentsToSIdByFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfInitialAssignments ############## package LibSBML::ListOfInitialAssignments; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfInitialAssignments(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfInitialAssignments_clone; *getItemTypeCode = *LibSBMLc::ListOfInitialAssignments_getItemTypeCode; *getElementName = *LibSBMLc::ListOfInitialAssignments_getElementName; *get = *LibSBMLc::ListOfInitialAssignments_get; *remove = *LibSBMLc::ListOfInitialAssignments_remove; *getElementBySId = *LibSBMLc::ListOfInitialAssignments_getElementBySId; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfInitialAssignments($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Rule ############## package LibSBML::Rule; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Rule($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Rule(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Rule_clone; *getFormula = *LibSBMLc::Rule_getFormula; *getMath = *LibSBMLc::Rule_getMath; *getVariable = *LibSBMLc::Rule_getVariable; *getUnits = *LibSBMLc::Rule_getUnits; *isSetFormula = *LibSBMLc::Rule_isSetFormula; *isSetMath = *LibSBMLc::Rule_isSetMath; *isSetVariable = *LibSBMLc::Rule_isSetVariable; *isSetUnits = *LibSBMLc::Rule_isSetUnits; *setFormula = *LibSBMLc::Rule_setFormula; *setMath = *LibSBMLc::Rule_setMath; *setVariable = *LibSBMLc::Rule_setVariable; *setUnits = *LibSBMLc::Rule_setUnits; *unsetVariable = *LibSBMLc::Rule_unsetVariable; *unsetUnits = *LibSBMLc::Rule_unsetUnits; *getDerivedUnitDefinition = *LibSBMLc::Rule_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::Rule_containsUndeclaredUnits; *getType = *LibSBMLc::Rule_getType; *isAlgebraic = *LibSBMLc::Rule_isAlgebraic; *isAssignment = *LibSBMLc::Rule_isAssignment; *isCompartmentVolume = *LibSBMLc::Rule_isCompartmentVolume; *isParameter = *LibSBMLc::Rule_isParameter; *isRate = *LibSBMLc::Rule_isRate; *isScalar = *LibSBMLc::Rule_isScalar; *isSpeciesConcentration = *LibSBMLc::Rule_isSpeciesConcentration; *getTypeCode = *LibSBMLc::Rule_getTypeCode; *getL1TypeCode = *LibSBMLc::Rule_getL1TypeCode; *getElementName = *LibSBMLc::Rule_getElementName; *setL1TypeCode = *LibSBMLc::Rule_setL1TypeCode; *hasRequiredElements = *LibSBMLc::Rule_hasRequiredElements; *hasRequiredAttributes = *LibSBMLc::Rule_hasRequiredAttributes; *renameSIdRefs = *LibSBMLc::Rule_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Rule_renameUnitSIdRefs; *getId = *LibSBMLc::Rule_getId; *replaceSIDWithFunction = *LibSBMLc::Rule_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::Rule_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::Rule_multiplyAssignmentsToSIdByFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfRules ############## package LibSBML::ListOfRules; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfRules(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfRules_clone; *getItemTypeCode = *LibSBMLc::ListOfRules_getItemTypeCode; *getElementName = *LibSBMLc::ListOfRules_getElementName; *get = *LibSBMLc::ListOfRules_get; *getElementBySId = *LibSBMLc::ListOfRules_getElementBySId; *remove = *LibSBMLc::ListOfRules_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfRules($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::AlgebraicRule ############## package LibSBML::AlgebraicRule; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::Rule LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_AlgebraicRule(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_AlgebraicRule($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::AlgebraicRule_clone; *hasRequiredAttributes = *LibSBMLc::AlgebraicRule_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::AssignmentRule ############## package LibSBML::AssignmentRule; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::Rule LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_AssignmentRule(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_AssignmentRule($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::AssignmentRule_clone; *hasRequiredAttributes = *LibSBMLc::AssignmentRule_hasRequiredAttributes; *renameSIdRefs = *LibSBMLc::AssignmentRule_renameSIdRefs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::RateRule ############## package LibSBML::RateRule; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::Rule LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_RateRule(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_RateRule($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::RateRule_clone; *hasRequiredAttributes = *LibSBMLc::RateRule_hasRequiredAttributes; *renameSIdRefs = *LibSBMLc::RateRule_renameSIdRefs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Constraint ############## package LibSBML::Constraint; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Constraint($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Constraint(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Constraint_clone; *getMessage = *LibSBMLc::Constraint_getMessage; *getMessageString = *LibSBMLc::Constraint_getMessageString; *getMath = *LibSBMLc::Constraint_getMath; *isSetMessage = *LibSBMLc::Constraint_isSetMessage; *isSetMath = *LibSBMLc::Constraint_isSetMath; *setMessage = *LibSBMLc::Constraint_setMessage; *setMath = *LibSBMLc::Constraint_setMath; *unsetMessage = *LibSBMLc::Constraint_unsetMessage; *renameSIdRefs = *LibSBMLc::Constraint_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Constraint_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::Constraint_replaceSIDWithFunction; *getTypeCode = *LibSBMLc::Constraint_getTypeCode; *getElementName = *LibSBMLc::Constraint_getElementName; *hasRequiredElements = *LibSBMLc::Constraint_hasRequiredElements; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfConstraints ############## package LibSBML::ListOfConstraints; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfConstraints(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfConstraints_clone; *getItemTypeCode = *LibSBMLc::ListOfConstraints_getItemTypeCode; *getElementName = *LibSBMLc::ListOfConstraints_getElementName; *get = *LibSBMLc::ListOfConstraints_get; *remove = *LibSBMLc::ListOfConstraints_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfConstraints($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Reaction ############## package LibSBML::Reaction; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Reaction($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Reaction(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Reaction_clone; *getElementBySId = *LibSBMLc::Reaction_getElementBySId; *getElementByMetaId = *LibSBMLc::Reaction_getElementByMetaId; *renameSIdRefs = *LibSBMLc::Reaction_renameSIdRefs; *initDefaults = *LibSBMLc::Reaction_initDefaults; *getId = *LibSBMLc::Reaction_getId; *getName = *LibSBMLc::Reaction_getName; *getKineticLaw = *LibSBMLc::Reaction_getKineticLaw; *getReversible = *LibSBMLc::Reaction_getReversible; *getFast = *LibSBMLc::Reaction_getFast; *getCompartment = *LibSBMLc::Reaction_getCompartment; *isSetId = *LibSBMLc::Reaction_isSetId; *isSetName = *LibSBMLc::Reaction_isSetName; *isSetKineticLaw = *LibSBMLc::Reaction_isSetKineticLaw; *isSetFast = *LibSBMLc::Reaction_isSetFast; *isSetCompartment = *LibSBMLc::Reaction_isSetCompartment; *isSetReversible = *LibSBMLc::Reaction_isSetReversible; *setId = *LibSBMLc::Reaction_setId; *setName = *LibSBMLc::Reaction_setName; *setKineticLaw = *LibSBMLc::Reaction_setKineticLaw; *setReversible = *LibSBMLc::Reaction_setReversible; *setFast = *LibSBMLc::Reaction_setFast; *setCompartment = *LibSBMLc::Reaction_setCompartment; *unsetName = *LibSBMLc::Reaction_unsetName; *unsetKineticLaw = *LibSBMLc::Reaction_unsetKineticLaw; *unsetFast = *LibSBMLc::Reaction_unsetFast; *unsetCompartment = *LibSBMLc::Reaction_unsetCompartment; *unsetReversible = *LibSBMLc::Reaction_unsetReversible; *addReactant = *LibSBMLc::Reaction_addReactant; *addProduct = *LibSBMLc::Reaction_addProduct; *addModifier = *LibSBMLc::Reaction_addModifier; *createReactant = *LibSBMLc::Reaction_createReactant; *createProduct = *LibSBMLc::Reaction_createProduct; *createModifier = *LibSBMLc::Reaction_createModifier; *createKineticLaw = *LibSBMLc::Reaction_createKineticLaw; sub getListOfReactants { my $lox = LibSBMLc::Reaction_getListOfReactants(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfProducts { my $lox = LibSBMLc::Reaction_getListOfProducts(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub getListOfModifiers { my $lox = LibSBMLc::Reaction_getListOfModifiers(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getReactant = *LibSBMLc::Reaction_getReactant; *getProduct = *LibSBMLc::Reaction_getProduct; *getModifier = *LibSBMLc::Reaction_getModifier; *getNumReactants = *LibSBMLc::Reaction_getNumReactants; *getNumProducts = *LibSBMLc::Reaction_getNumProducts; *getNumModifiers = *LibSBMLc::Reaction_getNumModifiers; *removeReactant = *LibSBMLc::Reaction_removeReactant; *removeProduct = *LibSBMLc::Reaction_removeProduct; *removeModifier = *LibSBMLc::Reaction_removeModifier; *connectToChild = *LibSBMLc::Reaction_connectToChild; *enablePackageInternal = *LibSBMLc::Reaction_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::Reaction_updateSBMLNamespace; *getTypeCode = *LibSBMLc::Reaction_getTypeCode; *getElementName = *LibSBMLc::Reaction_getElementName; *hasRequiredAttributes = *LibSBMLc::Reaction_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfReactions ############## package LibSBML::ListOfReactions; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfReactions(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfReactions_clone; *getItemTypeCode = *LibSBMLc::ListOfReactions_getItemTypeCode; *getElementName = *LibSBMLc::ListOfReactions_getElementName; *get = *LibSBMLc::ListOfReactions_get; *remove = *LibSBMLc::ListOfReactions_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfReactions($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::KineticLaw ############## package LibSBML::KineticLaw; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_KineticLaw($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_KineticLaw(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::KineticLaw_clone; *getElementBySId = *LibSBMLc::KineticLaw_getElementBySId; *getElementByMetaId = *LibSBMLc::KineticLaw_getElementByMetaId; *getFormula = *LibSBMLc::KineticLaw_getFormula; *getMath = *LibSBMLc::KineticLaw_getMath; *getTimeUnits = *LibSBMLc::KineticLaw_getTimeUnits; *getSubstanceUnits = *LibSBMLc::KineticLaw_getSubstanceUnits; *isSetFormula = *LibSBMLc::KineticLaw_isSetFormula; *isSetMath = *LibSBMLc::KineticLaw_isSetMath; *isSetTimeUnits = *LibSBMLc::KineticLaw_isSetTimeUnits; *isSetSubstanceUnits = *LibSBMLc::KineticLaw_isSetSubstanceUnits; *setFormula = *LibSBMLc::KineticLaw_setFormula; *setMath = *LibSBMLc::KineticLaw_setMath; *setTimeUnits = *LibSBMLc::KineticLaw_setTimeUnits; *setSubstanceUnits = *LibSBMLc::KineticLaw_setSubstanceUnits; *unsetTimeUnits = *LibSBMLc::KineticLaw_unsetTimeUnits; *unsetSubstanceUnits = *LibSBMLc::KineticLaw_unsetSubstanceUnits; *addParameter = *LibSBMLc::KineticLaw_addParameter; *addLocalParameter = *LibSBMLc::KineticLaw_addLocalParameter; *createParameter = *LibSBMLc::KineticLaw_createParameter; *createLocalParameter = *LibSBMLc::KineticLaw_createLocalParameter; sub getListOfParameters { my $lox = LibSBMLc::KineticLaw_getListOfParameters(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getListOfLocalParameters = *LibSBMLc::KineticLaw_getListOfLocalParameters; *getParameter = *LibSBMLc::KineticLaw_getParameter; *getLocalParameter = *LibSBMLc::KineticLaw_getLocalParameter; *getNumParameters = *LibSBMLc::KineticLaw_getNumParameters; *getNumLocalParameters = *LibSBMLc::KineticLaw_getNumLocalParameters; *getDerivedUnitDefinition = *LibSBMLc::KineticLaw_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::KineticLaw_containsUndeclaredUnits; *removeParameter = *LibSBMLc::KineticLaw_removeParameter; *removeLocalParameter = *LibSBMLc::KineticLaw_removeLocalParameter; *connectToChild = *LibSBMLc::KineticLaw_connectToChild; *enablePackageInternal = *LibSBMLc::KineticLaw_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::KineticLaw_updateSBMLNamespace; *getTypeCode = *LibSBMLc::KineticLaw_getTypeCode; *getElementName = *LibSBMLc::KineticLaw_getElementName; *hasRequiredAttributes = *LibSBMLc::KineticLaw_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::KineticLaw_hasRequiredElements; *removeFromParentAndDelete = *LibSBMLc::KineticLaw_removeFromParentAndDelete; *renameSIdRefs = *LibSBMLc::KineticLaw_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::KineticLaw_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::KineticLaw_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::KineticLaw_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::KineticLaw_multiplyAssignmentsToSIdByFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SimpleSpeciesReference ############## package LibSBML::SimpleSpeciesReference; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SimpleSpeciesReference($self); delete $OWNER{$self}; } } *getId = *LibSBMLc::SimpleSpeciesReference_getId; *getName = *LibSBMLc::SimpleSpeciesReference_getName; *getSpecies = *LibSBMLc::SimpleSpeciesReference_getSpecies; *isSetId = *LibSBMLc::SimpleSpeciesReference_isSetId; *isSetName = *LibSBMLc::SimpleSpeciesReference_isSetName; *isSetSpecies = *LibSBMLc::SimpleSpeciesReference_isSetSpecies; *setSpecies = *LibSBMLc::SimpleSpeciesReference_setSpecies; *setId = *LibSBMLc::SimpleSpeciesReference_setId; *setName = *LibSBMLc::SimpleSpeciesReference_setName; *unsetId = *LibSBMLc::SimpleSpeciesReference_unsetId; *unsetName = *LibSBMLc::SimpleSpeciesReference_unsetName; *unsetSpecies = *LibSBMLc::SimpleSpeciesReference_unsetSpecies; *isModifier = *LibSBMLc::SimpleSpeciesReference_isModifier; *renameSIdRefs = *LibSBMLc::SimpleSpeciesReference_renameSIdRefs; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SpeciesReference ############## package LibSBML::SpeciesReference; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SimpleSpeciesReference LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SpeciesReference($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_SpeciesReference(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SpeciesReference_clone; *initDefaults = *LibSBMLc::SpeciesReference_initDefaults; *getStoichiometry = *LibSBMLc::SpeciesReference_getStoichiometry; *getStoichiometryMath = *LibSBMLc::SpeciesReference_getStoichiometryMath; *getDenominator = *LibSBMLc::SpeciesReference_getDenominator; *getConstant = *LibSBMLc::SpeciesReference_getConstant; *isSetStoichiometryMath = *LibSBMLc::SpeciesReference_isSetStoichiometryMath; *isSetConstant = *LibSBMLc::SpeciesReference_isSetConstant; *isSetStoichiometry = *LibSBMLc::SpeciesReference_isSetStoichiometry; *setStoichiometry = *LibSBMLc::SpeciesReference_setStoichiometry; *setStoichiometryMath = *LibSBMLc::SpeciesReference_setStoichiometryMath; *setDenominator = *LibSBMLc::SpeciesReference_setDenominator; *setConstant = *LibSBMLc::SpeciesReference_setConstant; *unsetStoichiometryMath = *LibSBMLc::SpeciesReference_unsetStoichiometryMath; *unsetStoichiometry = *LibSBMLc::SpeciesReference_unsetStoichiometry; *unsetConstant = *LibSBMLc::SpeciesReference_unsetConstant; *createStoichiometryMath = *LibSBMLc::SpeciesReference_createStoichiometryMath; *setAnnotation = *LibSBMLc::SpeciesReference_setAnnotation; *appendAnnotation = *LibSBMLc::SpeciesReference_appendAnnotation; *getTypeCode = *LibSBMLc::SpeciesReference_getTypeCode; *getElementName = *LibSBMLc::SpeciesReference_getElementName; *hasRequiredAttributes = *LibSBMLc::SpeciesReference_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfSpeciesReferences ############## package LibSBML::ListOfSpeciesReferences; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfSpeciesReferences(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfSpeciesReferences_clone; *getItemTypeCode = *LibSBMLc::ListOfSpeciesReferences_getItemTypeCode; *getElementName = *LibSBMLc::ListOfSpeciesReferences_getElementName; *get = *LibSBMLc::ListOfSpeciesReferences_get; *remove = *LibSBMLc::ListOfSpeciesReferences_remove; *getType = *LibSBMLc::ListOfSpeciesReferences_getType; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfSpeciesReferences($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ModifierSpeciesReference ############## package LibSBML::ModifierSpeciesReference; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SimpleSpeciesReference LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ModifierSpeciesReference(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ModifierSpeciesReference($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::ModifierSpeciesReference_clone; *getTypeCode = *LibSBMLc::ModifierSpeciesReference_getTypeCode; *getElementName = *LibSBMLc::ModifierSpeciesReference_getElementName; *hasRequiredAttributes = *LibSBMLc::ModifierSpeciesReference_hasRequiredAttributes; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Event ############## package LibSBML::Event; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Event($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Event(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Event_clone; *initDefaults = *LibSBMLc::Event_initDefaults; *getElementBySId = *LibSBMLc::Event_getElementBySId; *getElementByMetaId = *LibSBMLc::Event_getElementByMetaId; *getId = *LibSBMLc::Event_getId; *getName = *LibSBMLc::Event_getName; *getTrigger = *LibSBMLc::Event_getTrigger; *getDelay = *LibSBMLc::Event_getDelay; *getPriority = *LibSBMLc::Event_getPriority; *getTimeUnits = *LibSBMLc::Event_getTimeUnits; *getUseValuesFromTriggerTime = *LibSBMLc::Event_getUseValuesFromTriggerTime; *isSetId = *LibSBMLc::Event_isSetId; *isSetName = *LibSBMLc::Event_isSetName; *isSetTrigger = *LibSBMLc::Event_isSetTrigger; *isSetDelay = *LibSBMLc::Event_isSetDelay; *isSetPriority = *LibSBMLc::Event_isSetPriority; *isSetTimeUnits = *LibSBMLc::Event_isSetTimeUnits; *isSetUseValuesFromTriggerTime = *LibSBMLc::Event_isSetUseValuesFromTriggerTime; *setId = *LibSBMLc::Event_setId; *setName = *LibSBMLc::Event_setName; *setTrigger = *LibSBMLc::Event_setTrigger; *setDelay = *LibSBMLc::Event_setDelay; *setPriority = *LibSBMLc::Event_setPriority; *setTimeUnits = *LibSBMLc::Event_setTimeUnits; *setUseValuesFromTriggerTime = *LibSBMLc::Event_setUseValuesFromTriggerTime; *unsetId = *LibSBMLc::Event_unsetId; *unsetName = *LibSBMLc::Event_unsetName; *unsetUseValuesFromTriggerTime = *LibSBMLc::Event_unsetUseValuesFromTriggerTime; *unsetDelay = *LibSBMLc::Event_unsetDelay; *unsetPriority = *LibSBMLc::Event_unsetPriority; *unsetTrigger = *LibSBMLc::Event_unsetTrigger; *unsetTimeUnits = *LibSBMLc::Event_unsetTimeUnits; *addEventAssignment = *LibSBMLc::Event_addEventAssignment; *createEventAssignment = *LibSBMLc::Event_createEventAssignment; *createTrigger = *LibSBMLc::Event_createTrigger; *createDelay = *LibSBMLc::Event_createDelay; *createPriority = *LibSBMLc::Event_createPriority; sub getListOfEventAssignments { my $lox = LibSBMLc::Event_getListOfEventAssignments(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getEventAssignment = *LibSBMLc::Event_getEventAssignment; *getNumEventAssignments = *LibSBMLc::Event_getNumEventAssignments; *removeEventAssignment = *LibSBMLc::Event_removeEventAssignment; *connectToChild = *LibSBMLc::Event_connectToChild; *enablePackageInternal = *LibSBMLc::Event_enablePackageInternal; *updateSBMLNamespace = *LibSBMLc::Event_updateSBMLNamespace; *getTypeCode = *LibSBMLc::Event_getTypeCode; *getElementName = *LibSBMLc::Event_getElementName; *hasRequiredAttributes = *LibSBMLc::Event_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::Event_hasRequiredElements; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfEvents ############## package LibSBML::ListOfEvents; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfEvents(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfEvents_clone; *getItemTypeCode = *LibSBMLc::ListOfEvents_getItemTypeCode; *getElementName = *LibSBMLc::ListOfEvents_getElementName; *get = *LibSBMLc::ListOfEvents_get; *remove = *LibSBMLc::ListOfEvents_remove; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfEvents($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::EventAssignment ############## package LibSBML::EventAssignment; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_EventAssignment($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_EventAssignment(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::EventAssignment_clone; *getVariable = *LibSBMLc::EventAssignment_getVariable; *getMath = *LibSBMLc::EventAssignment_getMath; *isSetVariable = *LibSBMLc::EventAssignment_isSetVariable; *isSetMath = *LibSBMLc::EventAssignment_isSetMath; *setVariable = *LibSBMLc::EventAssignment_setVariable; *unsetVariable = *LibSBMLc::EventAssignment_unsetVariable; *setMath = *LibSBMLc::EventAssignment_setMath; *getDerivedUnitDefinition = *LibSBMLc::EventAssignment_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::EventAssignment_containsUndeclaredUnits; *getTypeCode = *LibSBMLc::EventAssignment_getTypeCode; *getElementName = *LibSBMLc::EventAssignment_getElementName; *hasRequiredAttributes = *LibSBMLc::EventAssignment_hasRequiredAttributes; *hasRequiredElements = *LibSBMLc::EventAssignment_hasRequiredElements; *getId = *LibSBMLc::EventAssignment_getId; *renameSIdRefs = *LibSBMLc::EventAssignment_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::EventAssignment_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::EventAssignment_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::EventAssignment_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::EventAssignment_multiplyAssignmentsToSIdByFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ListOfEventAssignments ############## package LibSBML::ListOfEventAssignments; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ListOf LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ListOfEventAssignments(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ListOfEventAssignments_clone; *getItemTypeCode = *LibSBMLc::ListOfEventAssignments_getItemTypeCode; *getElementName = *LibSBMLc::ListOfEventAssignments_getElementName; *get = *LibSBMLc::ListOfEventAssignments_get; *remove = *LibSBMLc::ListOfEventAssignments_remove; *getElementBySId = *LibSBMLc::ListOfEventAssignments_getElementBySId; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ListOfEventAssignments($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Trigger ############## package LibSBML::Trigger; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Trigger($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Trigger(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Trigger_clone; *getMath = *LibSBMLc::Trigger_getMath; *getInitialValue = *LibSBMLc::Trigger_getInitialValue; *getPersistent = *LibSBMLc::Trigger_getPersistent; *isSetMath = *LibSBMLc::Trigger_isSetMath; *isSetInitialValue = *LibSBMLc::Trigger_isSetInitialValue; *isSetPersistent = *LibSBMLc::Trigger_isSetPersistent; *setMath = *LibSBMLc::Trigger_setMath; *setInitialValue = *LibSBMLc::Trigger_setInitialValue; *setPersistent = *LibSBMLc::Trigger_setPersistent; *unsetInitialValue = *LibSBMLc::Trigger_unsetInitialValue; *unsetPersistent = *LibSBMLc::Trigger_unsetPersistent; *getTypeCode = *LibSBMLc::Trigger_getTypeCode; *getElementName = *LibSBMLc::Trigger_getElementName; *renameSIdRefs = *LibSBMLc::Trigger_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Trigger_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::Trigger_replaceSIDWithFunction; *hasRequiredElements = *LibSBMLc::Trigger_hasRequiredElements; *hasRequiredAttributes = *LibSBMLc::Trigger_hasRequiredAttributes; *removeFromParentAndDelete = *LibSBMLc::Trigger_removeFromParentAndDelete; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Delay ############## package LibSBML::Delay; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Delay($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Delay(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Delay_clone; *getMath = *LibSBMLc::Delay_getMath; *isSetMath = *LibSBMLc::Delay_isSetMath; *setMath = *LibSBMLc::Delay_setMath; *getDerivedUnitDefinition = *LibSBMLc::Delay_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::Delay_containsUndeclaredUnits; *getTypeCode = *LibSBMLc::Delay_getTypeCode; *getElementName = *LibSBMLc::Delay_getElementName; *hasRequiredElements = *LibSBMLc::Delay_hasRequiredElements; *removeFromParentAndDelete = *LibSBMLc::Delay_removeFromParentAndDelete; *renameSIdRefs = *LibSBMLc::Delay_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Delay_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::Delay_replaceSIDWithFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Priority ############## package LibSBML::Priority; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Priority($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Priority(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Priority_clone; *getMath = *LibSBMLc::Priority_getMath; *isSetMath = *LibSBMLc::Priority_isSetMath; *setMath = *LibSBMLc::Priority_setMath; *getTypeCode = *LibSBMLc::Priority_getTypeCode; *getElementName = *LibSBMLc::Priority_getElementName; *hasRequiredElements = *LibSBMLc::Priority_hasRequiredElements; *removeFromParentAndDelete = *LibSBMLc::Priority_removeFromParentAndDelete; *renameSIdRefs = *LibSBMLc::Priority_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::Priority_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::Priority_replaceSIDWithFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBO ############## package LibSBML::SBO; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *isQuantitativeParameter = *LibSBMLc::SBO_isQuantitativeParameter; *isParticipantRole = *LibSBMLc::SBO_isParticipantRole; *isModellingFramework = *LibSBMLc::SBO_isModellingFramework; *isMathematicalExpression = *LibSBMLc::SBO_isMathematicalExpression; *isKineticConstant = *LibSBMLc::SBO_isKineticConstant; *isReactant = *LibSBMLc::SBO_isReactant; *isProduct = *LibSBMLc::SBO_isProduct; *isModifier = *LibSBMLc::SBO_isModifier; *isRateLaw = *LibSBMLc::SBO_isRateLaw; *isEvent = *LibSBMLc::SBO_isEvent; *isPhysicalParticipant = *LibSBMLc::SBO_isPhysicalParticipant; *isParticipant = *LibSBMLc::SBO_isParticipant; *isInteraction = *LibSBMLc::SBO_isInteraction; *isEntity = *LibSBMLc::SBO_isEntity; *isFunctionalEntity = *LibSBMLc::SBO_isFunctionalEntity; *isMaterialEntity = *LibSBMLc::SBO_isMaterialEntity; *isConservationLaw = *LibSBMLc::SBO_isConservationLaw; *isSteadyStateExpression = *LibSBMLc::SBO_isSteadyStateExpression; *isFunctionalCompartment = *LibSBMLc::SBO_isFunctionalCompartment; *isContinuousFramework = *LibSBMLc::SBO_isContinuousFramework; *isDiscreteFramework = *LibSBMLc::SBO_isDiscreteFramework; *isLogicalFramework = *LibSBMLc::SBO_isLogicalFramework; *isMetadataRepresentation = *LibSBMLc::SBO_isMetadataRepresentation; *isOccurringEntityRepresentation = *LibSBMLc::SBO_isOccurringEntityRepresentation; *isPhysicalEntityRepresentation = *LibSBMLc::SBO_isPhysicalEntityRepresentation; *isSystemsDescriptionParameter = *LibSBMLc::SBO_isSystemsDescriptionParameter; *isQuantitativeSystemsDescriptionParameter = *LibSBMLc::SBO_isQuantitativeSystemsDescriptionParameter; *isObselete = *LibSBMLc::SBO_isObselete; *intToString = *LibSBMLc::SBO_intToString; *stringToInt = *LibSBMLc::SBO_stringToInt; *checkTerm = *LibSBMLc::SBO_checkTerm; *getParentBranch = *LibSBMLc::SBO_getParentBranch; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBO(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBO($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SyntaxChecker ############## package LibSBML::SyntaxChecker; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *isValidSBMLSId = *LibSBMLc::SyntaxChecker_isValidSBMLSId; *isValidXMLID = *LibSBMLc::SyntaxChecker_isValidXMLID; *isValidXMLanyURI = *LibSBMLc::SyntaxChecker_isValidXMLanyURI; *isValidUnitSId = *LibSBMLc::SyntaxChecker_isValidUnitSId; *hasExpectedXHTMLSyntax = *LibSBMLc::SyntaxChecker_hasExpectedXHTMLSyntax; *isValidInternalSId = *LibSBMLc::SyntaxChecker_isValidInternalSId; *isValidInternalUnitSId = *LibSBMLc::SyntaxChecker_isValidInternalUnitSId; sub new { my $pkg = shift; my $self = LibSBMLc::new_SyntaxChecker(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SyntaxChecker($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::StoichiometryMath ############## package LibSBML::StoichiometryMath; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBase LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_StoichiometryMath($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_StoichiometryMath(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::StoichiometryMath_clone; *getMath = *LibSBMLc::StoichiometryMath_getMath; *isSetMath = *LibSBMLc::StoichiometryMath_isSetMath; *setMath = *LibSBMLc::StoichiometryMath_setMath; *getDerivedUnitDefinition = *LibSBMLc::StoichiometryMath_getDerivedUnitDefinition; *containsUndeclaredUnits = *LibSBMLc::StoichiometryMath_containsUndeclaredUnits; *getTypeCode = *LibSBMLc::StoichiometryMath_getTypeCode; *getElementName = *LibSBMLc::StoichiometryMath_getElementName; *hasRequiredElements = *LibSBMLc::StoichiometryMath_hasRequiredElements; *removeFromParentAndDelete = *LibSBMLc::StoichiometryMath_removeFromParentAndDelete; *renameSIdRefs = *LibSBMLc::StoichiometryMath_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::StoichiometryMath_renameUnitSIdRefs; *replaceSIDWithFunction = *LibSBMLc::StoichiometryMath_replaceSIDWithFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLNamespaces ############## package LibSBML::SBMLNamespaces; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLNamespaces($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLNamespaces(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLNamespaces_clone; *getSBMLNamespaceURI = *LibSBMLc::SBMLNamespaces_getSBMLNamespaceURI; *getSupportedNamespaces = *LibSBMLc::SBMLNamespaces_getSupportedNamespaces; *freeSBMLNamespaces = *LibSBMLc::SBMLNamespaces_freeSBMLNamespaces; *getURI = *LibSBMLc::SBMLNamespaces_getURI; *getLevel = *LibSBMLc::SBMLNamespaces_getLevel; *getVersion = *LibSBMLc::SBMLNamespaces_getVersion; *getNamespaces = *LibSBMLc::SBMLNamespaces_getNamespaces; *addNamespaces = *LibSBMLc::SBMLNamespaces_addNamespaces; *addNamespace = *LibSBMLc::SBMLNamespaces_addNamespace; *removeNamespace = *LibSBMLc::SBMLNamespaces_removeNamespace; *addPackageNamespace = *LibSBMLc::SBMLNamespaces_addPackageNamespace; *addPackageNamespaces = *LibSBMLc::SBMLNamespaces_addPackageNamespaces; *removePackageNamespace = *LibSBMLc::SBMLNamespaces_removePackageNamespace; *addPkgNamespace = *LibSBMLc::SBMLNamespaces_addPkgNamespace; *addPkgNamespaces = *LibSBMLc::SBMLNamespaces_addPkgNamespaces; *removePkgNamespace = *LibSBMLc::SBMLNamespaces_removePkgNamespace; *isSBMLNamespace = *LibSBMLc::SBMLNamespaces_isSBMLNamespace; *isValidCombination = *LibSBMLc::SBMLNamespaces_isValidCombination; *setLevel = *LibSBMLc::SBMLNamespaces_setLevel; *setVersion = *LibSBMLc::SBMLNamespaces_setVersion; *setNamespaces = *LibSBMLc::SBMLNamespaces_setNamespaces; *getPackageName = *LibSBMLc::SBMLNamespaces_getPackageName; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLTransforms ############## package LibSBML::SBMLTransforms; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *replaceFD = *LibSBMLc::SBMLTransforms_replaceFD; *expandInitialAssignments = *LibSBMLc::SBMLTransforms_expandInitialAssignments; *evaluateASTNode = *LibSBMLc::SBMLTransforms_evaluateASTNode; *expandL3V2InitialAssignments = *LibSBMLc::SBMLTransforms_expandL3V2InitialAssignments; *mapComponentValues = *LibSBMLc::SBMLTransforms_mapComponentValues; *clearComponentValues = *LibSBMLc::SBMLTransforms_clearComponentValues; *nodeContainsId = *LibSBMLc::SBMLTransforms_nodeContainsId; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLTransforms(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLTransforms($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLConstructorException ############## package LibSBML::SBMLConstructorException; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLConstructorException(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLConstructorException($self); delete $OWNER{$self}; } } *getSBMLErrMsg = *LibSBMLc::SBMLConstructorException_getSBMLErrMsg; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ConversionOption ############## package LibSBML::ConversionOption; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ConversionOption(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ConversionOption($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::ConversionOption_clone; *getKey = *LibSBMLc::ConversionOption_getKey; *setKey = *LibSBMLc::ConversionOption_setKey; *getValue = *LibSBMLc::ConversionOption_getValue; *setValue = *LibSBMLc::ConversionOption_setValue; *getDescription = *LibSBMLc::ConversionOption_getDescription; *setDescription = *LibSBMLc::ConversionOption_setDescription; *getType = *LibSBMLc::ConversionOption_getType; *setType = *LibSBMLc::ConversionOption_setType; *getBoolValue = *LibSBMLc::ConversionOption_getBoolValue; *setBoolValue = *LibSBMLc::ConversionOption_setBoolValue; *getDoubleValue = *LibSBMLc::ConversionOption_getDoubleValue; *setDoubleValue = *LibSBMLc::ConversionOption_setDoubleValue; *getFloatValue = *LibSBMLc::ConversionOption_getFloatValue; *setFloatValue = *LibSBMLc::ConversionOption_setFloatValue; *getIntValue = *LibSBMLc::ConversionOption_getIntValue; *setIntValue = *LibSBMLc::ConversionOption_setIntValue; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ConversionProperties ############## package LibSBML::ConversionProperties; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ConversionProperties(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ConversionProperties_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ConversionProperties($self); delete $OWNER{$self}; } } *getTargetNamespaces = *LibSBMLc::ConversionProperties_getTargetNamespaces; *hasTargetNamespaces = *LibSBMLc::ConversionProperties_hasTargetNamespaces; *setTargetNamespaces = *LibSBMLc::ConversionProperties_setTargetNamespaces; *getDescription = *LibSBMLc::ConversionProperties_getDescription; *getType = *LibSBMLc::ConversionProperties_getType; *getOption = *LibSBMLc::ConversionProperties_getOption; *addOption = *LibSBMLc::ConversionProperties_addOption; *removeOption = *LibSBMLc::ConversionProperties_removeOption; *hasOption = *LibSBMLc::ConversionProperties_hasOption; *getValue = *LibSBMLc::ConversionProperties_getValue; *setValue = *LibSBMLc::ConversionProperties_setValue; *getBoolValue = *LibSBMLc::ConversionProperties_getBoolValue; *setBoolValue = *LibSBMLc::ConversionProperties_setBoolValue; *getDoubleValue = *LibSBMLc::ConversionProperties_getDoubleValue; *setDoubleValue = *LibSBMLc::ConversionProperties_setDoubleValue; *getFloatValue = *LibSBMLc::ConversionProperties_getFloatValue; *setFloatValue = *LibSBMLc::ConversionProperties_setFloatValue; *getIntValue = *LibSBMLc::ConversionProperties_getIntValue; *setIntValue = *LibSBMLc::ConversionProperties_setIntValue; *getNumOptions = *LibSBMLc::ConversionProperties_getNumOptions; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLConverter ############## package LibSBML::SBMLConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_SBMLConverter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLConverter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLConverter_clone; *getDocument = *LibSBMLc::SBMLConverter_getDocument; *getDefaultProperties = *LibSBMLc::SBMLConverter_getDefaultProperties; *getTargetNamespaces = *LibSBMLc::SBMLConverter_getTargetNamespaces; *matchesProperties = *LibSBMLc::SBMLConverter_matchesProperties; *setDocument = *LibSBMLc::SBMLConverter_setDocument; *setProperties = *LibSBMLc::SBMLConverter_setProperties; *getProperties = *LibSBMLc::SBMLConverter_getProperties; *convert = *LibSBMLc::SBMLConverter_convert; *getName = *LibSBMLc::SBMLConverter_getName; sub DISOWN { my $self = shift; LibSBMLc::disown_SBMLConverter($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_SBMLConverter($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_SBMLConverter($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::SBMLConverterRegistry ############## package LibSBML::SBMLConverterRegistry; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *getInstance = *LibSBMLc::SBMLConverterRegistry_getInstance; *addConverter = *LibSBMLc::SBMLConverterRegistry_addConverter; *getConverterByIndex = *LibSBMLc::SBMLConverterRegistry_getConverterByIndex; *getConverterFor = *LibSBMLc::SBMLConverterRegistry_getConverterFor; *getNumConverters = *LibSBMLc::SBMLConverterRegistry_getNumConverters; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLConverterRegistry($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLFunctionDefinitionConverter ############## package LibSBML::SBMLFunctionDefinitionConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLFunctionDefinitionConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLFunctionDefinitionConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLFunctionDefinitionConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLFunctionDefinitionConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLFunctionDefinitionConverter_matchesProperties; *convert = *LibSBMLc::SBMLFunctionDefinitionConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLFunctionDefinitionConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLIdConverter ############## package LibSBML::SBMLIdConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLIdConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLIdConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLIdConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLIdConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLIdConverter_matchesProperties; *convert = *LibSBMLc::SBMLIdConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLIdConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLInferUnitsConverter ############## package LibSBML::SBMLInferUnitsConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLInferUnitsConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLInferUnitsConverter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLInferUnitsConverter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLInferUnitsConverter_clone; *matchesProperties = *LibSBMLc::SBMLInferUnitsConverter_matchesProperties; *convert = *LibSBMLc::SBMLInferUnitsConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLInferUnitsConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLInitialAssignmentConverter ############## package LibSBML::SBMLInitialAssignmentConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLInitialAssignmentConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLInitialAssignmentConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLInitialAssignmentConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLInitialAssignmentConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLInitialAssignmentConverter_matchesProperties; *convert = *LibSBMLc::SBMLInitialAssignmentConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLInitialAssignmentConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLLevelVersionConverter ############## package LibSBML::SBMLLevelVersionConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLLevelVersionConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLLevelVersionConverter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLLevelVersionConverter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLLevelVersionConverter_clone; *matchesProperties = *LibSBMLc::SBMLLevelVersionConverter_matchesProperties; *convert = *LibSBMLc::SBMLLevelVersionConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLLevelVersionConverter_getDefaultProperties; *getTargetLevel = *LibSBMLc::SBMLLevelVersionConverter_getTargetLevel; *getTargetVersion = *LibSBMLc::SBMLLevelVersionConverter_getTargetVersion; *getValidityFlag = *LibSBMLc::SBMLLevelVersionConverter_getValidityFlag; *getAddDefaultUnits = *LibSBMLc::SBMLLevelVersionConverter_getAddDefaultUnits; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLLevel1Version1Converter ############## package LibSBML::SBMLLevel1Version1Converter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLLevel1Version1Converter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLLevel1Version1Converter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLLevel1Version1Converter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLLevel1Version1Converter_clone; *matchesProperties = *LibSBMLc::SBMLLevel1Version1Converter_matchesProperties; *convert = *LibSBMLc::SBMLLevel1Version1Converter_convert; *getDefaultProperties = *LibSBMLc::SBMLLevel1Version1Converter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLLocalParameterConverter ############## package LibSBML::SBMLLocalParameterConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLLocalParameterConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLLocalParameterConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLLocalParameterConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLLocalParameterConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLLocalParameterConverter_matchesProperties; *convert = *LibSBMLc::SBMLLocalParameterConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLLocalParameterConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLReactionConverter ############## package LibSBML::SBMLReactionConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLReactionConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLReactionConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLReactionConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLReactionConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLReactionConverter_matchesProperties; *convert = *LibSBMLc::SBMLReactionConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLReactionConverter_getDefaultProperties; *setDocument = *LibSBMLc::SBMLReactionConverter_setDocument; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLRuleConverter ############## package LibSBML::SBMLRuleConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLRuleConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLRuleConverter(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLRuleConverter_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLRuleConverter($self); delete $OWNER{$self}; } } *matchesProperties = *LibSBMLc::SBMLRuleConverter_matchesProperties; *convert = *LibSBMLc::SBMLRuleConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLRuleConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLStripPackageConverter ############## package LibSBML::SBMLStripPackageConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLStripPackageConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLStripPackageConverter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLStripPackageConverter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLStripPackageConverter_clone; *matchesProperties = *LibSBMLc::SBMLStripPackageConverter_matchesProperties; *convert = *LibSBMLc::SBMLStripPackageConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLStripPackageConverter_getDefaultProperties; *getPackageToStrip = *LibSBMLc::SBMLStripPackageConverter_getPackageToStrip; *isStripAllUnrecognizedPackages = *LibSBMLc::SBMLStripPackageConverter_isStripAllUnrecognizedPackages; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLUnitsConverter ############## package LibSBML::SBMLUnitsConverter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLConverter LibSBML ); %OWNER = (); %ITERATORS = (); *init = *LibSBMLc::SBMLUnitsConverter_init; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLUnitsConverter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLUnitsConverter($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLUnitsConverter_clone; *matchesProperties = *LibSBMLc::SBMLUnitsConverter_matchesProperties; *convert = *LibSBMLc::SBMLUnitsConverter_convert; *getDefaultProperties = *LibSBMLc::SBMLUnitsConverter_getDefaultProperties; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLValidator ############## package LibSBML::SBMLValidator; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_SBMLValidator(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLValidator($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLValidator_clone; *getDocument = *LibSBMLc::SBMLValidator_getDocument; *setDocument = *LibSBMLc::SBMLValidator_setDocument; *clearFailures = *LibSBMLc::SBMLValidator_clearFailures; *logFailure = *LibSBMLc::SBMLValidator_logFailure; *validate = *LibSBMLc::SBMLValidator_validate; *getErrorLog = *LibSBMLc::SBMLValidator_getErrorLog; *getModel = *LibSBMLc::SBMLValidator_getModel; *getNumFailures = *LibSBMLc::SBMLValidator_getNumFailures; *getFailure = *LibSBMLc::SBMLValidator_getFailure; sub DISOWN { my $self = shift; LibSBMLc::disown_SBMLValidator($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_SBMLValidator($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_SBMLValidator($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::SBMLExternalValidator ############## package LibSBML::SBMLExternalValidator; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLValidator LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLExternalValidator(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBMLExternalValidator_clone; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLExternalValidator($self); delete $OWNER{$self}; } } *validate = *LibSBMLc::SBMLExternalValidator_validate; *getProgram = *LibSBMLc::SBMLExternalValidator_getProgram; *setProgram = *LibSBMLc::SBMLExternalValidator_setProgram; *getOutputFileName = *LibSBMLc::SBMLExternalValidator_getOutputFileName; *setOutputFileName = *LibSBMLc::SBMLExternalValidator_setOutputFileName; *getSBMLFileName = *LibSBMLc::SBMLExternalValidator_getSBMLFileName; *setSBMLFileName = *LibSBMLc::SBMLExternalValidator_setSBMLFileName; *clearArguments = *LibSBMLc::SBMLExternalValidator_clearArguments; *addArgument = *LibSBMLc::SBMLExternalValidator_addArgument; *getNumArguments = *LibSBMLc::SBMLExternalValidator_getNumArguments; *getArgument = *LibSBMLc::SBMLExternalValidator_getArgument; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLAttributes ############## package LibSBML::XMLAttributes; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLAttributes($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLAttributes(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::XMLAttributes_clone; *add = *LibSBMLc::XMLAttributes_add; *removeResource = *LibSBMLc::XMLAttributes_removeResource; *remove = *LibSBMLc::XMLAttributes_remove; *clear = *LibSBMLc::XMLAttributes_clear; *getIndex = *LibSBMLc::XMLAttributes_getIndex; *getLength = *LibSBMLc::XMLAttributes_getLength; *getNumAttributes = *LibSBMLc::XMLAttributes_getNumAttributes; *getName = *LibSBMLc::XMLAttributes_getName; *getPrefix = *LibSBMLc::XMLAttributes_getPrefix; *getPrefixedName = *LibSBMLc::XMLAttributes_getPrefixedName; *getURI = *LibSBMLc::XMLAttributes_getURI; *getValue = *LibSBMLc::XMLAttributes_getValue; *hasAttribute = *LibSBMLc::XMLAttributes_hasAttribute; *isEmpty = *LibSBMLc::XMLAttributes_isEmpty; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLConstructorException ############## package LibSBML::XMLConstructorException; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLConstructorException(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLConstructorException($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLNamespaces ############## package LibSBML::XMLNamespaces; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLNamespaces($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLNamespaces(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::XMLNamespaces_clone; *add = *LibSBMLc::XMLNamespaces_add; *remove = *LibSBMLc::XMLNamespaces_remove; *clear = *LibSBMLc::XMLNamespaces_clear; *getIndex = *LibSBMLc::XMLNamespaces_getIndex; *containsUri = *LibSBMLc::XMLNamespaces_containsUri; *getIndexByPrefix = *LibSBMLc::XMLNamespaces_getIndexByPrefix; *getLength = *LibSBMLc::XMLNamespaces_getLength; *getNumNamespaces = *LibSBMLc::XMLNamespaces_getNumNamespaces; *getPrefix = *LibSBMLc::XMLNamespaces_getPrefix; *getURI = *LibSBMLc::XMLNamespaces_getURI; *isEmpty = *LibSBMLc::XMLNamespaces_isEmpty; *hasURI = *LibSBMLc::XMLNamespaces_hasURI; *hasPrefix = *LibSBMLc::XMLNamespaces_hasPrefix; *hasNS = *LibSBMLc::XMLNamespaces_hasNS; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLToken ############## package LibSBML::XMLToken; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLToken($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLToken(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::XMLToken_clone; *getAttributes = *LibSBMLc::XMLToken_getAttributes; *setAttributes = *LibSBMLc::XMLToken_setAttributes; *addAttr = *LibSBMLc::XMLToken_addAttr; *removeAttr = *LibSBMLc::XMLToken_removeAttr; *clearAttributes = *LibSBMLc::XMLToken_clearAttributes; *getAttrIndex = *LibSBMLc::XMLToken_getAttrIndex; *getAttributesLength = *LibSBMLc::XMLToken_getAttributesLength; *getAttrName = *LibSBMLc::XMLToken_getAttrName; *getAttrPrefix = *LibSBMLc::XMLToken_getAttrPrefix; *getAttrPrefixedName = *LibSBMLc::XMLToken_getAttrPrefixedName; *getAttrURI = *LibSBMLc::XMLToken_getAttrURI; *getAttrValue = *LibSBMLc::XMLToken_getAttrValue; *hasAttr = *LibSBMLc::XMLToken_hasAttr; *isAttributesEmpty = *LibSBMLc::XMLToken_isAttributesEmpty; *getNamespaces = *LibSBMLc::XMLToken_getNamespaces; *setNamespaces = *LibSBMLc::XMLToken_setNamespaces; *addNamespace = *LibSBMLc::XMLToken_addNamespace; *removeNamespace = *LibSBMLc::XMLToken_removeNamespace; *clearNamespaces = *LibSBMLc::XMLToken_clearNamespaces; *getNamespaceIndex = *LibSBMLc::XMLToken_getNamespaceIndex; *getNamespaceIndexByPrefix = *LibSBMLc::XMLToken_getNamespaceIndexByPrefix; *getNamespacesLength = *LibSBMLc::XMLToken_getNamespacesLength; *getNamespacePrefix = *LibSBMLc::XMLToken_getNamespacePrefix; *getNamespaceURI = *LibSBMLc::XMLToken_getNamespaceURI; *isNamespacesEmpty = *LibSBMLc::XMLToken_isNamespacesEmpty; *hasNamespaceURI = *LibSBMLc::XMLToken_hasNamespaceURI; *hasNamespacePrefix = *LibSBMLc::XMLToken_hasNamespacePrefix; *hasNamespaceNS = *LibSBMLc::XMLToken_hasNamespaceNS; *setTriple = *LibSBMLc::XMLToken_setTriple; *getName = *LibSBMLc::XMLToken_getName; *getPrefix = *LibSBMLc::XMLToken_getPrefix; *getURI = *LibSBMLc::XMLToken_getURI; *getCharacters = *LibSBMLc::XMLToken_getCharacters; *setCharacters = *LibSBMLc::XMLToken_setCharacters; *append = *LibSBMLc::XMLToken_append; *getColumn = *LibSBMLc::XMLToken_getColumn; *getLine = *LibSBMLc::XMLToken_getLine; *isElement = *LibSBMLc::XMLToken_isElement; *isEnd = *LibSBMLc::XMLToken_isEnd; *isEndFor = *LibSBMLc::XMLToken_isEndFor; *isEOF = *LibSBMLc::XMLToken_isEOF; *isStart = *LibSBMLc::XMLToken_isStart; *isText = *LibSBMLc::XMLToken_isText; *setEnd = *LibSBMLc::XMLToken_setEnd; *setEOF = *LibSBMLc::XMLToken_setEOF; *unsetEnd = *LibSBMLc::XMLToken_unsetEnd; *toString = *LibSBMLc::XMLToken_toString; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLNode ############## package LibSBML::XMLNode; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::XMLToken LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLNode($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLNode(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::XMLNode_clone; *addChild = *LibSBMLc::XMLNode_addChild; *insertChild = *LibSBMLc::XMLNode_insertChild; *removeChild = *LibSBMLc::XMLNode_removeChild; *removeChildren = *LibSBMLc::XMLNode_removeChildren; *getChild = *LibSBMLc::XMLNode_getChild; *getIndex = *LibSBMLc::XMLNode_getIndex; *hasChild = *LibSBMLc::XMLNode_hasChild; *equals = *LibSBMLc::XMLNode_equals; *getNumChildren = *LibSBMLc::XMLNode_getNumChildren; *writeToStream = *LibSBMLc::XMLNode_writeToStream; *toXMLString = *LibSBMLc::XMLNode_toXMLString; *convertXMLNodeToString = *LibSBMLc::XMLNode_convertXMLNodeToString; *convertStringToXMLNode = *LibSBMLc::XMLNode_convertStringToXMLNode; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLTriple ############## package LibSBML::XMLTriple; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLTriple(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLTriple($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::XMLTriple_clone; *getName = *LibSBMLc::XMLTriple_getName; *getPrefix = *LibSBMLc::XMLTriple_getPrefix; *getURI = *LibSBMLc::XMLTriple_getURI; *getPrefixedName = *LibSBMLc::XMLTriple_getPrefixedName; *isEmpty = *LibSBMLc::XMLTriple_isEmpty; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLOutputStream ############## package LibSBML::XMLOutputStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLOutputStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLOutputStream($self); delete $OWNER{$self}; } } *endElement = *LibSBMLc::XMLOutputStream_endElement; *setAutoIndent = *LibSBMLc::XMLOutputStream_setAutoIndent; *startElement = *LibSBMLc::XMLOutputStream_startElement; *startEndElement = *LibSBMLc::XMLOutputStream_startEndElement; *writeAttribute = *LibSBMLc::XMLOutputStream_writeAttribute; *writeXMLDecl = *LibSBMLc::XMLOutputStream_writeXMLDecl; *writeComment = *LibSBMLc::XMLOutputStream_writeComment; *downIndent = *LibSBMLc::XMLOutputStream_downIndent; *upIndent = *LibSBMLc::XMLOutputStream_upIndent; *getSBMLNamespaces = *LibSBMLc::XMLOutputStream_getSBMLNamespaces; *setSBMLNamespaces = *LibSBMLc::XMLOutputStream_setSBMLNamespaces; *getWriteComment = *LibSBMLc::XMLOutputStream_getWriteComment; *setWriteComment = *LibSBMLc::XMLOutputStream_setWriteComment; *getWriteTimestamp = *LibSBMLc::XMLOutputStream_getWriteTimestamp; *setWriteTimestamp = *LibSBMLc::XMLOutputStream_setWriteTimestamp; *getLibraryName = *LibSBMLc::XMLOutputStream_getLibraryName; *setLibraryName = *LibSBMLc::XMLOutputStream_setLibraryName; *getLibraryVersion = *LibSBMLc::XMLOutputStream_getLibraryVersion; *setLibraryVersion = *LibSBMLc::XMLOutputStream_setLibraryVersion; *getIndent = *LibSBMLc::XMLOutputStream_getIndent; *setIndent = *LibSBMLc::XMLOutputStream_setIndent; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLOwningOutputStringStream ############## package LibSBML::XMLOwningOutputStringStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLOwningOutputStringStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLOwningOutputStringStream($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLOwningOutputFileStream ############## package LibSBML::XMLOwningOutputFileStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLOwningOutputFileStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLOwningOutputFileStream($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLInputStream ############## package LibSBML::XMLInputStream; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLInputStream(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLInputStream($self); delete $OWNER{$self}; } } *getEncoding = *LibSBMLc::XMLInputStream_getEncoding; *getVersion = *LibSBMLc::XMLInputStream_getVersion; *getErrorLog = *LibSBMLc::XMLInputStream_getErrorLog; *isEOF = *LibSBMLc::XMLInputStream_isEOF; *isError = *LibSBMLc::XMLInputStream_isError; *isGood = *LibSBMLc::XMLInputStream_isGood; *next = *LibSBMLc::XMLInputStream_next; *peek = *LibSBMLc::XMLInputStream_peek; *skipPastEnd = *LibSBMLc::XMLInputStream_skipPastEnd; *skipText = *LibSBMLc::XMLInputStream_skipText; *setErrorLog = *LibSBMLc::XMLInputStream_setErrorLog; *toString = *LibSBMLc::XMLInputStream_toString; *getSBMLNamespaces = *LibSBMLc::XMLInputStream_getSBMLNamespaces; *setSBMLNamespaces = *LibSBMLc::XMLInputStream_setSBMLNamespaces; *determineNumberChildren = *LibSBMLc::XMLInputStream_determineNumberChildren; *determineNumSpecificChildren = *LibSBMLc::XMLInputStream_determineNumSpecificChildren; *containsChild = *LibSBMLc::XMLInputStream_containsChild; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLError ############## package LibSBML::XMLError; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLError(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLError($self); delete $OWNER{$self}; } } *getErrorId = *LibSBMLc::XMLError_getErrorId; *getMessage = *LibSBMLc::XMLError_getMessage; *getShortMessage = *LibSBMLc::XMLError_getShortMessage; *getLine = *LibSBMLc::XMLError_getLine; *getColumn = *LibSBMLc::XMLError_getColumn; *getSeverity = *LibSBMLc::XMLError_getSeverity; *getSeverityAsString = *LibSBMLc::XMLError_getSeverityAsString; *getCategory = *LibSBMLc::XMLError_getCategory; *getCategoryAsString = *LibSBMLc::XMLError_getCategoryAsString; *isInfo = *LibSBMLc::XMLError_isInfo; *isWarning = *LibSBMLc::XMLError_isWarning; *isError = *LibSBMLc::XMLError_isError; *isFatal = *LibSBMLc::XMLError_isFatal; *isInternal = *LibSBMLc::XMLError_isInternal; *isSystem = *LibSBMLc::XMLError_isSystem; *isXML = *LibSBMLc::XMLError_isXML; *isValid = *LibSBMLc::XMLError_isValid; *setLine = *LibSBMLc::XMLError_setLine; *setColumn = *LibSBMLc::XMLError_setColumn; *getStandardMessage = *LibSBMLc::XMLError_getStandardMessage; *getPackage = *LibSBMLc::XMLError_getPackage; *getErrorIdOffset = *LibSBMLc::XMLError_getErrorIdOffset; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::XMLErrorLog ############## package LibSBML::XMLErrorLog; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *getNumErrors = *LibSBMLc::XMLErrorLog_getNumErrors; *getError = *LibSBMLc::XMLErrorLog_getError; *clearLog = *LibSBMLc::XMLErrorLog_clearLog; sub new { my $pkg = shift; my $self = LibSBMLc::new_XMLErrorLog(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_XMLErrorLog($self); delete $OWNER{$self}; } } *add = *LibSBMLc::XMLErrorLog_add; *toString = *LibSBMLc::XMLErrorLog_toString; *printErrors = *LibSBMLc::XMLErrorLog_printErrors; *isSeverityOverridden = *LibSBMLc::XMLErrorLog_isSeverityOverridden; *unsetSeverityOverride = *LibSBMLc::XMLErrorLog_unsetSeverityOverride; *getSeverityOverride = *LibSBMLc::XMLErrorLog_getSeverityOverride; *setSeverityOverride = *LibSBMLc::XMLErrorLog_setSeverityOverride; *changeErrorSeverity = *LibSBMLc::XMLErrorLog_changeErrorSeverity; *contains = *LibSBMLc::XMLErrorLog_contains; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLErrorLog ############## package LibSBML::SBMLErrorLog; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::XMLErrorLog LibSBML ); %OWNER = (); %ITERATORS = (); *getError = *LibSBMLc::SBMLErrorLog_getError; *getErrorWithSeverity = *LibSBMLc::SBMLErrorLog_getErrorWithSeverity; *getNumFailsWithSeverity = *LibSBMLc::SBMLErrorLog_getNumFailsWithSeverity; sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLErrorLog(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLErrorLog($self); delete $OWNER{$self}; } } *logError = *LibSBMLc::SBMLErrorLog_logError; *logPackageError = *LibSBMLc::SBMLErrorLog_logPackageError; *add = *LibSBMLc::SBMLErrorLog_add; *remove = *LibSBMLc::SBMLErrorLog_remove; *removeAll = *LibSBMLc::SBMLErrorLog_removeAll; *contains = *LibSBMLc::SBMLErrorLog_contains; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLError ############## package LibSBML::SBMLError; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::XMLError LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLError(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLError($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::CVTerm ############## package LibSBML::CVTerm; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_CVTerm($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_CVTerm(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::CVTerm_clone; *getQualifierType = *LibSBMLc::CVTerm_getQualifierType; *getModelQualifierType = *LibSBMLc::CVTerm_getModelQualifierType; *getBiologicalQualifierType = *LibSBMLc::CVTerm_getBiologicalQualifierType; *getResources = *LibSBMLc::CVTerm_getResources; *getNumResources = *LibSBMLc::CVTerm_getNumResources; *getResourceURI = *LibSBMLc::CVTerm_getResourceURI; *setQualifierType = *LibSBMLc::CVTerm_setQualifierType; *setModelQualifierType = *LibSBMLc::CVTerm_setModelQualifierType; *setBiologicalQualifierType = *LibSBMLc::CVTerm_setBiologicalQualifierType; *addResource = *LibSBMLc::CVTerm_addResource; *removeResource = *LibSBMLc::CVTerm_removeResource; *hasBeenModified = *LibSBMLc::CVTerm_hasBeenModified; *resetModifiedFlags = *LibSBMLc::CVTerm_resetModifiedFlags; *hasRequiredAttributes = *LibSBMLc::CVTerm_hasRequiredAttributes; *getNumNestedCVTerms = *LibSBMLc::CVTerm_getNumNestedCVTerms; *getNestedCVTerm = *LibSBMLc::CVTerm_getNestedCVTerm; *getListNestedCVTerms = *LibSBMLc::CVTerm_getListNestedCVTerms; *addNestedCVTerm = *LibSBMLc::CVTerm_addNestedCVTerm; *removeNestedCVTerm = *LibSBMLc::CVTerm_removeNestedCVTerm; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Date ############## package LibSBML::Date; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Date($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_Date(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::Date_clone; *getYear = *LibSBMLc::Date_getYear; *getMonth = *LibSBMLc::Date_getMonth; *getDay = *LibSBMLc::Date_getDay; *getHour = *LibSBMLc::Date_getHour; *getMinute = *LibSBMLc::Date_getMinute; *getSecond = *LibSBMLc::Date_getSecond; *getSignOffset = *LibSBMLc::Date_getSignOffset; *getHoursOffset = *LibSBMLc::Date_getHoursOffset; *getMinutesOffset = *LibSBMLc::Date_getMinutesOffset; *getDateAsString = *LibSBMLc::Date_getDateAsString; *setYear = *LibSBMLc::Date_setYear; *setMonth = *LibSBMLc::Date_setMonth; *setDay = *LibSBMLc::Date_setDay; *setHour = *LibSBMLc::Date_setHour; *setMinute = *LibSBMLc::Date_setMinute; *setSecond = *LibSBMLc::Date_setSecond; *setSignOffset = *LibSBMLc::Date_setSignOffset; *setHoursOffset = *LibSBMLc::Date_setHoursOffset; *setMinutesOffset = *LibSBMLc::Date_setMinutesOffset; *setDateAsString = *LibSBMLc::Date_setDateAsString; *representsValidDate = *LibSBMLc::Date_representsValidDate; *hasBeenModified = *LibSBMLc::Date_hasBeenModified; *resetModifiedFlags = *LibSBMLc::Date_resetModifiedFlags; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ModelCreator ############## package LibSBML::ModelCreator; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ModelCreator($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_ModelCreator(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ModelCreator_clone; *getFamilyName = *LibSBMLc::ModelCreator_getFamilyName; *getGivenName = *LibSBMLc::ModelCreator_getGivenName; *getEmail = *LibSBMLc::ModelCreator_getEmail; *getOrganization = *LibSBMLc::ModelCreator_getOrganization; *getOrganisation = *LibSBMLc::ModelCreator_getOrganisation; *getName = *LibSBMLc::ModelCreator_getName; *isSetFamilyName = *LibSBMLc::ModelCreator_isSetFamilyName; *isSetGivenName = *LibSBMLc::ModelCreator_isSetGivenName; *isSetEmail = *LibSBMLc::ModelCreator_isSetEmail; *isSetOrganization = *LibSBMLc::ModelCreator_isSetOrganization; *isSetOrganisation = *LibSBMLc::ModelCreator_isSetOrganisation; *isSetName = *LibSBMLc::ModelCreator_isSetName; *setFamilyName = *LibSBMLc::ModelCreator_setFamilyName; *setGivenName = *LibSBMLc::ModelCreator_setGivenName; *setEmail = *LibSBMLc::ModelCreator_setEmail; *setOrganization = *LibSBMLc::ModelCreator_setOrganization; *setOrganisation = *LibSBMLc::ModelCreator_setOrganisation; *setName = *LibSBMLc::ModelCreator_setName; *unsetFamilyName = *LibSBMLc::ModelCreator_unsetFamilyName; *unsetGivenName = *LibSBMLc::ModelCreator_unsetGivenName; *unsetEmail = *LibSBMLc::ModelCreator_unsetEmail; *unsetOrganization = *LibSBMLc::ModelCreator_unsetOrganization; *unsetOrganisation = *LibSBMLc::ModelCreator_unsetOrganisation; *unsetName = *LibSBMLc::ModelCreator_unsetName; *hasRequiredAttributes = *LibSBMLc::ModelCreator_hasRequiredAttributes; *hasBeenModified = *LibSBMLc::ModelCreator_hasBeenModified; *resetModifiedFlags = *LibSBMLc::ModelCreator_resetModifiedFlags; *usingFNVcard4 = *LibSBMLc::ModelCreator_usingFNVcard4; *usingSingleName = *LibSBMLc::ModelCreator_usingSingleName; *setUseSingleName = *LibSBMLc::ModelCreator_setUseSingleName; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ModelHistory ############## package LibSBML::ModelHistory; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ModelHistory($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_ModelHistory(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::ModelHistory_clone; *getCreatedDate = *LibSBMLc::ModelHistory_getCreatedDate; *isSetCreatedDate = *LibSBMLc::ModelHistory_isSetCreatedDate; *isSetModifiedDate = *LibSBMLc::ModelHistory_isSetModifiedDate; *setCreatedDate = *LibSBMLc::ModelHistory_setCreatedDate; *setModifiedDate = *LibSBMLc::ModelHistory_setModifiedDate; *addModifiedDate = *LibSBMLc::ModelHistory_addModifiedDate; sub getListModifiedDates { my $lox = LibSBMLc::ModelHistory_getListModifiedDates(@_); my @lox = (); for (my $i=0; $i<$lox->getSize(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getModifiedDate = *LibSBMLc::ModelHistory_getModifiedDate; *getNumModifiedDates = *LibSBMLc::ModelHistory_getNumModifiedDates; *addCreator = *LibSBMLc::ModelHistory_addCreator; sub getListCreators { my $lox = LibSBMLc::ModelHistory_getListCreators(@_); my @lox = (); for (my $i=0; $i<$lox->getSize(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } *getCreator = *LibSBMLc::ModelHistory_getCreator; *getNumCreators = *LibSBMLc::ModelHistory_getNumCreators; *hasRequiredAttributes = *LibSBMLc::ModelHistory_hasRequiredAttributes; *hasBeenModified = *LibSBMLc::ModelHistory_hasBeenModified; *resetModifiedFlags = *LibSBMLc::ModelHistory_resetModifiedFlags; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::RDFAnnotationParser ############## package LibSBML::RDFAnnotationParser; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *createAnnotation = *LibSBMLc::RDFAnnotationParser_createAnnotation; *createRDFAnnotation = *LibSBMLc::RDFAnnotationParser_createRDFAnnotation; *createCVTerms = *LibSBMLc::RDFAnnotationParser_createCVTerms; *parseCVTerms = *LibSBMLc::RDFAnnotationParser_parseCVTerms; *parseModelHistory = *LibSBMLc::RDFAnnotationParser_parseModelHistory; *parseOnlyModelHistory = *LibSBMLc::RDFAnnotationParser_parseOnlyModelHistory; *deleteRDFAnnotation = *LibSBMLc::RDFAnnotationParser_deleteRDFAnnotation; *deleteRDFHistoryAnnotation = *LibSBMLc::RDFAnnotationParser_deleteRDFHistoryAnnotation; *deleteRDFCVTermAnnotation = *LibSBMLc::RDFAnnotationParser_deleteRDFCVTermAnnotation; *parseRDFAnnotation = *LibSBMLc::RDFAnnotationParser_parseRDFAnnotation; sub new { my $pkg = shift; my $self = LibSBMLc::new_RDFAnnotationParser(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_RDFAnnotationParser($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ISBMLExtensionNamespaces ############## package LibSBML::ISBMLExtensionNamespaces; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBMLNamespaces LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ISBMLExtensionNamespaces($self); delete $OWNER{$self}; } } *getURI = *LibSBMLc::ISBMLExtensionNamespaces_getURI; *getPackageVersion = *LibSBMLc::ISBMLExtensionNamespaces_getPackageVersion; *getPackageName = *LibSBMLc::ISBMLExtensionNamespaces_getPackageName; *setPackageVersion = *LibSBMLc::ISBMLExtensionNamespaces_setPackageVersion; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBaseExtensionPoint ############## package LibSBML::SBaseExtensionPoint; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBaseExtensionPoint($self); delete $OWNER{$self}; } } sub new { my $pkg = shift; my $self = LibSBMLc::new_SBaseExtensionPoint(@_); bless $self, $pkg if defined($self); } *clone = *LibSBMLc::SBaseExtensionPoint_clone; *getPackageName = *LibSBMLc::SBaseExtensionPoint_getPackageName; *getTypeCode = *LibSBMLc::SBaseExtensionPoint_getTypeCode; *getElementName = *LibSBMLc::SBaseExtensionPoint_getElementName; *isElementOnly = *LibSBMLc::SBaseExtensionPoint_isElementOnly; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBasePlugin ############## package LibSBML::SBasePlugin; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBasePlugin($self); delete $OWNER{$self}; } } *getElementNamespace = *LibSBMLc::SBasePlugin_getElementNamespace; *getPrefix = *LibSBMLc::SBasePlugin_getPrefix; *getPackageName = *LibSBMLc::SBasePlugin_getPackageName; *clone = *LibSBMLc::SBasePlugin_clone; *getElementBySId = *LibSBMLc::SBasePlugin_getElementBySId; *getElementByMetaId = *LibSBMLc::SBasePlugin_getElementByMetaId; *connectToParent = *LibSBMLc::SBasePlugin_connectToParent; *enablePackageInternal = *LibSBMLc::SBasePlugin_enablePackageInternal; *stripPackage = *LibSBMLc::SBasePlugin_stripPackage; *getSBMLDocument = *LibSBMLc::SBasePlugin_getSBMLDocument; *getURI = *LibSBMLc::SBasePlugin_getURI; *getParentSBMLObject = *LibSBMLc::SBasePlugin_getParentSBMLObject; *setElementNamespace = *LibSBMLc::SBasePlugin_setElementNamespace; *getLevel = *LibSBMLc::SBasePlugin_getLevel; *getVersion = *LibSBMLc::SBasePlugin_getVersion; *getPackageVersion = *LibSBMLc::SBasePlugin_getPackageVersion; *replaceSIDWithFunction = *LibSBMLc::SBasePlugin_replaceSIDWithFunction; *divideAssignmentsToSIdByFunction = *LibSBMLc::SBasePlugin_divideAssignmentsToSIdByFunction; *multiplyAssignmentsToSIdByFunction = *LibSBMLc::SBasePlugin_multiplyAssignmentsToSIdByFunction; *hasIdentifierBeginningWith = *LibSBMLc::SBasePlugin_hasIdentifierBeginningWith; *prependStringToAllIdentifiers = *LibSBMLc::SBasePlugin_prependStringToAllIdentifiers; *renameSIdRefs = *LibSBMLc::SBasePlugin_renameSIdRefs; *renameMetaIdRefs = *LibSBMLc::SBasePlugin_renameMetaIdRefs; *renameUnitSIdRefs = *LibSBMLc::SBasePlugin_renameUnitSIdRefs; *transformIdentifiers = *LibSBMLc::SBasePlugin_transformIdentifiers; *getLine = *LibSBMLc::SBasePlugin_getLine; *getColumn = *LibSBMLc::SBasePlugin_getColumn; *getSBMLNamespaces = *LibSBMLc::SBasePlugin_getSBMLNamespaces; *logUnknownElement = *LibSBMLc::SBasePlugin_logUnknownElement; *isValidTypeForList = *LibSBMLc::SBasePlugin_isValidTypeForList; *getSBMLExtension = *LibSBMLc::SBasePlugin_getSBMLExtension; *updateSBMLNamespace = *LibSBMLc::SBasePlugin_updateSBMLNamespace; *getListOfAllElements = *LibSBMLc::SBasePlugin_getListOfAllElements; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLDocumentPlugin ############## package LibSBML::SBMLDocumentPlugin; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::SBasePlugin LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLDocumentPlugin(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLDocumentPlugin($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::SBMLDocumentPlugin_clone; *setRequired = *LibSBMLc::SBMLDocumentPlugin_setRequired; *getRequired = *LibSBMLc::SBMLDocumentPlugin_getRequired; *isSetRequired = *LibSBMLc::SBMLDocumentPlugin_isSetRequired; *unsetRequired = *LibSBMLc::SBMLDocumentPlugin_unsetRequired; *isCompFlatteningImplemented = *LibSBMLc::SBMLDocumentPlugin_isCompFlatteningImplemented; *checkConsistency = *LibSBMLc::SBMLDocumentPlugin_checkConsistency; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLExtension ############## package LibSBML::SBMLExtension; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLExtension($self); delete $OWNER{$self}; } } *getNumOfSBasePlugins = *LibSBMLc::SBMLExtension_getNumOfSBasePlugins; *getNumOfSupportedPackageURI = *LibSBMLc::SBMLExtension_getNumOfSupportedPackageURI; *isSupported = *LibSBMLc::SBMLExtension_isSupported; *getSupportedPackageURI = *LibSBMLc::SBMLExtension_getSupportedPackageURI; *clone = *LibSBMLc::SBMLExtension_clone; *getName = *LibSBMLc::SBMLExtension_getName; *getURI = *LibSBMLc::SBMLExtension_getURI; *getLevel = *LibSBMLc::SBMLExtension_getLevel; *getVersion = *LibSBMLc::SBMLExtension_getVersion; *getPackageVersion = *LibSBMLc::SBMLExtension_getPackageVersion; *getStringFromTypeCode = *LibSBMLc::SBMLExtension_getStringFromTypeCode; *getSBMLExtensionNamespaces = *LibSBMLc::SBMLExtension_getSBMLExtensionNamespaces; *setEnabled = *LibSBMLc::SBMLExtension_setEnabled; *isEnabled = *LibSBMLc::SBMLExtension_isEnabled; *removeL2Namespaces = *LibSBMLc::SBMLExtension_removeL2Namespaces; *addL2Namespaces = *LibSBMLc::SBMLExtension_addL2Namespaces; *enableL2NamespaceForDocument = *LibSBMLc::SBMLExtension_enableL2NamespaceForDocument; *isInUse = *LibSBMLc::SBMLExtension_isInUse; *hasMutiplePackageVersions = *LibSBMLc::SBMLExtension_hasMutiplePackageVersions; *getErrorTableIndex = *LibSBMLc::SBMLExtension_getErrorTableIndex; *getErrorIdOffset = *LibSBMLc::SBMLExtension_getErrorIdOffset; *getSeverity = *LibSBMLc::SBMLExtension_getSeverity; *getCategory = *LibSBMLc::SBMLExtension_getCategory; *getMessage = *LibSBMLc::SBMLExtension_getMessage; *getShortMessage = *LibSBMLc::SBMLExtension_getShortMessage; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLExtensionException ############## package LibSBML::SBMLExtensionException; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_SBMLExtensionException(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_SBMLExtensionException($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::SBMLExtensionRegistry ############## package LibSBML::SBMLExtensionRegistry; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); *getInstance = *LibSBMLc::SBMLExtensionRegistry_getInstance; *addExtension = *LibSBMLc::SBMLExtensionRegistry_addExtension; *getExtension = *LibSBMLc::SBMLExtensionRegistry_getExtension; *removeL2Namespaces = *LibSBMLc::SBMLExtensionRegistry_removeL2Namespaces; *addL2Namespaces = *LibSBMLc::SBMLExtensionRegistry_addL2Namespaces; *enableL2NamespaceForDocument = *LibSBMLc::SBMLExtensionRegistry_enableL2NamespaceForDocument; *disableUnusedPackages = *LibSBMLc::SBMLExtensionRegistry_disableUnusedPackages; *disablePackage = *LibSBMLc::SBMLExtensionRegistry_disablePackage; *isPackageEnabled = *LibSBMLc::SBMLExtensionRegistry_isPackageEnabled; *enablePackage = *LibSBMLc::SBMLExtensionRegistry_enablePackage; *getNumExtension = *LibSBMLc::SBMLExtensionRegistry_getNumExtension; *setEnabled = *LibSBMLc::SBMLExtensionRegistry_setEnabled; *isEnabled = *LibSBMLc::SBMLExtensionRegistry_isEnabled; *isRegistered = *LibSBMLc::SBMLExtensionRegistry_isRegistered; *getAllRegisteredPackageNames = *LibSBMLc::SBMLExtensionRegistry_getAllRegisteredPackageNames; *getNumRegisteredPackages = *LibSBMLc::SBMLExtensionRegistry_getNumRegisteredPackages; *getRegisteredPackageName = *LibSBMLc::SBMLExtensionRegistry_getRegisteredPackageName; *getASTPlugins = *LibSBMLc::SBMLExtensionRegistry_getASTPlugins; *getNumASTPlugins = *LibSBMLc::SBMLExtensionRegistry_getNumASTPlugins; *getASTPlugin = *LibSBMLc::SBMLExtensionRegistry_getASTPlugin; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::Callback ############## package LibSBML::Callback; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_Callback($self); delete $OWNER{$self}; } } *process = *LibSBMLc::Callback_process; sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_Callback(@_); bless $self, $pkg if defined($self); } sub DISOWN { my $self = shift; LibSBMLc::disown_Callback($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_Callback($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_Callback($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::CallbackRegistry ############## package LibSBML::CallbackRegistry; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *invokeCallbacks = *LibSBMLc::CallbackRegistry_invokeCallbacks; *clearCallbacks = *LibSBMLc::CallbackRegistry_clearCallbacks; *addCallback = *LibSBMLc::CallbackRegistry_addCallback; *getNumCallbacks = *LibSBMLc::CallbackRegistry_getNumCallbacks; *removeCallback = *LibSBMLc::CallbackRegistry_removeCallback; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_CallbackRegistry($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ASTNode ############## package LibSBML::ASTNode; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_ASTNode(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ASTNode($self); delete $OWNER{$self}; } } *freeName = *LibSBMLc::ASTNode_freeName; *canonicalize = *LibSBMLc::ASTNode_canonicalize; *addChild = *LibSBMLc::ASTNode_addChild; *prependChild = *LibSBMLc::ASTNode_prependChild; *removeChild = *LibSBMLc::ASTNode_removeChild; *replaceChild = *LibSBMLc::ASTNode_replaceChild; *insertChild = *LibSBMLc::ASTNode_insertChild; *deepCopy = *LibSBMLc::ASTNode_deepCopy; *getChild = *LibSBMLc::ASTNode_getChild; *getLeftChild = *LibSBMLc::ASTNode_getLeftChild; *getRightChild = *LibSBMLc::ASTNode_getRightChild; *getNumChildren = *LibSBMLc::ASTNode_getNumChildren; *addSemanticsAnnotation = *LibSBMLc::ASTNode_addSemanticsAnnotation; *getNumSemanticsAnnotations = *LibSBMLc::ASTNode_getNumSemanticsAnnotations; *getSemanticsAnnotation = *LibSBMLc::ASTNode_getSemanticsAnnotation; *getCharacter = *LibSBMLc::ASTNode_getCharacter; *getId = *LibSBMLc::ASTNode_getId; *getClass = *LibSBMLc::ASTNode_getClass; *getStyle = *LibSBMLc::ASTNode_getStyle; *getInteger = *LibSBMLc::ASTNode_getInteger; *getName = *LibSBMLc::ASTNode_getName; *getOperatorName = *LibSBMLc::ASTNode_getOperatorName; *getNumerator = *LibSBMLc::ASTNode_getNumerator; *getDenominator = *LibSBMLc::ASTNode_getDenominator; *getReal = *LibSBMLc::ASTNode_getReal; *getMantissa = *LibSBMLc::ASTNode_getMantissa; *getExponent = *LibSBMLc::ASTNode_getExponent; *getValue = *LibSBMLc::ASTNode_getValue; *getPrecedence = *LibSBMLc::ASTNode_getPrecedence; *getType = *LibSBMLc::ASTNode_getType; *getUnits = *LibSBMLc::ASTNode_getUnits; *isAvogadro = *LibSBMLc::ASTNode_isAvogadro; *isBoolean = *LibSBMLc::ASTNode_isBoolean; *returnsBoolean = *LibSBMLc::ASTNode_returnsBoolean; *isConstant = *LibSBMLc::ASTNode_isConstant; *isCiNumber = *LibSBMLc::ASTNode_isCiNumber; *isConstantNumber = *LibSBMLc::ASTNode_isConstantNumber; *isCSymbolFunction = *LibSBMLc::ASTNode_isCSymbolFunction; *isFunction = *LibSBMLc::ASTNode_isFunction; *isInfinity = *LibSBMLc::ASTNode_isInfinity; *isInteger = *LibSBMLc::ASTNode_isInteger; *isLambda = *LibSBMLc::ASTNode_isLambda; *isLog10 = *LibSBMLc::ASTNode_isLog10; *isLogical = *LibSBMLc::ASTNode_isLogical; *isName = *LibSBMLc::ASTNode_isName; *isNaN = *LibSBMLc::ASTNode_isNaN; *isNegInfinity = *LibSBMLc::ASTNode_isNegInfinity; *isNumber = *LibSBMLc::ASTNode_isNumber; *isOperator = *LibSBMLc::ASTNode_isOperator; *isPiecewise = *LibSBMLc::ASTNode_isPiecewise; *isRational = *LibSBMLc::ASTNode_isRational; *isReal = *LibSBMLc::ASTNode_isReal; *isRelational = *LibSBMLc::ASTNode_isRelational; *isSqrt = *LibSBMLc::ASTNode_isSqrt; *isUMinus = *LibSBMLc::ASTNode_isUMinus; *isUPlus = *LibSBMLc::ASTNode_isUPlus; *isUserFunction = *LibSBMLc::ASTNode_isUserFunction; *hasTypeAndNumChildren = *LibSBMLc::ASTNode_hasTypeAndNumChildren; *isUnknown = *LibSBMLc::ASTNode_isUnknown; *isSetId = *LibSBMLc::ASTNode_isSetId; *isSetClass = *LibSBMLc::ASTNode_isSetClass; *isSetStyle = *LibSBMLc::ASTNode_isSetStyle; *isSetUnits = *LibSBMLc::ASTNode_isSetUnits; *hasUnits = *LibSBMLc::ASTNode_hasUnits; *setCharacter = *LibSBMLc::ASTNode_setCharacter; *setId = *LibSBMLc::ASTNode_setId; *setClass = *LibSBMLc::ASTNode_setClass; *setStyle = *LibSBMLc::ASTNode_setStyle; *setName = *LibSBMLc::ASTNode_setName; *setValue = *LibSBMLc::ASTNode_setValue; *setType = *LibSBMLc::ASTNode_setType; *setUnits = *LibSBMLc::ASTNode_setUnits; *swapChildren = *LibSBMLc::ASTNode_swapChildren; *renameSIdRefs = *LibSBMLc::ASTNode_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::ASTNode_renameUnitSIdRefs; *replaceIDWithFunction = *LibSBMLc::ASTNode_replaceIDWithFunction; *multiplyTimeBy = *LibSBMLc::ASTNode_multiplyTimeBy; *unsetUnits = *LibSBMLc::ASTNode_unsetUnits; *unsetId = *LibSBMLc::ASTNode_unsetId; *unsetClass = *LibSBMLc::ASTNode_unsetClass; *unsetStyle = *LibSBMLc::ASTNode_unsetStyle; *setDefinitionURL = *LibSBMLc::ASTNode_setDefinitionURL; *getDefinitionURL = *LibSBMLc::ASTNode_getDefinitionURL; *replaceArgument = *LibSBMLc::ASTNode_replaceArgument; *getParentSBMLObject = *LibSBMLc::ASTNode_getParentSBMLObject; *unsetParentSBMLObject = *LibSBMLc::ASTNode_unsetParentSBMLObject; *isSetParentSBMLObject = *LibSBMLc::ASTNode_isSetParentSBMLObject; *reduceToBinary = *LibSBMLc::ASTNode_reduceToBinary; *unsetUserData = *LibSBMLc::ASTNode_unsetUserData; *isSetUserData = *LibSBMLc::ASTNode_isSetUserData; *isWellFormedASTNode = *LibSBMLc::ASTNode_isWellFormedASTNode; *hasCorrectNumberArguments = *LibSBMLc::ASTNode_hasCorrectNumberArguments; *getDefinitionURLString = *LibSBMLc::ASTNode_getDefinitionURLString; *representsBvar = *LibSBMLc::ASTNode_representsBvar; *isBvar = *LibSBMLc::ASTNode_isBvar; *setBvar = *LibSBMLc::ASTNode_setBvar; *usesL3V2MathConstructs = *LibSBMLc::ASTNode_usesL3V2MathConstructs; *usesRateOf = *LibSBMLc::ASTNode_usesRateOf; *isQualifier = *LibSBMLc::ASTNode_isQualifier; *isSemantics = *LibSBMLc::ASTNode_isSemantics; *getNumBvars = *LibSBMLc::ASTNode_getNumBvars; *addPlugin = *LibSBMLc::ASTNode_addPlugin; *loadASTPlugins = *LibSBMLc::ASTNode_loadASTPlugins; *loadASTPlugin = *LibSBMLc::ASTNode_loadASTPlugin; *getASTPlugin = *LibSBMLc::ASTNode_getASTPlugin; *getPlugin = *LibSBMLc::ASTNode_getPlugin; *getNumPlugins = *LibSBMLc::ASTNode_getNumPlugins; sub getListOfNodes { my $lox = LibSBMLc::ASTNode_getListOfNodes(@_); my @lox = (); for (my $i=0; $i<$lox->size(); $i++) { push @lox, $lox->get($i); } return wantarray ? @lox : $lox; } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::L3ParserSettings ############## package LibSBML::L3ParserSettings; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = shift; my $self = LibSBMLc::new_L3ParserSettings(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_L3ParserSettings($self); delete $OWNER{$self}; } } *setModel = *LibSBMLc::L3ParserSettings_setModel; *getModel = *LibSBMLc::L3ParserSettings_getModel; *unsetModel = *LibSBMLc::L3ParserSettings_unsetModel; *setParseLog = *LibSBMLc::L3ParserSettings_setParseLog; *getParseLog = *LibSBMLc::L3ParserSettings_getParseLog; *setParseCollapseMinus = *LibSBMLc::L3ParserSettings_setParseCollapseMinus; *getParseCollapseMinus = *LibSBMLc::L3ParserSettings_getParseCollapseMinus; *setParseUnits = *LibSBMLc::L3ParserSettings_setParseUnits; *getParseUnits = *LibSBMLc::L3ParserSettings_getParseUnits; *setParseAvogadroCsymbol = *LibSBMLc::L3ParserSettings_setParseAvogadroCsymbol; *getParseAvogadroCsymbol = *LibSBMLc::L3ParserSettings_getParseAvogadroCsymbol; *setComparisonCaseSensitivity = *LibSBMLc::L3ParserSettings_setComparisonCaseSensitivity; *getComparisonCaseSensitivity = *LibSBMLc::L3ParserSettings_getComparisonCaseSensitivity; *setParseModuloL3v2 = *LibSBMLc::L3ParserSettings_setParseModuloL3v2; *getParseModuloL3v2 = *LibSBMLc::L3ParserSettings_getParseModuloL3v2; *setParseL3v2Functions = *LibSBMLc::L3ParserSettings_setParseL3v2Functions; *getParseL3v2Functions = *LibSBMLc::L3ParserSettings_getParseL3v2Functions; *setParsePackageMath = *LibSBMLc::L3ParserSettings_setParsePackageMath; *getParsePackageMath = *LibSBMLc::L3ParserSettings_getParsePackageMath; *visitPackageInfixSyntax = *LibSBMLc::L3ParserSettings_visitPackageInfixSyntax; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::DefinitionURLRegistry ############## package LibSBML::DefinitionURLRegistry; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *getInstance = *LibSBMLc::DefinitionURLRegistry_getInstance; *addDefinitionURL = *LibSBMLc::DefinitionURLRegistry_addDefinitionURL; *getNumDefinitionURLs = *LibSBMLc::DefinitionURLRegistry_getNumDefinitionURLs; *addSBMLDefinitions = *LibSBMLc::DefinitionURLRegistry_addSBMLDefinitions; *getCoreDefinitionsAdded = *LibSBMLc::DefinitionURLRegistry_getCoreDefinitionsAdded; *getType = *LibSBMLc::DefinitionURLRegistry_getType; *getDefinitionUrlByIndex = *LibSBMLc::DefinitionURLRegistry_getDefinitionUrlByIndex; *clearDefinitions = *LibSBMLc::DefinitionURLRegistry_clearDefinitions; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_DefinitionURLRegistry($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::MathFilter ############## package LibSBML::MathFilter; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML::ElementFilter LibSBML ); %OWNER = (); %ITERATORS = (); sub new { my $pkg = $_[0]; my $self = LibSBMLc::new_MathFilter(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_MathFilter($self); delete $OWNER{$self}; } } *filter = *LibSBMLc::MathFilter_filter; sub DISOWN { my $self = shift; LibSBMLc::disown_MathFilter($self); my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } sub FETCH { my ($self,$field) = @_; my $member_func = "swig_${field}_get"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_MathFilter($self); return $h->{$field} if $h; } return $self->$member_func; } sub STORE { my ($self,$field,$newval) = @_; my $member_func = "swig_${field}_set"; if (not $self->can($member_func)) { my $h = LibSBMLc::swig_get_attr_MathFilter($self); return $h->{$field} = $newval if $h; } return $self->$member_func($newval); } ############# Class : LibSBML::ASTNodeValues_t ############## package LibSBML::ASTNodeValues_t; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *swig_name_get = *LibSBMLc::ASTNodeValues_t_name_get; *swig_name_set = *LibSBMLc::ASTNodeValues_t_name_set; *swig_type_get = *LibSBMLc::ASTNodeValues_t_type_get; *swig_type_set = *LibSBMLc::ASTNodeValues_t_type_set; *swig_isFunction_get = *LibSBMLc::ASTNodeValues_t_isFunction_get; *swig_isFunction_set = *LibSBMLc::ASTNodeValues_t_isFunction_set; *swig_csymbolURL_get = *LibSBMLc::ASTNodeValues_t_csymbolURL_get; *swig_csymbolURL_set = *LibSBMLc::ASTNodeValues_t_csymbolURL_set; *swig_allowedChildrenType_get = *LibSBMLc::ASTNodeValues_t_allowedChildrenType_get; *swig_allowedChildrenType_set = *LibSBMLc::ASTNodeValues_t_allowedChildrenType_set; *swig_numAllowedChildren_get = *LibSBMLc::ASTNodeValues_t_numAllowedChildren_get; *swig_numAllowedChildren_set = *LibSBMLc::ASTNodeValues_t_numAllowedChildren_set; sub new { my $pkg = shift; my $self = LibSBMLc::new_ASTNodeValues_t(@_); bless $self, $pkg if defined($self); } sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ASTNodeValues_t($self); delete $OWNER{$self}; } } sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } ############# Class : LibSBML::ASTBasePlugin ############## package LibSBML::ASTBasePlugin; use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); @ISA = qw( LibSBML ); %OWNER = (); %ITERATORS = (); *getStringFor = *LibSBMLc::ASTBasePlugin_getStringFor; *getConstCharFor = *LibSBMLc::ASTBasePlugin_getConstCharFor; *getConstCharCsymbolURLFor = *LibSBMLc::ASTBasePlugin_getConstCharCsymbolURLFor; *getASTNodeTypeFor = *LibSBMLc::ASTBasePlugin_getASTNodeTypeFor; *getASTNodeTypeForCSymbolURL = *LibSBMLc::ASTBasePlugin_getASTNodeTypeForCSymbolURL; *hasCorrectNamespace = *LibSBMLc::ASTBasePlugin_hasCorrectNamespace; *defines = *LibSBMLc::ASTBasePlugin_defines; *isFunction = *LibSBMLc::ASTBasePlugin_isFunction; *getNumAllowedChildren = *LibSBMLc::ASTBasePlugin_getNumAllowedChildren; *isLogical = *LibSBMLc::ASTBasePlugin_isLogical; *isMathMLNodeTag = *LibSBMLc::ASTBasePlugin_isMathMLNodeTag; *getExtendedMathType = *LibSBMLc::ASTBasePlugin_getExtendedMathType; *evaluateASTNode = *LibSBMLc::ASTBasePlugin_evaluateASTNode; *getUnitDefinitionFromPackage = *LibSBMLc::ASTBasePlugin_getUnitDefinitionFromPackage; *getASTNodeValue = *LibSBMLc::ASTBasePlugin_getASTNodeValue; *allowedInFunctionDefinition = *LibSBMLc::ASTBasePlugin_allowedInFunctionDefinition; sub DESTROY { return unless $_[0]->isa('HASH'); my $self = tied(%{$_[0]}); return unless defined $self; delete $ITERATORS{$self}; if (exists $OWNER{$self}) { LibSBMLc::delete_ASTBasePlugin($self); delete $OWNER{$self}; } } *clone = *LibSBMLc::ASTBasePlugin_clone; *getElementNamespace = *LibSBMLc::ASTBasePlugin_getElementNamespace; *getPrefix = *LibSBMLc::ASTBasePlugin_getPrefix; *getPackageName = *LibSBMLc::ASTBasePlugin_getPackageName; *setSBMLExtension = *LibSBMLc::ASTBasePlugin_setSBMLExtension; *setPrefix = *LibSBMLc::ASTBasePlugin_setPrefix; *connectToParent = *LibSBMLc::ASTBasePlugin_connectToParent; *enablePackageInternal = *LibSBMLc::ASTBasePlugin_enablePackageInternal; *stripPackage = *LibSBMLc::ASTBasePlugin_stripPackage; *getURI = *LibSBMLc::ASTBasePlugin_getURI; *getParentASTObject = *LibSBMLc::ASTBasePlugin_getParentASTObject; *setElementNamespace = *LibSBMLc::ASTBasePlugin_setElementNamespace; *getLevel = *LibSBMLc::ASTBasePlugin_getLevel; *getVersion = *LibSBMLc::ASTBasePlugin_getVersion; *getPackageVersion = *LibSBMLc::ASTBasePlugin_getPackageVersion; *getSBMLNamespaces = *LibSBMLc::ASTBasePlugin_getSBMLNamespaces; *renameSIdRefs = *LibSBMLc::ASTBasePlugin_renameSIdRefs; *renameUnitSIdRefs = *LibSBMLc::ASTBasePlugin_renameUnitSIdRefs; *replaceIDWithFunction = *LibSBMLc::ASTBasePlugin_replaceIDWithFunction; *checkNumArguments = *LibSBMLc::ASTBasePlugin_checkNumArguments; *getL3PackageInfixPrecedence = *LibSBMLc::ASTBasePlugin_getL3PackageInfixPrecedence; *hasCorrectNumArguments = *LibSBMLc::ASTBasePlugin_hasCorrectNumArguments; *hasPackageOnlyInfixSyntax = *LibSBMLc::ASTBasePlugin_hasPackageOnlyInfixSyntax; *hasUnambiguousPackageInfixGrammar = *LibSBMLc::ASTBasePlugin_hasUnambiguousPackageInfixGrammar; *isPackageInfixFunction = *LibSBMLc::ASTBasePlugin_isPackageInfixFunction; sub DISOWN { my $self = shift; my $ptr = tied(%$self); delete $OWNER{$ptr}; } sub ACQUIRE { my $self = shift; my $ptr = tied(%$self); $OWNER{$ptr} = 1; } # ------- VARIABLE STUBS -------- package LibSBML; *COUT = *LibSBMLc::COUT; *CERR = *LibSBMLc::CERR; *CLOG = *LibSBMLc::CLOG; *LIBSBML_DOTTED_VERSION = *LibSBMLc::LIBSBML_DOTTED_VERSION; *LIBSBML_VERSION = *LibSBMLc::LIBSBML_VERSION; *LIBSBML_VERSION_STRING = *LibSBMLc::LIBSBML_VERSION_STRING; *LIBSBML_OPERATION_SUCCESS = *LibSBMLc::LIBSBML_OPERATION_SUCCESS; *LIBSBML_INDEX_EXCEEDS_SIZE = *LibSBMLc::LIBSBML_INDEX_EXCEEDS_SIZE; *LIBSBML_UNEXPECTED_ATTRIBUTE = *LibSBMLc::LIBSBML_UNEXPECTED_ATTRIBUTE; *LIBSBML_OPERATION_FAILED = *LibSBMLc::LIBSBML_OPERATION_FAILED; *LIBSBML_INVALID_ATTRIBUTE_VALUE = *LibSBMLc::LIBSBML_INVALID_ATTRIBUTE_VALUE; *LIBSBML_INVALID_OBJECT = *LibSBMLc::LIBSBML_INVALID_OBJECT; *LIBSBML_DUPLICATE_OBJECT_ID = *LibSBMLc::LIBSBML_DUPLICATE_OBJECT_ID; *LIBSBML_LEVEL_MISMATCH = *LibSBMLc::LIBSBML_LEVEL_MISMATCH; *LIBSBML_VERSION_MISMATCH = *LibSBMLc::LIBSBML_VERSION_MISMATCH; *LIBSBML_INVALID_XML_OPERATION = *LibSBMLc::LIBSBML_INVALID_XML_OPERATION; *LIBSBML_NAMESPACES_MISMATCH = *LibSBMLc::LIBSBML_NAMESPACES_MISMATCH; *LIBSBML_DUPLICATE_ANNOTATION_NS = *LibSBMLc::LIBSBML_DUPLICATE_ANNOTATION_NS; *LIBSBML_ANNOTATION_NAME_NOT_FOUND = *LibSBMLc::LIBSBML_ANNOTATION_NAME_NOT_FOUND; *LIBSBML_ANNOTATION_NS_NOT_FOUND = *LibSBMLc::LIBSBML_ANNOTATION_NS_NOT_FOUND; *LIBSBML_MISSING_METAID = *LibSBMLc::LIBSBML_MISSING_METAID; *LIBSBML_DEPRECATED_ATTRIBUTE = *LibSBMLc::LIBSBML_DEPRECATED_ATTRIBUTE; *LIBSBML_USE_ID_ATTRIBUTE_FUNCTION = *LibSBMLc::LIBSBML_USE_ID_ATTRIBUTE_FUNCTION; *LIBSBML_PKG_VERSION_MISMATCH = *LibSBMLc::LIBSBML_PKG_VERSION_MISMATCH; *LIBSBML_PKG_UNKNOWN = *LibSBMLc::LIBSBML_PKG_UNKNOWN; *LIBSBML_PKG_UNKNOWN_VERSION = *LibSBMLc::LIBSBML_PKG_UNKNOWN_VERSION; *LIBSBML_PKG_DISABLED = *LibSBMLc::LIBSBML_PKG_DISABLED; *LIBSBML_PKG_CONFLICTED_VERSION = *LibSBMLc::LIBSBML_PKG_CONFLICTED_VERSION; *LIBSBML_PKG_CONFLICT = *LibSBMLc::LIBSBML_PKG_CONFLICT; *LIBSBML_CONV_INVALID_TARGET_NAMESPACE = *LibSBMLc::LIBSBML_CONV_INVALID_TARGET_NAMESPACE; *LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE = *LibSBMLc::LIBSBML_CONV_PKG_CONVERSION_NOT_AVAILABLE; *LIBSBML_CONV_INVALID_SRC_DOCUMENT = *LibSBMLc::LIBSBML_CONV_INVALID_SRC_DOCUMENT; *LIBSBML_CONV_CONVERSION_NOT_AVAILABLE = *LibSBMLc::LIBSBML_CONV_CONVERSION_NOT_AVAILABLE; *LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN = *LibSBMLc::LIBSBML_CONV_PKG_CONSIDERED_UNKNOWN; *SBML_UNKNOWN = *LibSBMLc::SBML_UNKNOWN; *SBML_COMPARTMENT = *LibSBMLc::SBML_COMPARTMENT; *SBML_COMPARTMENT_TYPE = *LibSBMLc::SBML_COMPARTMENT_TYPE; *SBML_CONSTRAINT = *LibSBMLc::SBML_CONSTRAINT; *SBML_DOCUMENT = *LibSBMLc::SBML_DOCUMENT; *SBML_EVENT = *LibSBMLc::SBML_EVENT; *SBML_EVENT_ASSIGNMENT = *LibSBMLc::SBML_EVENT_ASSIGNMENT; *SBML_FUNCTION_DEFINITION = *LibSBMLc::SBML_FUNCTION_DEFINITION; *SBML_INITIAL_ASSIGNMENT = *LibSBMLc::SBML_INITIAL_ASSIGNMENT; *SBML_KINETIC_LAW = *LibSBMLc::SBML_KINETIC_LAW; *SBML_LIST_OF = *LibSBMLc::SBML_LIST_OF; *SBML_MODEL = *LibSBMLc::SBML_MODEL; *SBML_PARAMETER = *LibSBMLc::SBML_PARAMETER; *SBML_REACTION = *LibSBMLc::SBML_REACTION; *SBML_RULE = *LibSBMLc::SBML_RULE; *SBML_SPECIES = *LibSBMLc::SBML_SPECIES; *SBML_SPECIES_REFERENCE = *LibSBMLc::SBML_SPECIES_REFERENCE; *SBML_SPECIES_TYPE = *LibSBMLc::SBML_SPECIES_TYPE; *SBML_MODIFIER_SPECIES_REFERENCE = *LibSBMLc::SBML_MODIFIER_SPECIES_REFERENCE; *SBML_UNIT_DEFINITION = *LibSBMLc::SBML_UNIT_DEFINITION; *SBML_UNIT = *LibSBMLc::SBML_UNIT; *SBML_ALGEBRAIC_RULE = *LibSBMLc::SBML_ALGEBRAIC_RULE; *SBML_ASSIGNMENT_RULE = *LibSBMLc::SBML_ASSIGNMENT_RULE; *SBML_RATE_RULE = *LibSBMLc::SBML_RATE_RULE; *SBML_SPECIES_CONCENTRATION_RULE = *LibSBMLc::SBML_SPECIES_CONCENTRATION_RULE; *SBML_COMPARTMENT_VOLUME_RULE = *LibSBMLc::SBML_COMPARTMENT_VOLUME_RULE; *SBML_PARAMETER_RULE = *LibSBMLc::SBML_PARAMETER_RULE; *SBML_TRIGGER = *LibSBMLc::SBML_TRIGGER; *SBML_DELAY = *LibSBMLc::SBML_DELAY; *SBML_STOICHIOMETRY_MATH = *LibSBMLc::SBML_STOICHIOMETRY_MATH; *SBML_LOCAL_PARAMETER = *LibSBMLc::SBML_LOCAL_PARAMETER; *SBML_PRIORITY = *LibSBMLc::SBML_PRIORITY; *SBML_GENERIC_SBASE = *LibSBMLc::SBML_GENERIC_SBASE; *IdCheckON = *LibSBMLc::IdCheckON; *IdCheckOFF = *LibSBMLc::IdCheckOFF; *SBMLCheckON = *LibSBMLc::SBMLCheckON; *SBMLCheckOFF = *LibSBMLc::SBMLCheckOFF; *SBOCheckON = *LibSBMLc::SBOCheckON; *SBOCheckOFF = *LibSBMLc::SBOCheckOFF; *MathCheckON = *LibSBMLc::MathCheckON; *MathCheckOFF = *LibSBMLc::MathCheckOFF; *UnitsCheckON = *LibSBMLc::UnitsCheckON; *UnitsCheckOFF = *LibSBMLc::UnitsCheckOFF; *OverdeterCheckON = *LibSBMLc::OverdeterCheckON; *OverdeterCheckOFF = *LibSBMLc::OverdeterCheckOFF; *PracticeCheckON = *LibSBMLc::PracticeCheckON; *PracticeCheckOFF = *LibSBMLc::PracticeCheckOFF; *AllChecksON = *LibSBMLc::AllChecksON; *UNIT_KIND_AMPERE = *LibSBMLc::UNIT_KIND_AMPERE; *UNIT_KIND_AVOGADRO = *LibSBMLc::UNIT_KIND_AVOGADRO; *UNIT_KIND_BECQUEREL = *LibSBMLc::UNIT_KIND_BECQUEREL; *UNIT_KIND_CANDELA = *LibSBMLc::UNIT_KIND_CANDELA; *UNIT_KIND_CELSIUS = *LibSBMLc::UNIT_KIND_CELSIUS; *UNIT_KIND_COULOMB = *LibSBMLc::UNIT_KIND_COULOMB; *UNIT_KIND_DIMENSIONLESS = *LibSBMLc::UNIT_KIND_DIMENSIONLESS; *UNIT_KIND_FARAD = *LibSBMLc::UNIT_KIND_FARAD; *UNIT_KIND_GRAM = *LibSBMLc::UNIT_KIND_GRAM; *UNIT_KIND_GRAY = *LibSBMLc::UNIT_KIND_GRAY; *UNIT_KIND_HENRY = *LibSBMLc::UNIT_KIND_HENRY; *UNIT_KIND_HERTZ = *LibSBMLc::UNIT_KIND_HERTZ; *UNIT_KIND_ITEM = *LibSBMLc::UNIT_KIND_ITEM; *UNIT_KIND_JOULE = *LibSBMLc::UNIT_KIND_JOULE; *UNIT_KIND_KATAL = *LibSBMLc::UNIT_KIND_KATAL; *UNIT_KIND_KELVIN = *LibSBMLc::UNIT_KIND_KELVIN; *UNIT_KIND_KILOGRAM = *LibSBMLc::UNIT_KIND_KILOGRAM; *UNIT_KIND_LITER = *LibSBMLc::UNIT_KIND_LITER; *UNIT_KIND_LITRE = *LibSBMLc::UNIT_KIND_LITRE; *UNIT_KIND_LUMEN = *LibSBMLc::UNIT_KIND_LUMEN; *UNIT_KIND_LUX = *LibSBMLc::UNIT_KIND_LUX; *UNIT_KIND_METER = *LibSBMLc::UNIT_KIND_METER; *UNIT_KIND_METRE = *LibSBMLc::UNIT_KIND_METRE; *UNIT_KIND_MOLE = *LibSBMLc::UNIT_KIND_MOLE; *UNIT_KIND_NEWTON = *LibSBMLc::UNIT_KIND_NEWTON; *UNIT_KIND_OHM = *LibSBMLc::UNIT_KIND_OHM; *UNIT_KIND_PASCAL = *LibSBMLc::UNIT_KIND_PASCAL; *UNIT_KIND_RADIAN = *LibSBMLc::UNIT_KIND_RADIAN; *UNIT_KIND_SECOND = *LibSBMLc::UNIT_KIND_SECOND; *UNIT_KIND_SIEMENS = *LibSBMLc::UNIT_KIND_SIEMENS; *UNIT_KIND_SIEVERT = *LibSBMLc::UNIT_KIND_SIEVERT; *UNIT_KIND_STERADIAN = *LibSBMLc::UNIT_KIND_STERADIAN; *UNIT_KIND_TESLA = *LibSBMLc::UNIT_KIND_TESLA; *UNIT_KIND_VOLT = *LibSBMLc::UNIT_KIND_VOLT; *UNIT_KIND_WATT = *LibSBMLc::UNIT_KIND_WATT; *UNIT_KIND_WEBER = *LibSBMLc::UNIT_KIND_WEBER; *UNIT_KIND_INVALID = *LibSBMLc::UNIT_KIND_INVALID; *RULE_TYPE_RATE = *LibSBMLc::RULE_TYPE_RATE; *RULE_TYPE_SCALAR = *LibSBMLc::RULE_TYPE_SCALAR; *RULE_TYPE_INVALID = *LibSBMLc::RULE_TYPE_INVALID; *CNV_TYPE_BOOL = *LibSBMLc::CNV_TYPE_BOOL; *CNV_TYPE_DOUBLE = *LibSBMLc::CNV_TYPE_DOUBLE; *CNV_TYPE_INT = *LibSBMLc::CNV_TYPE_INT; *CNV_TYPE_SINGLE = *LibSBMLc::CNV_TYPE_SINGLE; *CNV_TYPE_STRING = *LibSBMLc::CNV_TYPE_STRING; *XMLUnknownError = *LibSBMLc::XMLUnknownError; *XMLOutOfMemory = *LibSBMLc::XMLOutOfMemory; *XMLFileUnreadable = *LibSBMLc::XMLFileUnreadable; *XMLFileUnwritable = *LibSBMLc::XMLFileUnwritable; *XMLFileOperationError = *LibSBMLc::XMLFileOperationError; *XMLNetworkAccessError = *LibSBMLc::XMLNetworkAccessError; *InternalXMLParserError = *LibSBMLc::InternalXMLParserError; *UnrecognizedXMLParserCode = *LibSBMLc::UnrecognizedXMLParserCode; *XMLTranscoderError = *LibSBMLc::XMLTranscoderError; *MissingXMLDecl = *LibSBMLc::MissingXMLDecl; *MissingXMLEncoding = *LibSBMLc::MissingXMLEncoding; *BadXMLDecl = *LibSBMLc::BadXMLDecl; *BadXMLDOCTYPE = *LibSBMLc::BadXMLDOCTYPE; *InvalidCharInXML = *LibSBMLc::InvalidCharInXML; *BadlyFormedXML = *LibSBMLc::BadlyFormedXML; *UnclosedXMLToken = *LibSBMLc::UnclosedXMLToken; *InvalidXMLConstruct = *LibSBMLc::InvalidXMLConstruct; *XMLTagMismatch = *LibSBMLc::XMLTagMismatch; *DuplicateXMLAttribute = *LibSBMLc::DuplicateXMLAttribute; *UndefinedXMLEntity = *LibSBMLc::UndefinedXMLEntity; *BadProcessingInstruction = *LibSBMLc::BadProcessingInstruction; *BadXMLPrefix = *LibSBMLc::BadXMLPrefix; *BadXMLPrefixValue = *LibSBMLc::BadXMLPrefixValue; *MissingXMLRequiredAttribute = *LibSBMLc::MissingXMLRequiredAttribute; *XMLAttributeTypeMismatch = *LibSBMLc::XMLAttributeTypeMismatch; *XMLBadUTF8Content = *LibSBMLc::XMLBadUTF8Content; *MissingXMLAttributeValue = *LibSBMLc::MissingXMLAttributeValue; *BadXMLAttributeValue = *LibSBMLc::BadXMLAttributeValue; *BadXMLAttribute = *LibSBMLc::BadXMLAttribute; *UnrecognizedXMLElement = *LibSBMLc::UnrecognizedXMLElement; *BadXMLComment = *LibSBMLc::BadXMLComment; *BadXMLDeclLocation = *LibSBMLc::BadXMLDeclLocation; *XMLUnexpectedEOF = *LibSBMLc::XMLUnexpectedEOF; *BadXMLIDValue = *LibSBMLc::BadXMLIDValue; *BadXMLIDRef = *LibSBMLc::BadXMLIDRef; *UninterpretableXMLContent = *LibSBMLc::UninterpretableXMLContent; *BadXMLDocumentStructure = *LibSBMLc::BadXMLDocumentStructure; *InvalidAfterXMLContent = *LibSBMLc::InvalidAfterXMLContent; *XMLExpectedQuotedString = *LibSBMLc::XMLExpectedQuotedString; *XMLEmptyValueNotPermitted = *LibSBMLc::XMLEmptyValueNotPermitted; *XMLBadNumber = *LibSBMLc::XMLBadNumber; *XMLBadColon = *LibSBMLc::XMLBadColon; *MissingXMLElements = *LibSBMLc::MissingXMLElements; *XMLContentEmpty = *LibSBMLc::XMLContentEmpty; *XMLErrorCodesUpperBound = *LibSBMLc::XMLErrorCodesUpperBound; *LIBSBML_CAT_INTERNAL = *LibSBMLc::LIBSBML_CAT_INTERNAL; *LIBSBML_CAT_SYSTEM = *LibSBMLc::LIBSBML_CAT_SYSTEM; *LIBSBML_CAT_XML = *LibSBMLc::LIBSBML_CAT_XML; *LIBSBML_SEV_INFO = *LibSBMLc::LIBSBML_SEV_INFO; *LIBSBML_SEV_WARNING = *LibSBMLc::LIBSBML_SEV_WARNING; *LIBSBML_SEV_ERROR = *LibSBMLc::LIBSBML_SEV_ERROR; *LIBSBML_SEV_FATAL = *LibSBMLc::LIBSBML_SEV_FATAL; *LIBSBML_OVERRIDE_DISABLED = *LibSBMLc::LIBSBML_OVERRIDE_DISABLED; *LIBSBML_OVERRIDE_DONT_LOG = *LibSBMLc::LIBSBML_OVERRIDE_DONT_LOG; *LIBSBML_OVERRIDE_WARNING = *LibSBMLc::LIBSBML_OVERRIDE_WARNING; *LIBSBML_OVERRIDE_ERROR = *LibSBMLc::LIBSBML_OVERRIDE_ERROR; *UnknownError = *LibSBMLc::UnknownError; *NotUTF8 = *LibSBMLc::NotUTF8; *UnrecognizedElement = *LibSBMLc::UnrecognizedElement; *NotSchemaConformant = *LibSBMLc::NotSchemaConformant; *L3NotSchemaConformant = *LibSBMLc::L3NotSchemaConformant; *InvalidMathElement = *LibSBMLc::InvalidMathElement; *DisallowedMathMLSymbol = *LibSBMLc::DisallowedMathMLSymbol; *DisallowedMathMLEncodingUse = *LibSBMLc::DisallowedMathMLEncodingUse; *DisallowedDefinitionURLUse = *LibSBMLc::DisallowedDefinitionURLUse; *BadCsymbolDefinitionURLValue = *LibSBMLc::BadCsymbolDefinitionURLValue; *DisallowedMathTypeAttributeUse = *LibSBMLc::DisallowedMathTypeAttributeUse; *DisallowedMathTypeAttributeValue = *LibSBMLc::DisallowedMathTypeAttributeValue; *LambdaOnlyAllowedInFunctionDef = *LibSBMLc::LambdaOnlyAllowedInFunctionDef; *BooleanOpsNeedBooleanArgs = *LibSBMLc::BooleanOpsNeedBooleanArgs; *NumericOpsNeedNumericArgs = *LibSBMLc::NumericOpsNeedNumericArgs; *ArgsToEqNeedSameType = *LibSBMLc::ArgsToEqNeedSameType; *PiecewiseNeedsConsistentTypes = *LibSBMLc::PiecewiseNeedsConsistentTypes; *PieceNeedsBoolean = *LibSBMLc::PieceNeedsBoolean; *ApplyCiMustBeUserFunction = *LibSBMLc::ApplyCiMustBeUserFunction; *ApplyCiMustBeModelComponent = *LibSBMLc::ApplyCiMustBeModelComponent; *KineticLawParametersAreLocalOnly = *LibSBMLc::KineticLawParametersAreLocalOnly; *MathResultMustBeNumeric = *LibSBMLc::MathResultMustBeNumeric; *OpsNeedCorrectNumberOfArgs = *LibSBMLc::OpsNeedCorrectNumberOfArgs; *InvalidNoArgsPassedToFunctionDef = *LibSBMLc::InvalidNoArgsPassedToFunctionDef; *DisallowedMathUnitsUse = *LibSBMLc::DisallowedMathUnitsUse; *InvalidUnitsValue = *LibSBMLc::InvalidUnitsValue; *CiCannotReference0DCompartment = *LibSBMLc::CiCannotReference0DCompartment; *RateOfTargetMustBeCi = *LibSBMLc::RateOfTargetMustBeCi; *RateOfTargetCannotBeAssigned = *LibSBMLc::RateOfTargetCannotBeAssigned; *RateOfSpeciesTargetCompartmentNot = *LibSBMLc::RateOfSpeciesTargetCompartmentNot; *DuplicateComponentId = *LibSBMLc::DuplicateComponentId; *DuplicateUnitDefinitionId = *LibSBMLc::DuplicateUnitDefinitionId; *DuplicateLocalParameterId = *LibSBMLc::DuplicateLocalParameterId; *MultipleAssignmentOrRateRules = *LibSBMLc::MultipleAssignmentOrRateRules; *MultipleEventAssignmentsForId = *LibSBMLc::MultipleEventAssignmentsForId; *EventAndAssignmentRuleForId = *LibSBMLc::EventAndAssignmentRuleForId; *DuplicateMetaId = *LibSBMLc::DuplicateMetaId; *InvalidSBOTermSyntax = *LibSBMLc::InvalidSBOTermSyntax; *InvalidMetaidSyntax = *LibSBMLc::InvalidMetaidSyntax; *InvalidIdSyntax = *LibSBMLc::InvalidIdSyntax; *InvalidUnitIdSyntax = *LibSBMLc::InvalidUnitIdSyntax; *InvalidNameSyntax = *LibSBMLc::InvalidNameSyntax; *DanglingUnitReference = *LibSBMLc::DanglingUnitReference; *MissingAnnotationNamespace = *LibSBMLc::MissingAnnotationNamespace; *DuplicateAnnotationNamespaces = *LibSBMLc::DuplicateAnnotationNamespaces; *SBMLNamespaceInAnnotation = *LibSBMLc::SBMLNamespaceInAnnotation; *MultipleAnnotations = *LibSBMLc::MultipleAnnotations; *InconsistentArgUnits = *LibSBMLc::InconsistentArgUnits; *InconsistentKineticLawUnitsL3 = *LibSBMLc::InconsistentKineticLawUnitsL3; *AssignRuleCompartmentMismatch = *LibSBMLc::AssignRuleCompartmentMismatch; *AssignRuleSpeciesMismatch = *LibSBMLc::AssignRuleSpeciesMismatch; *AssignRuleParameterMismatch = *LibSBMLc::AssignRuleParameterMismatch; *AssignRuleStoichiometryMismatch = *LibSBMLc::AssignRuleStoichiometryMismatch; *InitAssignCompartmenMismatch = *LibSBMLc::InitAssignCompartmenMismatch; *InitAssignSpeciesMismatch = *LibSBMLc::InitAssignSpeciesMismatch; *InitAssignParameterMismatch = *LibSBMLc::InitAssignParameterMismatch; *InitAssignStoichiometryMismatch = *LibSBMLc::InitAssignStoichiometryMismatch; *RateRuleCompartmentMismatch = *LibSBMLc::RateRuleCompartmentMismatch; *RateRuleSpeciesMismatch = *LibSBMLc::RateRuleSpeciesMismatch; *RateRuleParameterMismatch = *LibSBMLc::RateRuleParameterMismatch; *RateRuleStoichiometryMismatch = *LibSBMLc::RateRuleStoichiometryMismatch; *KineticLawNotSubstancePerTime = *LibSBMLc::KineticLawNotSubstancePerTime; *SpeciesInvalidExtentUnits = *LibSBMLc::SpeciesInvalidExtentUnits; *DelayUnitsNotTime = *LibSBMLc::DelayUnitsNotTime; *EventAssignCompartmentMismatch = *LibSBMLc::EventAssignCompartmentMismatch; *EventAssignSpeciesMismatch = *LibSBMLc::EventAssignSpeciesMismatch; *EventAssignParameterMismatch = *LibSBMLc::EventAssignParameterMismatch; *EventAssignStoichiometryMismatch = *LibSBMLc::EventAssignStoichiometryMismatch; *PriorityUnitsNotDimensionless = *LibSBMLc::PriorityUnitsNotDimensionless; *UpperUnitBound = *LibSBMLc::UpperUnitBound; *OverdeterminedSystem = *LibSBMLc::OverdeterminedSystem; *InvalidModelSBOTerm = *LibSBMLc::InvalidModelSBOTerm; *InvalidFunctionDefSBOTerm = *LibSBMLc::InvalidFunctionDefSBOTerm; *InvalidParameterSBOTerm = *LibSBMLc::InvalidParameterSBOTerm; *InvalidInitAssignSBOTerm = *LibSBMLc::InvalidInitAssignSBOTerm; *InvalidRuleSBOTerm = *LibSBMLc::InvalidRuleSBOTerm; *InvalidConstraintSBOTerm = *LibSBMLc::InvalidConstraintSBOTerm; *InvalidReactionSBOTerm = *LibSBMLc::InvalidReactionSBOTerm; *InvalidSpeciesReferenceSBOTerm = *LibSBMLc::InvalidSpeciesReferenceSBOTerm; *InvalidKineticLawSBOTerm = *LibSBMLc::InvalidKineticLawSBOTerm; *InvalidEventSBOTerm = *LibSBMLc::InvalidEventSBOTerm; *InvalidEventAssignmentSBOTerm = *LibSBMLc::InvalidEventAssignmentSBOTerm; *InvalidCompartmentSBOTerm = *LibSBMLc::InvalidCompartmentSBOTerm; *InvalidSpeciesSBOTerm = *LibSBMLc::InvalidSpeciesSBOTerm; *InvalidCompartmentTypeSBOTerm = *LibSBMLc::InvalidCompartmentTypeSBOTerm; *InvalidSpeciesTypeSBOTerm = *LibSBMLc::InvalidSpeciesTypeSBOTerm; *InvalidTriggerSBOTerm = *LibSBMLc::InvalidTriggerSBOTerm; *InvalidDelaySBOTerm = *LibSBMLc::InvalidDelaySBOTerm; *InvalidLocalParameterSBOTerm = *LibSBMLc::InvalidLocalParameterSBOTerm; *InvalidSBMLElementSBOTerm = *LibSBMLc::InvalidSBMLElementSBOTerm; *NotesNotInXHTMLNamespace = *LibSBMLc::NotesNotInXHTMLNamespace; *NotesContainsXMLDecl = *LibSBMLc::NotesContainsXMLDecl; *NotesContainsDOCTYPE = *LibSBMLc::NotesContainsDOCTYPE; *InvalidNotesContent = *LibSBMLc::InvalidNotesContent; *OnlyOneNotesElementAllowed = *LibSBMLc::OnlyOneNotesElementAllowed; *InvalidNamespaceOnSBML = *LibSBMLc::InvalidNamespaceOnSBML; *MissingOrInconsistentLevel = *LibSBMLc::MissingOrInconsistentLevel; *MissingOrInconsistentVersion = *LibSBMLc::MissingOrInconsistentVersion; *PackageNSMustMatch = *LibSBMLc::PackageNSMustMatch; *LevelPositiveInteger = *LibSBMLc::LevelPositiveInteger; *VersionPositiveInteger = *LibSBMLc::VersionPositiveInteger; *AllowedAttributesOnSBML = *LibSBMLc::AllowedAttributesOnSBML; *L3PackageOnLowerSBML = *LibSBMLc::L3PackageOnLowerSBML; *MissingModel = *LibSBMLc::MissingModel; *IncorrectOrderInModel = *LibSBMLc::IncorrectOrderInModel; *EmptyListElement = *LibSBMLc::EmptyListElement; *NeedCompartmentIfHaveSpecies = *LibSBMLc::NeedCompartmentIfHaveSpecies; *OneOfEachListOf = *LibSBMLc::OneOfEachListOf; *OnlyFuncDefsInListOfFuncDefs = *LibSBMLc::OnlyFuncDefsInListOfFuncDefs; *OnlyUnitDefsInListOfUnitDefs = *LibSBMLc::OnlyUnitDefsInListOfUnitDefs; *OnlyCompartmentsInListOfCompartments = *LibSBMLc::OnlyCompartmentsInListOfCompartments; *OnlySpeciesInListOfSpecies = *LibSBMLc::OnlySpeciesInListOfSpecies; *OnlyParametersInListOfParameters = *LibSBMLc::OnlyParametersInListOfParameters; *OnlyInitAssignsInListOfInitAssigns = *LibSBMLc::OnlyInitAssignsInListOfInitAssigns; *OnlyRulesInListOfRules = *LibSBMLc::OnlyRulesInListOfRules; *OnlyConstraintsInListOfConstraints = *LibSBMLc::OnlyConstraintsInListOfConstraints; *OnlyReactionsInListOfReactions = *LibSBMLc::OnlyReactionsInListOfReactions; *OnlyEventsInListOfEvents = *LibSBMLc::OnlyEventsInListOfEvents; *L3ConversionFactorOnModel = *LibSBMLc::L3ConversionFactorOnModel; *L3TimeUnitsOnModel = *LibSBMLc::L3TimeUnitsOnModel; *L3VolumeUnitsOnModel = *LibSBMLc::L3VolumeUnitsOnModel; *L3AreaUnitsOnModel = *LibSBMLc::L3AreaUnitsOnModel; *L3LengthUnitsOnModel = *LibSBMLc::L3LengthUnitsOnModel; *L3ExtentUnitsOnModel = *LibSBMLc::L3ExtentUnitsOnModel; *AllowedAttributesOnModel = *LibSBMLc::AllowedAttributesOnModel; *AllowedAttributesOnListOfFuncs = *LibSBMLc::AllowedAttributesOnListOfFuncs; *AllowedAttributesOnListOfUnitDefs = *LibSBMLc::AllowedAttributesOnListOfUnitDefs; *AllowedAttributesOnListOfComps = *LibSBMLc::AllowedAttributesOnListOfComps; *AllowedAttributesOnListOfSpecies = *LibSBMLc::AllowedAttributesOnListOfSpecies; *AllowedAttributesOnListOfParams = *LibSBMLc::AllowedAttributesOnListOfParams; *AllowedAttributesOnListOfInitAssign = *LibSBMLc::AllowedAttributesOnListOfInitAssign; *AllowedAttributesOnListOfRules = *LibSBMLc::AllowedAttributesOnListOfRules; *AllowedAttributesOnListOfConstraints = *LibSBMLc::AllowedAttributesOnListOfConstraints; *AllowedAttributesOnListOfReactions = *LibSBMLc::AllowedAttributesOnListOfReactions; *AllowedAttributesOnListOfEvents = *LibSBMLc::AllowedAttributesOnListOfEvents; *L3V2SubstanceUnitsOnModel = *LibSBMLc::L3V2SubstanceUnitsOnModel; *FunctionDefMathNotLambda = *LibSBMLc::FunctionDefMathNotLambda; *InvalidApplyCiInLambda = *LibSBMLc::InvalidApplyCiInLambda; *RecursiveFunctionDefinition = *LibSBMLc::RecursiveFunctionDefinition; *InvalidCiInLambda = *LibSBMLc::InvalidCiInLambda; *InvalidFunctionDefReturnType = *LibSBMLc::InvalidFunctionDefReturnType; *OneMathElementPerFunc = *LibSBMLc::OneMathElementPerFunc; *AllowedAttributesOnFunc = *LibSBMLc::AllowedAttributesOnFunc; *OnlyCiInsideBVar = *LibSBMLc::OnlyCiInsideBVar; *InvalidUnitDefId = *LibSBMLc::InvalidUnitDefId; *InvalidSubstanceRedefinition = *LibSBMLc::InvalidSubstanceRedefinition; *InvalidLengthRedefinition = *LibSBMLc::InvalidLengthRedefinition; *InvalidAreaRedefinition = *LibSBMLc::InvalidAreaRedefinition; *InvalidTimeRedefinition = *LibSBMLc::InvalidTimeRedefinition; *InvalidVolumeRedefinition = *LibSBMLc::InvalidVolumeRedefinition; *VolumeLitreDefExponentNotOne = *LibSBMLc::VolumeLitreDefExponentNotOne; *VolumeMetreDefExponentNot3 = *LibSBMLc::VolumeMetreDefExponentNot3; *EmptyListOfUnits = *LibSBMLc::EmptyListOfUnits; *InvalidUnitKind = *LibSBMLc::InvalidUnitKind; *OffsetNoLongerValid = *LibSBMLc::OffsetNoLongerValid; *CelsiusNoLongerValid = *LibSBMLc::CelsiusNoLongerValid; *EmptyUnitListElement = *LibSBMLc::EmptyUnitListElement; *OneListOfUnitsPerUnitDef = *LibSBMLc::OneListOfUnitsPerUnitDef; *OnlyUnitsInListOfUnits = *LibSBMLc::OnlyUnitsInListOfUnits; *AllowedAttributesOnUnitDefinition = *LibSBMLc::AllowedAttributesOnUnitDefinition; *AllowedAttributesOnListOfUnits = *LibSBMLc::AllowedAttributesOnListOfUnits; *AllowedAttributesOnUnit = *LibSBMLc::AllowedAttributesOnUnit; *ZeroDimensionalCompartmentSize = *LibSBMLc::ZeroDimensionalCompartmentSize; *ZeroDimensionalCompartmentUnits = *LibSBMLc::ZeroDimensionalCompartmentUnits; *ZeroDimensionalCompartmentConst = *LibSBMLc::ZeroDimensionalCompartmentConst; *UndefinedOutsideCompartment = *LibSBMLc::UndefinedOutsideCompartment; *RecursiveCompartmentContainment = *LibSBMLc::RecursiveCompartmentContainment; *ZeroDCompartmentContainment = *LibSBMLc::ZeroDCompartmentContainment; *Invalid1DCompartmentUnits = *LibSBMLc::Invalid1DCompartmentUnits; *Invalid2DCompartmentUnits = *LibSBMLc::Invalid2DCompartmentUnits; *Invalid3DCompartmentUnits = *LibSBMLc::Invalid3DCompartmentUnits; *InvalidCompartmentTypeRef = *LibSBMLc::InvalidCompartmentTypeRef; *OneDimensionalCompartmentUnits = *LibSBMLc::OneDimensionalCompartmentUnits; *TwoDimensionalCompartmentUnits = *LibSBMLc::TwoDimensionalCompartmentUnits; *ThreeDimensionalCompartmentUnits = *LibSBMLc::ThreeDimensionalCompartmentUnits; *AllowedAttributesOnCompartment = *LibSBMLc::AllowedAttributesOnCompartment; *NoUnitsOnCompartment = *LibSBMLc::NoUnitsOnCompartment; *InvalidSpeciesCompartmentRef = *LibSBMLc::InvalidSpeciesCompartmentRef; *HasOnlySubsNoSpatialUnits = *LibSBMLc::HasOnlySubsNoSpatialUnits; *NoSpatialUnitsInZeroD = *LibSBMLc::NoSpatialUnitsInZeroD; *NoConcentrationInZeroD = *LibSBMLc::NoConcentrationInZeroD; *SpatialUnitsInOneD = *LibSBMLc::SpatialUnitsInOneD; *SpatialUnitsInTwoD = *LibSBMLc::SpatialUnitsInTwoD; *SpatialUnitsInThreeD = *LibSBMLc::SpatialUnitsInThreeD; *InvalidSpeciesSusbstanceUnits = *LibSBMLc::InvalidSpeciesSusbstanceUnits; *BothAmountAndConcentrationSet = *LibSBMLc::BothAmountAndConcentrationSet; *NonBoundarySpeciesAssignedAndUsed = *LibSBMLc::NonBoundarySpeciesAssignedAndUsed; *NonConstantSpeciesUsed = *LibSBMLc::NonConstantSpeciesUsed; *InvalidSpeciesTypeRef = *LibSBMLc::InvalidSpeciesTypeRef; *MultSpeciesSameTypeInCompartment = *LibSBMLc::MultSpeciesSameTypeInCompartment; *MissingSpeciesCompartment = *LibSBMLc::MissingSpeciesCompartment; *SpatialSizeUnitsRemoved = *LibSBMLc::SpatialSizeUnitsRemoved; *SubstanceUnitsOnSpecies = *LibSBMLc::SubstanceUnitsOnSpecies; *ConversionFactorOnSpecies = *LibSBMLc::ConversionFactorOnSpecies; *AllowedAttributesOnSpecies = *LibSBMLc::AllowedAttributesOnSpecies; *InvalidParameterUnits = *LibSBMLc::InvalidParameterUnits; *ParameterUnits = *LibSBMLc::ParameterUnits; *ConversionFactorMustConstant = *LibSBMLc::ConversionFactorMustConstant; *AllowedAttributesOnParameter = *LibSBMLc::AllowedAttributesOnParameter; *InvalidInitAssignSymbol = *LibSBMLc::InvalidInitAssignSymbol; *MultipleInitAssignments = *LibSBMLc::MultipleInitAssignments; *InitAssignmentAndRuleForSameId = *LibSBMLc::InitAssignmentAndRuleForSameId; *OneMathElementPerInitialAssign = *LibSBMLc::OneMathElementPerInitialAssign; *AllowedAttributesOnInitialAssign = *LibSBMLc::AllowedAttributesOnInitialAssign; *InitAssignmentCannotRef0DComp = *LibSBMLc::InitAssignmentCannotRef0DComp; *InvalidAssignRuleVariable = *LibSBMLc::InvalidAssignRuleVariable; *InvalidRateRuleVariable = *LibSBMLc::InvalidRateRuleVariable; *AssignmentToConstantEntity = *LibSBMLc::AssignmentToConstantEntity; *RateRuleForConstantEntity = *LibSBMLc::RateRuleForConstantEntity; *RepeatedRule10304 = *LibSBMLc::RepeatedRule10304; *CircularRuleDependency = *LibSBMLc::CircularRuleDependency; *OneMathElementPerRule = *LibSBMLc::OneMathElementPerRule; *AllowedAttributesOnAssignRule = *LibSBMLc::AllowedAttributesOnAssignRule; *AllowedAttributesOnRateRule = *LibSBMLc::AllowedAttributesOnRateRule; *AllowedAttributesOnAlgRule = *LibSBMLc::AllowedAttributesOnAlgRule; *RuleCannotRef0DComp = *LibSBMLc::RuleCannotRef0DComp; *CircularDependencyRateOf = *LibSBMLc::CircularDependencyRateOf; *ConstraintMathNotBoolean = *LibSBMLc::ConstraintMathNotBoolean; *IncorrectOrderInConstraint = *LibSBMLc::IncorrectOrderInConstraint; *ConstraintNotInXHTMLNamespace = *LibSBMLc::ConstraintNotInXHTMLNamespace; *ConstraintContainsXMLDecl = *LibSBMLc::ConstraintContainsXMLDecl; *ConstraintContainsDOCTYPE = *LibSBMLc::ConstraintContainsDOCTYPE; *InvalidConstraintContent = *LibSBMLc::InvalidConstraintContent; *OneMathElementPerConstraint = *LibSBMLc::OneMathElementPerConstraint; *OneMessageElementPerConstraint = *LibSBMLc::OneMessageElementPerConstraint; *AllowedAttributesOnConstraint = *LibSBMLc::AllowedAttributesOnConstraint; *NoReactantsOrProducts = *LibSBMLc::NoReactantsOrProducts; *IncorrectOrderInReaction = *LibSBMLc::IncorrectOrderInReaction; *EmptyListInReaction = *LibSBMLc::EmptyListInReaction; *InvalidReactantsProductsList = *LibSBMLc::InvalidReactantsProductsList; *InvalidModifiersList = *LibSBMLc::InvalidModifiersList; *OneSubElementPerReaction = *LibSBMLc::OneSubElementPerReaction; *CompartmentOnReaction = *LibSBMLc::CompartmentOnReaction; *AllowedAttributesOnReaction = *LibSBMLc::AllowedAttributesOnReaction; *InvalidSpeciesReference = *LibSBMLc::InvalidSpeciesReference; *RepeatedRule20611 = *LibSBMLc::RepeatedRule20611; *BothStoichiometryAndMath = *LibSBMLc::BothStoichiometryAndMath; *AllowedAttributesOnSpeciesReference = *LibSBMLc::AllowedAttributesOnSpeciesReference; *AllowedAttributesOnModifier = *LibSBMLc::AllowedAttributesOnModifier; *UndeclaredSpeciesRef = *LibSBMLc::UndeclaredSpeciesRef; *IncorrectOrderInKineticLaw = *LibSBMLc::IncorrectOrderInKineticLaw; *EmptyListInKineticLaw = *LibSBMLc::EmptyListInKineticLaw; *NonConstantLocalParameter = *LibSBMLc::NonConstantLocalParameter; *SubsUnitsNoLongerValid = *LibSBMLc::SubsUnitsNoLongerValid; *TimeUnitsNoLongerValid = *LibSBMLc::TimeUnitsNoLongerValid; *OneListOfPerKineticLaw = *LibSBMLc::OneListOfPerKineticLaw; *OnlyLocalParamsInListOfLocalParams = *LibSBMLc::OnlyLocalParamsInListOfLocalParams; *AllowedAttributesOnListOfLocalParam = *LibSBMLc::AllowedAttributesOnListOfLocalParam; *OneMathPerKineticLaw = *LibSBMLc::OneMathPerKineticLaw; *UndeclaredSpeciesInStoichMath = *LibSBMLc::UndeclaredSpeciesInStoichMath; *AllowedAttributesOnKineticLaw = *LibSBMLc::AllowedAttributesOnKineticLaw; *AllowedAttributesOnListOfSpeciesRef = *LibSBMLc::AllowedAttributesOnListOfSpeciesRef; *AllowedAttributesOnListOfMods = *LibSBMLc::AllowedAttributesOnListOfMods; *L3V2FastDeprecated = *LibSBMLc::L3V2FastDeprecated; *AllowedAttributesOnLocalParameter = *LibSBMLc::AllowedAttributesOnLocalParameter; *LocalParameterShadowsSpecies = *LibSBMLc::LocalParameterShadowsSpecies; *MissingTriggerInEvent = *LibSBMLc::MissingTriggerInEvent; *TriggerMathNotBoolean = *LibSBMLc::TriggerMathNotBoolean; *MissingEventAssignment = *LibSBMLc::MissingEventAssignment; *TimeUnitsEvent = *LibSBMLc::TimeUnitsEvent; *IncorrectOrderInEvent = *LibSBMLc::IncorrectOrderInEvent; *ValuesFromTriggerTimeNeedDelay = *LibSBMLc::ValuesFromTriggerTimeNeedDelay; *DelayNeedsValuesFromTriggerTime = *LibSBMLc::DelayNeedsValuesFromTriggerTime; *OneMathPerTrigger = *LibSBMLc::OneMathPerTrigger; *OneMathPerDelay = *LibSBMLc::OneMathPerDelay; *InvalidEventAssignmentVariable = *LibSBMLc::InvalidEventAssignmentVariable; *EventAssignmentForConstantEntity = *LibSBMLc::EventAssignmentForConstantEntity; *OneMathPerEventAssignment = *LibSBMLc::OneMathPerEventAssignment; *AllowedAttributesOnEventAssignment = *LibSBMLc::AllowedAttributesOnEventAssignment; *OnlyOneDelayPerEvent = *LibSBMLc::OnlyOneDelayPerEvent; *OneListOfEventAssignmentsPerEvent = *LibSBMLc::OneListOfEventAssignmentsPerEvent; *OnlyEventAssignInListOfEventAssign = *LibSBMLc::OnlyEventAssignInListOfEventAssign; *AllowedAttributesOnListOfEventAssign = *LibSBMLc::AllowedAttributesOnListOfEventAssign; *AllowedAttributesOnEvent = *LibSBMLc::AllowedAttributesOnEvent; *AllowedAttributesOnTrigger = *LibSBMLc::AllowedAttributesOnTrigger; *AllowedAttributesOnDelay = *LibSBMLc::AllowedAttributesOnDelay; *PersistentNotBoolean = *LibSBMLc::PersistentNotBoolean; *InitialValueNotBoolean = *LibSBMLc::InitialValueNotBoolean; *OnlyOnePriorityPerEvent = *LibSBMLc::OnlyOnePriorityPerEvent; *OneMathPerPriority = *LibSBMLc::OneMathPerPriority; *AllowedAttributesOnPriority = *LibSBMLc::AllowedAttributesOnPriority; *GeneralWarningNotSpecified = *LibSBMLc::GeneralWarningNotSpecified; *CompartmentShouldHaveSize = *LibSBMLc::CompartmentShouldHaveSize; *SpeciesShouldHaveValue = *LibSBMLc::SpeciesShouldHaveValue; *ParameterShouldHaveUnits = *LibSBMLc::ParameterShouldHaveUnits; *ParameterShouldHaveValue = *LibSBMLc::ParameterShouldHaveValue; *LocalParameterShadowsId = *LibSBMLc::LocalParameterShadowsId; *LibSBMLAdditionalCodesLowerBound = *LibSBMLc::LibSBMLAdditionalCodesLowerBound; *CannotConvertToL1V1 = *LibSBMLc::CannotConvertToL1V1; *NoEventsInL1 = *LibSBMLc::NoEventsInL1; *NoFunctionDefinitionsInL1 = *LibSBMLc::NoFunctionDefinitionsInL1; *NoConstraintsInL1 = *LibSBMLc::NoConstraintsInL1; *NoInitialAssignmentsInL1 = *LibSBMLc::NoInitialAssignmentsInL1; *NoSpeciesTypesInL1 = *LibSBMLc::NoSpeciesTypesInL1; *NoCompartmentTypeInL1 = *LibSBMLc::NoCompartmentTypeInL1; *NoNon3DCompartmentsInL1 = *LibSBMLc::NoNon3DCompartmentsInL1; *NoFancyStoichiometryMathInL1 = *LibSBMLc::NoFancyStoichiometryMathInL1; *NoNonIntegerStoichiometryInL1 = *LibSBMLc::NoNonIntegerStoichiometryInL1; *NoUnitMultipliersOrOffsetsInL1 = *LibSBMLc::NoUnitMultipliersOrOffsetsInL1; *SpeciesCompartmentRequiredInL1 = *LibSBMLc::SpeciesCompartmentRequiredInL1; *NoSpeciesSpatialSizeUnitsInL1 = *LibSBMLc::NoSpeciesSpatialSizeUnitsInL1; *NoSBOTermsInL1 = *LibSBMLc::NoSBOTermsInL1; *StrictUnitsRequiredInL1 = *LibSBMLc::StrictUnitsRequiredInL1; *ConversionFactorNotInL1 = *LibSBMLc::ConversionFactorNotInL1; *CompartmentNotOnL1Reaction = *LibSBMLc::CompartmentNotOnL1Reaction; *ExtentUnitsNotSubstance = *LibSBMLc::ExtentUnitsNotSubstance; *GlobalUnitsNotDeclared = *LibSBMLc::GlobalUnitsNotDeclared; *HasOnlySubstanceUnitsNotinL1 = *LibSBMLc::HasOnlySubstanceUnitsNotinL1; *AvogadroNotSupported = *LibSBMLc::AvogadroNotSupported; *NoConstraintsInL2v1 = *LibSBMLc::NoConstraintsInL2v1; *NoInitialAssignmentsInL2v1 = *LibSBMLc::NoInitialAssignmentsInL2v1; *NoSpeciesTypeInL2v1 = *LibSBMLc::NoSpeciesTypeInL2v1; *NoCompartmentTypeInL2v1 = *LibSBMLc::NoCompartmentTypeInL2v1; *NoSBOTermsInL2v1 = *LibSBMLc::NoSBOTermsInL2v1; *NoIdOnSpeciesReferenceInL2v1 = *LibSBMLc::NoIdOnSpeciesReferenceInL2v1; *NoDelayedEventAssignmentInL2v1 = *LibSBMLc::NoDelayedEventAssignmentInL2v1; *StrictUnitsRequiredInL2v1 = *LibSBMLc::StrictUnitsRequiredInL2v1; *IntegerSpatialDimensions = *LibSBMLc::IntegerSpatialDimensions; *StoichiometryMathNotYetSupported = *LibSBMLc::StoichiometryMathNotYetSupported; *PriorityLostFromL3 = *LibSBMLc::PriorityLostFromL3; *NonPersistentNotSupported = *LibSBMLc::NonPersistentNotSupported; *InitialValueFalseEventNotSupported = *LibSBMLc::InitialValueFalseEventNotSupported; *SBOTermNotUniversalInL2v2 = *LibSBMLc::SBOTermNotUniversalInL2v2; *NoUnitOffsetInL2v2 = *LibSBMLc::NoUnitOffsetInL2v2; *NoKineticLawTimeUnitsInL2v2 = *LibSBMLc::NoKineticLawTimeUnitsInL2v2; *NoKineticLawSubstanceUnitsInL2v2 = *LibSBMLc::NoKineticLawSubstanceUnitsInL2v2; *NoDelayedEventAssignmentInL2v2 = *LibSBMLc::NoDelayedEventAssignmentInL2v2; *ModelSBOBranchChangedBeyondL2v2 = *LibSBMLc::ModelSBOBranchChangedBeyondL2v2; *StrictUnitsRequiredInL2v2 = *LibSBMLc::StrictUnitsRequiredInL2v2; *StrictSBORequiredInL2v2 = *LibSBMLc::StrictSBORequiredInL2v2; *DuplicateAnnotationInvalidInL2v2 = *LibSBMLc::DuplicateAnnotationInvalidInL2v2; *NoUnitOffsetInL2v3 = *LibSBMLc::NoUnitOffsetInL2v3; *NoKineticLawTimeUnitsInL2v3 = *LibSBMLc::NoKineticLawTimeUnitsInL2v3; *NoKineticLawSubstanceUnitsInL2v3 = *LibSBMLc::NoKineticLawSubstanceUnitsInL2v3; *NoSpeciesSpatialSizeUnitsInL2v3 = *LibSBMLc::NoSpeciesSpatialSizeUnitsInL2v3; *NoEventTimeUnitsInL2v3 = *LibSBMLc::NoEventTimeUnitsInL2v3; *NoDelayedEventAssignmentInL2v3 = *LibSBMLc::NoDelayedEventAssignmentInL2v3; *ModelSBOBranchChangedBeyondL2v3 = *LibSBMLc::ModelSBOBranchChangedBeyondL2v3; *StrictUnitsRequiredInL2v3 = *LibSBMLc::StrictUnitsRequiredInL2v3; *StrictSBORequiredInL2v3 = *LibSBMLc::StrictSBORequiredInL2v3; *DuplicateAnnotationInvalidInL2v3 = *LibSBMLc::DuplicateAnnotationInvalidInL2v3; *NoUnitOffsetInL2v4 = *LibSBMLc::NoUnitOffsetInL2v4; *NoKineticLawTimeUnitsInL2v4 = *LibSBMLc::NoKineticLawTimeUnitsInL2v4; *NoKineticLawSubstanceUnitsInL2v4 = *LibSBMLc::NoKineticLawSubstanceUnitsInL2v4; *NoSpeciesSpatialSizeUnitsInL2v4 = *LibSBMLc::NoSpeciesSpatialSizeUnitsInL2v4; *NoEventTimeUnitsInL2v4 = *LibSBMLc::NoEventTimeUnitsInL2v4; *ModelSBOBranchChangedInL2v4 = *LibSBMLc::ModelSBOBranchChangedInL2v4; *DuplicateAnnotationInvalidInL2v4 = *LibSBMLc::DuplicateAnnotationInvalidInL2v4; *NoSpeciesTypeInL3v1 = *LibSBMLc::NoSpeciesTypeInL3v1; *NoCompartmentTypeInL3v1 = *LibSBMLc::NoCompartmentTypeInL3v1; *NoUnitOffsetInL3v1 = *LibSBMLc::NoUnitOffsetInL3v1; *NoKineticLawTimeUnitsInL3v1 = *LibSBMLc::NoKineticLawTimeUnitsInL3v1; *NoKineticLawSubstanceUnitsInL3v1 = *LibSBMLc::NoKineticLawSubstanceUnitsInL3v1; *NoSpeciesSpatialSizeUnitsInL3v1 = *LibSBMLc::NoSpeciesSpatialSizeUnitsInL3v1; *NoEventTimeUnitsInL3v1 = *LibSBMLc::NoEventTimeUnitsInL3v1; *ModelSBOBranchChangedInL3v1 = *LibSBMLc::ModelSBOBranchChangedInL3v1; *DuplicateAnnotationInvalidInL3v1 = *LibSBMLc::DuplicateAnnotationInvalidInL3v1; *NoCompartmentOutsideInL3v1 = *LibSBMLc::NoCompartmentOutsideInL3v1; *NoStoichiometryMathInL3v1 = *LibSBMLc::NoStoichiometryMathInL3v1; *DoubleExponentNotSupported = *LibSBMLc::DoubleExponentNotSupported; *MathMLElementNotSupported = *LibSBMLc::MathMLElementNotSupported; *EmptyListOfElementNotSupported = *LibSBMLc::EmptyListOfElementNotSupported; *MissingMathElementNotSupported = *LibSBMLc::MissingMathElementNotSupported; *MissingTriggerElementNotSupported = *LibSBMLc::MissingTriggerElementNotSupported; *BooleanNumericDiscrepancy = *LibSBMLc::BooleanNumericDiscrepancy; *IdNameSBaseInL3V2 = *LibSBMLc::IdNameSBaseInL3V2; *MissingParticipantsNotSupported = *LibSBMLc::MissingParticipantsNotSupported; *ConvertibleMathInitialAssignment = *LibSBMLc::ConvertibleMathInitialAssignment; *FastReactionsNotSupported = *LibSBMLc::FastReactionsNotSupported; *SpeciesRefIdInMathMLNotSupported = *LibSBMLc::SpeciesRefIdInMathMLNotSupported; *InvalidSBMLLevelVersion = *LibSBMLc::InvalidSBMLLevelVersion; *InvalidPackageLevelVersion = *LibSBMLc::InvalidPackageLevelVersion; *AnnotationNotesNotAllowedLevel1 = *LibSBMLc::AnnotationNotesNotAllowedLevel1; *InvalidRuleOrdering = *LibSBMLc::InvalidRuleOrdering; *RequiredPackagePresent = *LibSBMLc::RequiredPackagePresent; *UnrequiredPackagePresent = *LibSBMLc::UnrequiredPackagePresent; *PackageRequiredShouldBeFalse = *LibSBMLc::PackageRequiredShouldBeFalse; *SubsUnitsAllowedInKL = *LibSBMLc::SubsUnitsAllowedInKL; *TimeUnitsAllowedInKL = *LibSBMLc::TimeUnitsAllowedInKL; *FormulaInLevel1KL = *LibSBMLc::FormulaInLevel1KL; *L3SubstanceUnitsOnModel = *LibSBMLc::L3SubstanceUnitsOnModel; *StoichiometryMathMissingMath = *LibSBMLc::StoichiometryMathMissingMath; *TimeUnitsRemoved = *LibSBMLc::TimeUnitsRemoved; *BadMathML = *LibSBMLc::BadMathML; *FailedMathMLReadOfDouble = *LibSBMLc::FailedMathMLReadOfDouble; *FailedMathMLReadOfInteger = *LibSBMLc::FailedMathMLReadOfInteger; *FailedMathMLReadOfExponential = *LibSBMLc::FailedMathMLReadOfExponential; *FailedMathMLReadOfRational = *LibSBMLc::FailedMathMLReadOfRational; *BadMathMLNodeType = *LibSBMLc::BadMathMLNodeType; *InvalidMathMLAttribute = *LibSBMLc::InvalidMathMLAttribute; *NoTimeSymbolInFunctionDef = *LibSBMLc::NoTimeSymbolInFunctionDef; *NoBodyInFunctionDef = *LibSBMLc::NoBodyInFunctionDef; *DanglingUnitSIdRef = *LibSBMLc::DanglingUnitSIdRef; *RDFMissingAboutTag = *LibSBMLc::RDFMissingAboutTag; *RDFEmptyAboutTag = *LibSBMLc::RDFEmptyAboutTag; *RDFAboutTagNotMetaid = *LibSBMLc::RDFAboutTagNotMetaid; *RDFNotCompleteModelHistory = *LibSBMLc::RDFNotCompleteModelHistory; *RDFNotModelHistory = *LibSBMLc::RDFNotModelHistory; *AnnotationNotElement = *LibSBMLc::AnnotationNotElement; *NestedAnnotationNotAllowed = *LibSBMLc::NestedAnnotationNotAllowed; *InconsistentArgUnitsWarnings = *LibSBMLc::InconsistentArgUnitsWarnings; *InconsistentPowerUnitsWarnings = *LibSBMLc::InconsistentPowerUnitsWarnings; *InconsistentExponUnitsWarnings = *LibSBMLc::InconsistentExponUnitsWarnings; *UndeclaredUnits = *LibSBMLc::UndeclaredUnits; *UndeclaredTimeUnitsL3 = *LibSBMLc::UndeclaredTimeUnitsL3; *UndeclaredExtentUnitsL3 = *LibSBMLc::UndeclaredExtentUnitsL3; *UndeclaredObjectUnitsL3 = *LibSBMLc::UndeclaredObjectUnitsL3; *CannotVerifyUnitsObjectNoMath = *LibSBMLc::CannotVerifyUnitsObjectNoMath; *UnrecognisedSBOTerm = *LibSBMLc::UnrecognisedSBOTerm; *ObseleteSBOTerm = *LibSBMLc::ObseleteSBOTerm; *IncorrectCompartmentSpatialDimensions = *LibSBMLc::IncorrectCompartmentSpatialDimensions; *CompartmentTypeNotValidAttribute = *LibSBMLc::CompartmentTypeNotValidAttribute; *ConstantNotValidAttribute = *LibSBMLc::ConstantNotValidAttribute; *MetaIdNotValidAttribute = *LibSBMLc::MetaIdNotValidAttribute; *SBOTermNotValidAttributeBeforeL2V3 = *LibSBMLc::SBOTermNotValidAttributeBeforeL2V3; *InvalidL1CompartmentUnits = *LibSBMLc::InvalidL1CompartmentUnits; *L1V1CompartmentVolumeReqd = *LibSBMLc::L1V1CompartmentVolumeReqd; *CompartmentTypeNotValidComponent = *LibSBMLc::CompartmentTypeNotValidComponent; *ConstraintNotValidComponent = *LibSBMLc::ConstraintNotValidComponent; *EventNotValidComponent = *LibSBMLc::EventNotValidComponent; *SBOTermNotValidAttributeBeforeL2V2 = *LibSBMLc::SBOTermNotValidAttributeBeforeL2V2; *FuncDefNotValidComponent = *LibSBMLc::FuncDefNotValidComponent; *InitialAssignNotValidComponent = *LibSBMLc::InitialAssignNotValidComponent; *VariableNotValidAttribute = *LibSBMLc::VariableNotValidAttribute; *UnitsNotValidAttribute = *LibSBMLc::UnitsNotValidAttribute; *ConstantSpeciesNotValidAttribute = *LibSBMLc::ConstantSpeciesNotValidAttribute; *SpatialSizeUnitsNotValidAttribute = *LibSBMLc::SpatialSizeUnitsNotValidAttribute; *SpeciesTypeNotValidAttribute = *LibSBMLc::SpeciesTypeNotValidAttribute; *HasOnlySubsUnitsNotValidAttribute = *LibSBMLc::HasOnlySubsUnitsNotValidAttribute; *IdNotValidAttribute = *LibSBMLc::IdNotValidAttribute; *NameNotValidAttribute = *LibSBMLc::NameNotValidAttribute; *SpeciesTypeNotValidComponent = *LibSBMLc::SpeciesTypeNotValidComponent; *StoichiometryMathNotValidComponent = *LibSBMLc::StoichiometryMathNotValidComponent; *MultiplierNotValidAttribute = *LibSBMLc::MultiplierNotValidAttribute; *OffsetNotValidAttribute = *LibSBMLc::OffsetNotValidAttribute; *L3SpatialDimensionsUnset = *LibSBMLc::L3SpatialDimensionsUnset; *OperationInterrupted = *LibSBMLc::OperationInterrupted; *UnknownCoreAttribute = *LibSBMLc::UnknownCoreAttribute; *UnknownPackageAttribute = *LibSBMLc::UnknownPackageAttribute; *PackageConversionNotSupported = *LibSBMLc::PackageConversionNotSupported; *InvalidTargetLevelVersion = *LibSBMLc::InvalidTargetLevelVersion; *L3NotSupported = *LibSBMLc::L3NotSupported; *SBMLCodesUpperBound = *LibSBMLc::SBMLCodesUpperBound; *LIBSBML_CAT_SBML = *LibSBMLc::LIBSBML_CAT_SBML; *LIBSBML_CAT_SBML_L1_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L1_COMPAT; *LIBSBML_CAT_SBML_L2V1_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L2V1_COMPAT; *LIBSBML_CAT_SBML_L2V2_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L2V2_COMPAT; *LIBSBML_CAT_GENERAL_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_GENERAL_CONSISTENCY; *LIBSBML_CAT_IDENTIFIER_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_IDENTIFIER_CONSISTENCY; *LIBSBML_CAT_UNITS_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_UNITS_CONSISTENCY; *LIBSBML_CAT_MATHML_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_MATHML_CONSISTENCY; *LIBSBML_CAT_SBO_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_SBO_CONSISTENCY; *LIBSBML_CAT_OVERDETERMINED_MODEL = *LibSBMLc::LIBSBML_CAT_OVERDETERMINED_MODEL; *LIBSBML_CAT_SBML_L2V3_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L2V3_COMPAT; *LIBSBML_CAT_MODELING_PRACTICE = *LibSBMLc::LIBSBML_CAT_MODELING_PRACTICE; *LIBSBML_CAT_INTERNAL_CONSISTENCY = *LibSBMLc::LIBSBML_CAT_INTERNAL_CONSISTENCY; *LIBSBML_CAT_SBML_L2V4_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L2V4_COMPAT; *LIBSBML_CAT_SBML_L3V1_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L3V1_COMPAT; *LIBSBML_CAT_SBML_L3V2_COMPAT = *LibSBMLc::LIBSBML_CAT_SBML_L3V2_COMPAT; *LIBSBML_CAT_SBML_COMPATIBILITY = *LibSBMLc::LIBSBML_CAT_SBML_COMPATIBILITY; *LIBSBML_SEV_SCHEMA_ERROR = *LibSBMLc::LIBSBML_SEV_SCHEMA_ERROR; *LIBSBML_SEV_GENERAL_WARNING = *LibSBMLc::LIBSBML_SEV_GENERAL_WARNING; *LIBSBML_SEV_NOT_APPLICABLE = *LibSBMLc::LIBSBML_SEV_NOT_APPLICABLE; *LIBSBML_SEV_UNKNOWN = *LibSBMLc::LIBSBML_SEV_UNKNOWN; *MODEL_QUALIFIER = *LibSBMLc::MODEL_QUALIFIER; *BIOLOGICAL_QUALIFIER = *LibSBMLc::BIOLOGICAL_QUALIFIER; *UNKNOWN_QUALIFIER = *LibSBMLc::UNKNOWN_QUALIFIER; *BQM_IS = *LibSBMLc::BQM_IS; *BQM_IS_DESCRIBED_BY = *LibSBMLc::BQM_IS_DESCRIBED_BY; *BQM_IS_DERIVED_FROM = *LibSBMLc::BQM_IS_DERIVED_FROM; *BQM_IS_INSTANCE_OF = *LibSBMLc::BQM_IS_INSTANCE_OF; *BQM_HAS_INSTANCE = *LibSBMLc::BQM_HAS_INSTANCE; *BQM_UNKNOWN = *LibSBMLc::BQM_UNKNOWN; *BQB_IS = *LibSBMLc::BQB_IS; *BQB_HAS_PART = *LibSBMLc::BQB_HAS_PART; *BQB_IS_PART_OF = *LibSBMLc::BQB_IS_PART_OF; *BQB_IS_VERSION_OF = *LibSBMLc::BQB_IS_VERSION_OF; *BQB_HAS_VERSION = *LibSBMLc::BQB_HAS_VERSION; *BQB_IS_HOMOLOG_TO = *LibSBMLc::BQB_IS_HOMOLOG_TO; *BQB_IS_DESCRIBED_BY = *LibSBMLc::BQB_IS_DESCRIBED_BY; *BQB_IS_ENCODED_BY = *LibSBMLc::BQB_IS_ENCODED_BY; *BQB_ENCODES = *LibSBMLc::BQB_ENCODES; *BQB_OCCURS_IN = *LibSBMLc::BQB_OCCURS_IN; *BQB_HAS_PROPERTY = *LibSBMLc::BQB_HAS_PROPERTY; *BQB_IS_PROPERTY_OF = *LibSBMLc::BQB_IS_PROPERTY_OF; *BQB_HAS_TAXON = *LibSBMLc::BQB_HAS_TAXON; *BQB_UNKNOWN = *LibSBMLc::BQB_UNKNOWN; *EM_L3V2 = *LibSBMLc::EM_L3V2; *EM_DISTRIB = *LibSBMLc::EM_DISTRIB; *EM_ARRAYS = *LibSBMLc::EM_ARRAYS; *EM_REMAINING = *LibSBMLc::EM_REMAINING; *EM_UNKNOWN = *LibSBMLc::EM_UNKNOWN; *ALLOWED_CHILDREN_ANY = *LibSBMLc::ALLOWED_CHILDREN_ANY; *ALLOWED_CHILDREN_ATLEAST = *LibSBMLc::ALLOWED_CHILDREN_ATLEAST; *ALLOWED_CHILDREN_EXACTLY = *LibSBMLc::ALLOWED_CHILDREN_EXACTLY; *ALLOWED_CHILDREN_UNKNOWN = *LibSBMLc::ALLOWED_CHILDREN_UNKNOWN; *AST_PLUS = *LibSBMLc::AST_PLUS; *AST_MINUS = *LibSBMLc::AST_MINUS; *AST_TIMES = *LibSBMLc::AST_TIMES; *AST_DIVIDE = *LibSBMLc::AST_DIVIDE; *AST_POWER = *LibSBMLc::AST_POWER; *AST_INTEGER = *LibSBMLc::AST_INTEGER; *AST_REAL = *LibSBMLc::AST_REAL; *AST_REAL_E = *LibSBMLc::AST_REAL_E; *AST_RATIONAL = *LibSBMLc::AST_RATIONAL; *AST_NAME = *LibSBMLc::AST_NAME; *AST_NAME_AVOGADRO = *LibSBMLc::AST_NAME_AVOGADRO; *AST_NAME_TIME = *LibSBMLc::AST_NAME_TIME; *AST_CONSTANT_E = *LibSBMLc::AST_CONSTANT_E; *AST_CONSTANT_FALSE = *LibSBMLc::AST_CONSTANT_FALSE; *AST_CONSTANT_PI = *LibSBMLc::AST_CONSTANT_PI; *AST_CONSTANT_TRUE = *LibSBMLc::AST_CONSTANT_TRUE; *AST_LAMBDA = *LibSBMLc::AST_LAMBDA; *AST_FUNCTION = *LibSBMLc::AST_FUNCTION; *AST_FUNCTION_ABS = *LibSBMLc::AST_FUNCTION_ABS; *AST_FUNCTION_ARCCOS = *LibSBMLc::AST_FUNCTION_ARCCOS; *AST_FUNCTION_ARCCOSH = *LibSBMLc::AST_FUNCTION_ARCCOSH; *AST_FUNCTION_ARCCOT = *LibSBMLc::AST_FUNCTION_ARCCOT; *AST_FUNCTION_ARCCOTH = *LibSBMLc::AST_FUNCTION_ARCCOTH; *AST_FUNCTION_ARCCSC = *LibSBMLc::AST_FUNCTION_ARCCSC; *AST_FUNCTION_ARCCSCH = *LibSBMLc::AST_FUNCTION_ARCCSCH; *AST_FUNCTION_ARCSEC = *LibSBMLc::AST_FUNCTION_ARCSEC; *AST_FUNCTION_ARCSECH = *LibSBMLc::AST_FUNCTION_ARCSECH; *AST_FUNCTION_ARCSIN = *LibSBMLc::AST_FUNCTION_ARCSIN; *AST_FUNCTION_ARCSINH = *LibSBMLc::AST_FUNCTION_ARCSINH; *AST_FUNCTION_ARCTAN = *LibSBMLc::AST_FUNCTION_ARCTAN; *AST_FUNCTION_ARCTANH = *LibSBMLc::AST_FUNCTION_ARCTANH; *AST_FUNCTION_CEILING = *LibSBMLc::AST_FUNCTION_CEILING; *AST_FUNCTION_COS = *LibSBMLc::AST_FUNCTION_COS; *AST_FUNCTION_COSH = *LibSBMLc::AST_FUNCTION_COSH; *AST_FUNCTION_COT = *LibSBMLc::AST_FUNCTION_COT; *AST_FUNCTION_COTH = *LibSBMLc::AST_FUNCTION_COTH; *AST_FUNCTION_CSC = *LibSBMLc::AST_FUNCTION_CSC; *AST_FUNCTION_CSCH = *LibSBMLc::AST_FUNCTION_CSCH; *AST_FUNCTION_DELAY = *LibSBMLc::AST_FUNCTION_DELAY; *AST_FUNCTION_EXP = *LibSBMLc::AST_FUNCTION_EXP; *AST_FUNCTION_FACTORIAL = *LibSBMLc::AST_FUNCTION_FACTORIAL; *AST_FUNCTION_FLOOR = *LibSBMLc::AST_FUNCTION_FLOOR; *AST_FUNCTION_LN = *LibSBMLc::AST_FUNCTION_LN; *AST_FUNCTION_LOG = *LibSBMLc::AST_FUNCTION_LOG; *AST_FUNCTION_PIECEWISE = *LibSBMLc::AST_FUNCTION_PIECEWISE; *AST_FUNCTION_POWER = *LibSBMLc::AST_FUNCTION_POWER; *AST_FUNCTION_ROOT = *LibSBMLc::AST_FUNCTION_ROOT; *AST_FUNCTION_SEC = *LibSBMLc::AST_FUNCTION_SEC; *AST_FUNCTION_SECH = *LibSBMLc::AST_FUNCTION_SECH; *AST_FUNCTION_SIN = *LibSBMLc::AST_FUNCTION_SIN; *AST_FUNCTION_SINH = *LibSBMLc::AST_FUNCTION_SINH; *AST_FUNCTION_TAN = *LibSBMLc::AST_FUNCTION_TAN; *AST_FUNCTION_TANH = *LibSBMLc::AST_FUNCTION_TANH; *AST_LOGICAL_AND = *LibSBMLc::AST_LOGICAL_AND; *AST_LOGICAL_NOT = *LibSBMLc::AST_LOGICAL_NOT; *AST_LOGICAL_OR = *LibSBMLc::AST_LOGICAL_OR; *AST_LOGICAL_XOR = *LibSBMLc::AST_LOGICAL_XOR; *AST_RELATIONAL_EQ = *LibSBMLc::AST_RELATIONAL_EQ; *AST_RELATIONAL_GEQ = *LibSBMLc::AST_RELATIONAL_GEQ; *AST_RELATIONAL_GT = *LibSBMLc::AST_RELATIONAL_GT; *AST_RELATIONAL_LEQ = *LibSBMLc::AST_RELATIONAL_LEQ; *AST_RELATIONAL_LT = *LibSBMLc::AST_RELATIONAL_LT; *AST_RELATIONAL_NEQ = *LibSBMLc::AST_RELATIONAL_NEQ; *AST_END_OF_CORE = *LibSBMLc::AST_END_OF_CORE; *AST_FUNCTION_MAX = *LibSBMLc::AST_FUNCTION_MAX; *AST_FUNCTION_MIN = *LibSBMLc::AST_FUNCTION_MIN; *AST_FUNCTION_QUOTIENT = *LibSBMLc::AST_FUNCTION_QUOTIENT; *AST_FUNCTION_RATE_OF = *LibSBMLc::AST_FUNCTION_RATE_OF; *AST_FUNCTION_REM = *LibSBMLc::AST_FUNCTION_REM; *AST_LOGICAL_IMPLIES = *LibSBMLc::AST_LOGICAL_IMPLIES; *AST_CSYMBOL_FUNCTION = *LibSBMLc::AST_CSYMBOL_FUNCTION; *AST_DISTRIB_FUNCTION_NORMAL = *LibSBMLc::AST_DISTRIB_FUNCTION_NORMAL; *AST_DISTRIB_FUNCTION_UNIFORM = *LibSBMLc::AST_DISTRIB_FUNCTION_UNIFORM; *AST_DISTRIB_FUNCTION_BERNOULLI = *LibSBMLc::AST_DISTRIB_FUNCTION_BERNOULLI; *AST_DISTRIB_FUNCTION_BINOMIAL = *LibSBMLc::AST_DISTRIB_FUNCTION_BINOMIAL; *AST_DISTRIB_FUNCTION_CAUCHY = *LibSBMLc::AST_DISTRIB_FUNCTION_CAUCHY; *AST_DISTRIB_FUNCTION_CHISQUARE = *LibSBMLc::AST_DISTRIB_FUNCTION_CHISQUARE; *AST_DISTRIB_FUNCTION_EXPONENTIAL = *LibSBMLc::AST_DISTRIB_FUNCTION_EXPONENTIAL; *AST_DISTRIB_FUNCTION_GAMMA = *LibSBMLc::AST_DISTRIB_FUNCTION_GAMMA; *AST_DISTRIB_FUNCTION_LAPLACE = *LibSBMLc::AST_DISTRIB_FUNCTION_LAPLACE; *AST_DISTRIB_FUNCTION_LOGNORMAL = *LibSBMLc::AST_DISTRIB_FUNCTION_LOGNORMAL; *AST_DISTRIB_FUNCTION_POISSON = *LibSBMLc::AST_DISTRIB_FUNCTION_POISSON; *AST_DISTRIB_FUNCTION_RAYLEIGH = *LibSBMLc::AST_DISTRIB_FUNCTION_RAYLEIGH; *AST_LINEAR_ALGEBRA_VECTOR = *LibSBMLc::AST_LINEAR_ALGEBRA_VECTOR; *AST_LINEAR_ALGEBRA_SELECTOR = *LibSBMLc::AST_LINEAR_ALGEBRA_SELECTOR; *AST_LINEAR_ALGEBRA_MATRIX = *LibSBMLc::AST_LINEAR_ALGEBRA_MATRIX; *AST_LINEAR_ALGEBRA_MATRIXROW = *LibSBMLc::AST_LINEAR_ALGEBRA_MATRIXROW; *AST_LINEAR_ALGEBRA_DETERMINANT = *LibSBMLc::AST_LINEAR_ALGEBRA_DETERMINANT; *AST_LINEAR_ALGEBRA_TRANSPOSE = *LibSBMLc::AST_LINEAR_ALGEBRA_TRANSPOSE; *AST_LINEAR_ALGEBRA_VECTOR_PRODUCT = *LibSBMLc::AST_LINEAR_ALGEBRA_VECTOR_PRODUCT; *AST_LINEAR_ALGEBRA_SCALAR_PRODUCT = *LibSBMLc::AST_LINEAR_ALGEBRA_SCALAR_PRODUCT; *AST_LINEAR_ALGEBRA_OUTER_PRODUCT = *LibSBMLc::AST_LINEAR_ALGEBRA_OUTER_PRODUCT; *AST_LOGICAL_EXISTS = *LibSBMLc::AST_LOGICAL_EXISTS; *AST_LOGICAL_FORALL = *LibSBMLc::AST_LOGICAL_FORALL; *AST_STATISTICS_MEAN = *LibSBMLc::AST_STATISTICS_MEAN; *AST_STATISTICS_MEDIAN = *LibSBMLc::AST_STATISTICS_MEDIAN; *AST_STATISTICS_MODE = *LibSBMLc::AST_STATISTICS_MODE; *AST_STATISTICS_MOMENT = *LibSBMLc::AST_STATISTICS_MOMENT; *AST_STATISTICS_SDEV = *LibSBMLc::AST_STATISTICS_SDEV; *AST_STATISTICS_VARIANCE = *LibSBMLc::AST_STATISTICS_VARIANCE; *AST_STATISTICS_MOMENTABOUT = *LibSBMLc::AST_STATISTICS_MOMENTABOUT; *AST_SERIES_PRODUCT = *LibSBMLc::AST_SERIES_PRODUCT; *AST_SERIES_SUM = *LibSBMLc::AST_SERIES_SUM; *AST_SERIES_LIMIT = *LibSBMLc::AST_SERIES_LIMIT; *AST_SERIES_TENDSTO = *LibSBMLc::AST_SERIES_TENDSTO; *AST_ALGEBRA_GCD = *LibSBMLc::AST_ALGEBRA_GCD; *AST_ALGEBRA_CONJUGATE = *LibSBMLc::AST_ALGEBRA_CONJUGATE; *AST_ALGEBRA_ARG = *LibSBMLc::AST_ALGEBRA_ARG; *AST_ALGEBRA_REAL = *LibSBMLc::AST_ALGEBRA_REAL; *AST_ALGEBRA_IMAGINARY = *LibSBMLc::AST_ALGEBRA_IMAGINARY; *AST_ALGEBRA_LCM = *LibSBMLc::AST_ALGEBRA_LCM; *AST_RELATIONS_EQUIVALENT = *LibSBMLc::AST_RELATIONS_EQUIVALENT; *AST_RELATIONS_APPROX = *LibSBMLc::AST_RELATIONS_APPROX; *AST_RELATIONS_FACTOROF = *LibSBMLc::AST_RELATIONS_FACTOROF; *AST_CALCULUS_INT = *LibSBMLc::AST_CALCULUS_INT; *AST_CALCULUS_DIFF = *LibSBMLc::AST_CALCULUS_DIFF; *AST_CALCULUS_PARTIALDIFF = *LibSBMLc::AST_CALCULUS_PARTIALDIFF; *AST_CALCULUS_LOWLIMIT = *LibSBMLc::AST_CALCULUS_LOWLIMIT; *AST_CALCULUS_UPLIMIT = *LibSBMLc::AST_CALCULUS_UPLIMIT; *AST_CALCULUS_DIVERGENCE = *LibSBMLc::AST_CALCULUS_DIVERGENCE; *AST_CALCULUS_GRAD = *LibSBMLc::AST_CALCULUS_GRAD; *AST_CALCULUS_CURL = *LibSBMLc::AST_CALCULUS_CURL; *AST_CALCULUS_LAPLACIAN = *LibSBMLc::AST_CALCULUS_LAPLACIAN; *AST_SET_THEORY_SET = *LibSBMLc::AST_SET_THEORY_SET; *AST_SET_THEORY_LIST = *LibSBMLc::AST_SET_THEORY_LIST; *AST_SET_THEORY_UNION = *LibSBMLc::AST_SET_THEORY_UNION; *AST_SET_THEORY_INTERSECT = *LibSBMLc::AST_SET_THEORY_INTERSECT; *AST_SET_THEORY_IN = *LibSBMLc::AST_SET_THEORY_IN; *AST_SET_THEORY_NOTIN = *LibSBMLc::AST_SET_THEORY_NOTIN; *AST_SET_THEORY_SUBSET = *LibSBMLc::AST_SET_THEORY_SUBSET; *AST_SET_THEORY_PRSUBSET = *LibSBMLc::AST_SET_THEORY_PRSUBSET; *AST_SET_THEORY_NOTSUBSET = *LibSBMLc::AST_SET_THEORY_NOTSUBSET; *AST_SET_THEORY_NOTPRSUBSET = *LibSBMLc::AST_SET_THEORY_NOTPRSUBSET; *AST_SET_THEORY_SETDIFF = *LibSBMLc::AST_SET_THEORY_SETDIFF; *AST_SET_THEORY_CARD = *LibSBMLc::AST_SET_THEORY_CARD; *AST_SET_THEORY_CARTESIANPRODUCT = *LibSBMLc::AST_SET_THEORY_CARTESIANPRODUCT; *AST_CONSTANT_IMAGINARYI = *LibSBMLc::AST_CONSTANT_IMAGINARYI; *AST_CONSTANTS_INTEGERS = *LibSBMLc::AST_CONSTANTS_INTEGERS; *AST_CONSTANTS_REALS = *LibSBMLc::AST_CONSTANTS_REALS; *AST_CONSTANTS_RATIONALS = *LibSBMLc::AST_CONSTANTS_RATIONALS; *AST_CONSTANTS_NATURALNUMBERS = *LibSBMLc::AST_CONSTANTS_NATURALNUMBERS; *AST_CONSTANTS_COMPLEXES = *LibSBMLc::AST_CONSTANTS_COMPLEXES; *AST_CONSTANTS_PRIMES = *LibSBMLc::AST_CONSTANTS_PRIMES; *AST_CONSTANTS_EMPTYSET = *LibSBMLc::AST_CONSTANTS_EMPTYSET; *AST_CONSTANTS_EULERGAMMA = *LibSBMLc::AST_CONSTANTS_EULERGAMMA; *AST_BASIC_CONTENT_INTERVAL = *LibSBMLc::AST_BASIC_CONTENT_INTERVAL; *AST_BASIC_CONTENT_INVERSE = *LibSBMLc::AST_BASIC_CONTENT_INVERSE; *AST_BASIC_CONTENT_CONDITION = *LibSBMLc::AST_BASIC_CONTENT_CONDITION; *AST_BASIC_CONTENT_DECLARE = *LibSBMLc::AST_BASIC_CONTENT_DECLARE; *AST_BASIC_CONTENT_COMPOSE = *LibSBMLc::AST_BASIC_CONTENT_COMPOSE; *AST_BASIC_CONTENT_IDENT = *LibSBMLc::AST_BASIC_CONTENT_IDENT; *AST_BASIC_CONTENT_DOMAIN = *LibSBMLc::AST_BASIC_CONTENT_DOMAIN; *AST_BASIC_CONTENT_CODOMAIN = *LibSBMLc::AST_BASIC_CONTENT_CODOMAIN; *AST_BASIC_CONTENT_IMAGE = *LibSBMLc::AST_BASIC_CONTENT_IMAGE; *AST_BASIC_CONTENT_DOMAINOFAPPLICATION = *LibSBMLc::AST_BASIC_CONTENT_DOMAINOFAPPLICATION; *AST_UNKNOWN = *LibSBMLc::AST_UNKNOWN; *L3P_PARSE_LOG_AS_LOG10 = *LibSBMLc::L3P_PARSE_LOG_AS_LOG10; *L3P_PARSE_LOG_AS_LN = *LibSBMLc::L3P_PARSE_LOG_AS_LN; *L3P_PARSE_LOG_AS_ERROR = *LibSBMLc::L3P_PARSE_LOG_AS_ERROR; *L3P_COLLAPSE_UNARY_MINUS = *LibSBMLc::L3P_COLLAPSE_UNARY_MINUS; *L3P_EXPAND_UNARY_MINUS = *LibSBMLc::L3P_EXPAND_UNARY_MINUS; *L3P_PARSE_UNITS = *LibSBMLc::L3P_PARSE_UNITS; *L3P_NO_UNITS = *LibSBMLc::L3P_NO_UNITS; *L3P_AVOGADRO_IS_CSYMBOL = *LibSBMLc::L3P_AVOGADRO_IS_CSYMBOL; *L3P_AVOGADRO_IS_NAME = *LibSBMLc::L3P_AVOGADRO_IS_NAME; *L3P_COMPARE_BUILTINS_CASE_INSENSITIVE = *LibSBMLc::L3P_COMPARE_BUILTINS_CASE_INSENSITIVE; *L3P_COMPARE_BUILTINS_CASE_SENSITIVE = *LibSBMLc::L3P_COMPARE_BUILTINS_CASE_SENSITIVE; *L3P_MODULO_IS_REM = *LibSBMLc::L3P_MODULO_IS_REM; *L3P_MODULO_IS_PIECEWISE = *LibSBMLc::L3P_MODULO_IS_PIECEWISE; *L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY = *LibSBMLc::L3P_PARSE_L3V2_FUNCTIONS_DIRECTLY; *L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC = *LibSBMLc::L3P_PARSE_L3V2_FUNCTIONS_AS_GENERIC; *L3P_PARSE_PACKAGE_MATH_DIRECTLY = *LibSBMLc::L3P_PARSE_PACKAGE_MATH_DIRECTLY; *L3P_PARSE_PACKAGE_MATH_AS_GENERIC = *LibSBMLc::L3P_PARSE_PACKAGE_MATH_AS_GENERIC; *INFIX_SYNTAX_NAMED_SQUARE_BRACKETS = *LibSBMLc::INFIX_SYNTAX_NAMED_SQUARE_BRACKETS; *INFIX_SYNTAX_CURLY_BRACES = *LibSBMLc::INFIX_SYNTAX_CURLY_BRACES; *INFIX_SYNTAX_CURLY_BRACES_SEMICOLON = *LibSBMLc::INFIX_SYNTAX_CURLY_BRACES_SEMICOLON; 1;