libSBML C++ API  5.18.0
GroupsExtension.cpp File Reference

Implementation of GroupsExtension. More...

Include dependency graph for GroupsExtension.cpp:

Functions

GroupKind_t GroupKind_fromString (const char *code)
 Returns the enumeration value corresponding to the given string or GROUP_KIND_UNKNOWN if there is no such match. More...
 
int GroupKind_isValid (GroupKind_t gk)
 Predicate returning 1 (true) or 0 (false) depending on whether the given enumeration value is valid. More...
 
int GroupKind_isValidString (const char *code)
 Predicate returning 1 (true) or 0 (false) depending on whether the given string is a valid enumeration value. More...
 
const char * GroupKind_toString (GroupKind_t gk)
 Returns the string version of the provided enumeration value. More...
 

Variables

static SBMLExtensionRegister< GroupsExtensiongroupsExtensionRegistry
 Adds this GroupsExtension to the SBMLExtensionRegistry class. More...
 
static const char * SBML_GROUP_KIND_STRINGS []
 
static const char * SBML_GROUPS_TYPECODE_STRINGS []
 

Detailed Description

Implementation of GroupsExtension.

Author
SBMLTeam

Function Documentation

GroupKind_t GroupKind_fromString ( const char *  code)

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

Parameters
codethe string to convert to an enumeration value.
Returns
the corresponding value, or GROUP_KIND_UNKNOWN if no match is found.
Note
The matching is case-sensitive: "classification" will return GROUP_KIND_CLASSIFICATION, but "Classification" will return GROUP_KIND_UNKNOWN.
int GroupKind_isValid ( GroupKind_t  gk)

Predicate returning 1 (true) or 0 (false) depending on whether the given enumeration value is valid.

Parameters
gkthe enumeration value to query.
Returns
1 (true) if the value is GROUP_KIND_CLASSIFICATION, GROUP_KIND_PARTONOMY, or GROUP_KIND_COLLECTION; 0 (false) otherwise (including GROUP_KIND_UNKNOWN).
int GroupKind_isValidString ( const char *  code)

Predicate returning 1 (true) or 0 (false) depending on whether the given string is a valid enumeration value.

Parameters
codethe string to query.
Returns
1 (true) if the string is "classification", "partonomy", or "collection"; 0 (false) otherwise.
Note
The matching is case-sensitive: "classification" will return 1 (true), but "Classification" will return 0 (false).
const char* GroupKind_toString ( GroupKind_t  gk)

Returns the string version of the provided enumeration value.

Parameters
gkthe enumeration value to convert.
Returns
A string corresponding to the given type: "classification", "partonomy", "collection", or NULL if the value is GROUP_KIND_UNKNOWN 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.

Variable Documentation

SBMLExtensionRegister<GroupsExtension> groupsExtensionRegistry
static

Adds this GroupsExtension to the SBMLExtensionRegistry class.

const char* SBML_GROUP_KIND_STRINGS[]
static
Initial value:
=
{
"classification"
, "partonomy"
, "collection"
, "(Unknown SBML Groups Type)"
}
const char* SBML_GROUPS_TYPECODE_STRINGS[]
static
Initial value:
=
{
"Member"
, "Group"
}