libSBML Perl API  5.20.2
Loading...
Searching...
No Matches
SubListOfSpeciesFeatures.h File Reference

: Implementation of the SubListOfSpeciesFeatures class More...

Include dependency graph for SubListOfSpeciesFeatures.h:
This graph shows which files directly or indirectly include this file:

Classes

class  SubListOfSpeciesFeatures
 

Enumerations

enum  Relation_t {
  MULTI_RELATION_AND ,
  MULTI_RELATION_OR ,
  MULTI_RELATION_NOT ,
  MULTI_RELATION_UNKNOWN
}
 Enumeration of possible relations between the children of a SubListOfSpeciesFeatures in the libSBML "multi" package implementation. More...
 

Functions

Relation_t Relation_fromString (const char *code)
 Returns the Relation_t enumeration corresponding to the given string or if there is no such match.
 
const char * Relation_toString (Relation_t r)
 Returns the string version of the provided Relation_t enumeration.
 

Detailed Description

: Implementation of the SubListOfSpeciesFeatures class

Author
: Fengkai Zhang

Enumeration Type Documentation

◆ Relation_t

enum Relation_t

Enumeration of possible relations between the children of a SubListOfSpeciesFeatures in the libSBML "multi" package implementation.

LibSBML attaches an identifying code to every kind of SBML object. These are integer constants known as SBML type codes. The names of all the codes begin with the characters SBML_. Note that different Level 3 package plug-ins may use overlapping type codes; to identify the package to which a given object belongs, call the SBase::getPackageName() method on the object.

The exception to this is lists: all SBML-style list elements have the type , regardless of what package they are from.

Here follow some additional general information about libSBML type codes:
  • The codes are the possible return values (integers) for the following functions: (Compatibility note: in libSBML 5, the type of return values of these functions changed from an enumeration to an integer for extensibility in the face of different programming languages.)
  • Each package extension must define similar sets of values for each SBase subclass (e.g. SBMLLayoutTypeCode_t for the SBML Level 3 Layout extension, SBMLFbcTypeCode_t for the SBML Level 3 Flux Balance Constraints extension, etc.).
  • The value of each package-specific type code can be duplicated between those of different packages. (This is necessary because the development of libSBML extensions for different SBML packages may be undertaken by different developers at different times; requiring the developers to coordinate their use of type codes would be nettlesome and probably doomed to failure.)
  • To distinguish between the type codes of different packages, both the return value of SBase::getTypeCode() and SBase::getPackageName() must be checked. This is particularly important for functions that take an SBML type code as an argument, such as SBase::getAncestorOfType( ), which by default assumes you are handing it a core type, and will return NULL if the value you give it is actually from a package.

The following example code illustrates the combined use of SBase::getPackageName() and SBase::getTypeCode():

Enumerator
MULTI_RELATION_AND 

The SpeciesFeature children of the SubListOfSpeciesFeatures share an 'and' relationship.

MULTI_RELATION_OR 

The SpeciesFeature children of the SubListOfSpeciesFeatures share an 'or' relationship.

MULTI_RELATION_NOT 

The SpeciesFeature children of the SubListOfSpeciesFeatures share a 'not' relationship.

MULTI_RELATION_UNKNOWN 

The SpeciesFeature children of the SubListOfSpeciesFeatures share an unknown relationship.

This value is not permitted for valid SBML models.

Function Documentation

◆ Relation_fromString()

Relation_t Relation_fromString ( const char *  code)

Returns the Relation_t enumeration corresponding to the given string or if there is no such match.

Parameters
codethe string to convert to a Relation_t.
Returns
the corresponding Relation_t or if no match is found.
Note
The matching is case-sensitive: "and" will return , but "And" will return

◆ Relation_toString()

const char * Relation_toString ( Relation_t  r)

Returns the string version of the provided Relation_t enumeration.

Parameters
rthe Relation_t enumeration value to convert.
Returns
A string corresponding to the given type: "and", "or", "not", or NULL if the value is or another invalid enumeration value.
Note
The string returned by this function is a pointer to a string literal defined in the libSBML library, and may not be modified or deleted.