libSBML C API  libSBML 5.20.4 C API
Loading...
Searching...
No Matches
Rule.h File Reference

Definitions of Rule_t and ListOfRules_t. More...

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

Enumerations

enum  RuleType_t {
  RULE_TYPE_RATE ,
  RULE_TYPE_SCALAR ,
  RULE_TYPE_INVALID
}
 @_tclass_t _tdoc_rule_level_1_t More...
 

Functions

Rule_tListOfRules_getById (ListOf_t *lo, const char *sid)
 _tDespite_t _tits_t _tname_t, _treturns_t _tthe_t _tRule_t_t _tstructure_t _twith_t _tthe_t "_tvariable_t" _tattribute_t _tmatching_t _tthe_t _tgiven_t _tidentifier_t.
 
Rule_tListOfRules_removeById (ListOf_t *lo, const char *sid)
 _tDespite_t _tits_t _tname_t, _tremoves_t _ta_t _tRule_t_t _tstructure_t _twith_t _tthe_t "_tvariable_t" _tattribute_t _tmatching_t _tthe_t _tgiven_t _tidentifier_t.
 
Rule_tRule_clone (const Rule_t *r)
 @_treturn_t _ta_t (_tdeep_t) _tcopy_t _tof_t _tthis_t _tRule_t_t.
 
int Rule_containsUndeclaredUnits (Rule_t *ia)
 _tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t _tcontains_t _tparameters_t/_tnumbers_t _twith_t _tundeclared_t _tunits_t.
 
Rule_tRule_createAlgebraic (unsigned int level, unsigned int version)
 _tCreates_t _ta_t _tnew_t _tAlgebraicRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.
 
Rule_tRule_createAlgebraicWithNS (SBMLNamespaces_t *sbmlns)
 _tCreates_t _ta_t _tnew_t _tAlgebraicRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.
 
Rule_tRule_createAssignment (unsigned int level, unsigned int version)
 _tCreates_t _ta_t _tnew_t _tAssignmentRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.
 
Rule_tRule_createAssignmentWithNS (SBMLNamespaces_t *sbmlns)
 _tCreates_t _ta_t _tnew_t _tAssignmentRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.
 
Rule_tRule_createRate (unsigned int level, unsigned int version)
 _tCreates_t _ta_t _tnew_t _tRateRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.
 
Rule_tRule_createRateWithNS (SBMLNamespaces_t *sbmlns)
 _tCreates_t _ta_t _tnew_t _tRateRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.
 
void Rule_free (Rule_t *r)
 _tDestroys_t _tthis_t _tRule_t_t.
 
UnitDefinition_tRule_getDerivedUnitDefinition (Rule_t *ia)
 _tCalculates_t _tand_t _treturns_t _ta_t _tUnitDefinition_t_t _tthat_t _texpresses_t _tthe_t _tunits_t _treturned_t _tby_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t.
 
const char * Rule_getFormula (const Rule_t *r)
 @_tnote_t _tSBML_t _tLevel_t _t1_t _tuses_t _ta_t _ttext_t-_tstring_t _tformat_t _tfor_t _tmathematical_t _tformulas_t.
 
int Rule_getL1TypeCode (const Rule_t *r)
 @_treturn_t _tthe_t _tSBML_t _tLevel_t _t1_t _ttypecode_t _tfor_t _tthis_t _tRule_t_t _tor_t @_tsbmlconstant_t{_tSBML_UNKNOWN_t, _tSBMLTypeCode_t_t} (_tdefault_t).
 
const ASTNode_tRule_getMath (const Rule_t *r)
 @_treturn_t _tthe_t _tmath_t _tfor_t _tthis_t _tRule_t_t.
 
const XMLNamespaces_tRule_getNamespaces (Rule_t *r)
 _tReturns_t _ta_t _tlist_t _tof_t _tXMLNamespaces_t_t _tassociated_t _twith_t _tthis_t _tRule_t_t _tstructure_t.
 
RuleType_t Rule_getType (const Rule_t *r)
 _tReturns_t _ta_t _tcode_t _trepresenting_t _tthe_t _ttype_t _tof_t _trule_t _tthis_t _tis_t.
 
int Rule_getTypeCode (const Rule_t *r)
 _tReturns_t _tthe_t _tlibSBML_t _ttype_t _tcode_t _tfor_t _tthis_t _tRule_t_t _tobject_t.
 
const char * Rule_getUnits (const Rule_t *r)
 @_treturn_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t (_tL1_t _tParameterRules_t _tonly_t).
 
const char * Rule_getVariable (const Rule_t *r)
 @_treturn_t _tthe_t _tvariable_t _tfor_t _tthis_t _tRule_t_t.
 
int Rule_isAlgebraic (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAlgebraicRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isAssignment (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAssignmentRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isCompartmentVolume (const Rule_t *r)
 _tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tCompartments_t.
 
int Rule_isParameter (const Rule_t *r)
 _tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tParameters_t.
 
int Rule_isRate (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _ta_t _tRateRule_t (_tL2_t) _tor_t _thas_t _ttype_t="_trate_t" (_tL1_t), @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isScalar (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAssignmentRule_t (_tL2_t) _thas_t _ttype_t="_tscalar_t" (_tL1_t), @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isSetFormula (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tformula_t (_tor_t _tequivalently_t _tthe_t _tmath_t) _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isSetMath (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tmath_t (_tor_t _tequivalently_t _tthe_t _tformula_t) _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isSetUnits (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t (_tL1_t _tParameterRules_t _tonly_t).
 
int Rule_isSetVariable (const Rule_t *r)
 @_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tvariable_t _tof_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.
 
int Rule_isSpeciesConcentration (const Rule_t *r)
 _tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tSpecies_t.
 
int Rule_setFormula (Rule_t *r, const char *formula)
 _tSets_t _tthe_t _tformula_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tstring_t.
 
int Rule_setL1TypeCode (Rule_t *r, int L1Type)
 _tSets_t _tthe_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t _ttypecode_t _tfor_t _tthis_t _tRule_t_t.
 
int Rule_setMath (Rule_t *r, const ASTNode_t *math)
 _tSets_t _tthe_t _tmath_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tthe_t _tgiven_t _tASTNode_t_t.
 
int Rule_setUnits (Rule_t *r, const char *sname)
 _tSets_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tsname_t (_tL1_t _tParameterRules_t _tonly_t).
 
int Rule_setVariable (Rule_t *r, const char *sid)
 _tSets_t _tthe_t _tvariable_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t @_tp_t _tsid_t.
 
int Rule_unsetUnits (Rule_t *r)
 _tUnsets_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t (_tL1_t _tParameterRules_t _tonly_t).
 

Detailed Description

Definitions of Rule_t and ListOfRules_t.

Author
Ben Bornstein

Enumeration Type Documentation

◆ RuleType_t

enum RuleType_t

@_tclass_t _tdoc_rule_level_1_t

@_tpar_t _tIn_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t, _tthe_t _tdifferent_t _trule_t _ttypes_t _teach_t _thave_t _ta_t _tdifferent_t _tname_t _tfor_t _tthe_t _tattribute_t _tholding_t _tthe_t _treference_t _tto_t _tthe_t _tobject_t _tconstituting_t _tthe_t _tleft_t-_thand_t _tside_t _tof_t _tthe_t _trule_t. (_tE_t._tg_t., _tfor_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t'_ts_t _tSpeciesConcentrationRule_t _tthe_t _tattribute_t _tis_t "_tspecies_t", _tfor_t _tCompartmentVolumeRule_t _tit_t _tis_t "_tcompartment_t", _tetc_t.) _tIn_t _tSBML_t _tLevels_t&_tnbsp_t;_t2_t _tand_t&_tnbsp_t;_t3_t, _tthe_t _tonly_t _ttwo_t _ttypes_t _tof_t _tRule_t _tobjects_t _twith_t _ta_t _tleft_t-_thand_t _tside_t _tobject_t _treference_t _tare_t _tAssignmentRule_t _tand_t _tRateRule_t, _tand_t _tboth_t _tof_t _tthem_t _tuse_t _tthe_t _tsame_t _tname_t _tfor_t _tattribute_t: "_tvariable_t". _tIn_t _torder_t _tto_t _tmake_t _tit_t _teasier_t _tfor_t _tapplication_t _tdevelopers_t _tto_t _twork_t _twith_t _tall_t _tLevels_t _tof_t _tSBML_t, _tlibSBML_t _tuses_t _ta_t _tuniform_t _tname_t _tfor_t _tall_t _tsuch_t _tattributes_t, _tand_t _tit_t _tis_t "_tvariable_t", _tregardless_t _tof_t _twhether_t _tLevel_t&_tnbsp_t;_t1_t _trules_t _tor_t _tLevel_t&_tnbsp_t;_t2_t&_tndash_t;_t3_t _trules_t _tare_t _tbeing_t _tused_t.

@_tclass_t _tdoc_rule_units_t

@_tpar_t _tThe_t _tunits_t _tare_t _tcalculated_t _tbased_t _ton_t _tthe_t _tmathematical_t _texpression_t _tin_t _tthe_t _tRule_t _tand_t _tthe_t _tmodel_t _tquantities_t _treferenced_t _tby_t <_tcode_t>&_tlt_t;_tci_t&_tgt_t;</_tcode_t> _telements_t _tused_t _twithin_t _tthat_t _texpression_t. _tThe_t _tmethod_t _tRule_t::_tgetDerivedUnitDefinition_t() _treturns_t _tthe_t _tcalculated_t _tunits_t, _tto_t _tthe_t _textent_t _tthat_t _tlibSBML_t _tcan_t _tcompute_t _tthem_t.

@_tclass_t _tdoc_warning_rule_math_literals_t

@_twarning_t <_tspan_t _tclass_t="_twarning_t">_tNote_t _tthat_t _tit_t _tis_t _tpossible_t _tthe_t "_tmath_t" _texpression_t _tin_t _tthe_t _tRule_t _tcontains_t _tpure_t _tnumbers_t _tor_t _tparameters_t _twith_t _tundeclared_t _tunits_t. _tIn_t _tthose_t _tcases_t, _tit_t _tis_t _tnot_t _tpossible_t _tto_t _tcalculate_t _tthe_t _tunits_t _tof_t _tthe_t _toverall_t _texpression_t _twithout_t _tmaking_t _tassumptions_t. _tLibSBML_t _tdoes_t _tnot_t _tmake_t _tassumptions_t _tabout_t _tthe_t _tunits_t, _tand_t _tRule_t::_tgetDerivedUnitDefinition_t() _tonly_t _treturns_t _tthe_t _tunits_t _tas_t _tfar_t _tas_t _tit_t _tis_t _table_t _tto_t _tdetermine_t _tthem_t. _tFor_t _texample_t, _tin_t _tan_t _texpression_t <_tem_t>_tX_t + _tY_t</_tem_t>, _tif_t <_tem_t>_tX_t</_tem_t> _thas_t _tunambiguously_t-_tdefined_t _tunits_t _tand_t <_tem_t>_tY_t</_tem_t> _tdoes_t _tnot_t, _tit_t _twill_t _treturn_t _tthe_t _tunits_t _tof_t <_tem_t>_tX_t</_tem_t>. <_tstrong_t>_tIt_t _tis_t _timportant_t _tthat_t _tcallers_t _talso_t _tinvoke_t _tthe_t _tmethod_t</_tstrong_t> _tRule_t::_tcontainsUndeclaredUnits_t() <_tstrong_t>_tto_t _tdetermine_t _twhether_t _tthis_t _tsituation_t _tholds_t</_tstrong_t>. _tCallers_t _tmay_t _twish_t _tto_t _ttake_t _tsuitable_t _tactions_t _tin_t _tthose_t _tscenarios_t.</_tspan_t>

@_tenum_t _tRuleType_t_t @_tbrief_t _tEnumeration_t _tof_t _tthe_t _tvalid_t _tvalues_t _tfor_t _tthe_t '_ttype_t' _tattribute_t _tof_t _tan_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t _tRule_t.

Enumerator
RULE_TYPE_RATE 

'rate'

RULE_TYPE_SCALAR 

'scalar'

RULE_TYPE_INVALID 

An invalid value: anything other than 'rate' or 'scalar'.

Function Documentation

◆ ListOfRules_getById()

Rule_t * ListOfRules_getById ( ListOf_t lo,
const char *  sid 
)

_tDespite_t _tits_t _tname_t, _treturns_t _tthe_t _tRule_t_t _tstructure_t _twith_t _tthe_t "_tvariable_t" _tattribute_t _tmatching_t _tthe_t _tgiven_t _tidentifier_t.

@_tparam_t _tlo_t _tthe_t _tListOfRules_t_t _tstructure_t _tto_t _tsearch_t. @_tparam_t _tsid_t _tthe_t "_tvariable_t" _tattribute_t _tvalue_t _tbeing_t _tsought_t.

@_treturn_t _titem_t _tin_t _tthe_t @_tp_t _tlo_t _tListOfRules_t _twhose_t "_tvariable_t" _tattribute_t _tmatches_t _tthe_t _tgiven_t @_tp_t _tsid_t _tor_t @_tc_t _tNULL_t _tif_t _tno_t _tsuch_t _titem_t _texists_t.

@_tsee_t _tListOf_t_t

@_tmemberof_t _tListOfRules_t_t

◆ ListOfRules_removeById()

Rule_t * ListOfRules_removeById ( ListOf_t lo,
const char *  sid 
)

_tDespite_t _tits_t _tname_t, _tremoves_t _ta_t _tRule_t_t _tstructure_t _twith_t _tthe_t "_tvariable_t" _tattribute_t _tmatching_t _tthe_t _tgiven_t _tidentifier_t.

_tThe_t _tcaller_t _towns_t _tthe_t _treturned_t _titem_t _tand_t _tis_t _tresponsible_t _tfor_t _tdeleting_t _tit_t.

@_tparam_t _tlo_t _tthe_t _tlist_t _tof_t _tRule_t_t _tstructures_t _tto_t _tsearch_t. @_tparam_t _tsid_t _tthe_t "_tvariable_t" _tattribute_t _tvalue_t _tof_t _tthe_t _tstructure_t _tto_t _tremove_t.

@_treturn_t _tThe_t _tRule_t_t _tstructure_t _tremoved_t _twhose_t "_tvariable_t" _tattribute_t _tmatches_t _tthe_t _tgiven_t @_tp_t _tsid_t _tor_t @_tc_t _tNULL_t _tif_t _tno_t _tsuch_t _titem_t _texists_t.

@_tsee_t _tListOf_t_t

@_tmemberof_t _tListOfRules_t_t

◆ Rule_clone()

Rule_t * Rule_clone ( const Rule_t r)

@_treturn_t _ta_t (_tdeep_t) _tcopy_t _tof_t _tthis_t _tRule_t_t.

@_tmemberof_t _tRule_t_t

◆ Rule_containsUndeclaredUnits()

int Rule_containsUndeclaredUnits ( Rule_t ia)

_tPredicate_t _treturning_t @_tc_t _t1_t (_ttrue_t) _tor_t @_tc_t _t0_t (_tfalse_t) _tdepending_t _ton_t _twhether_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t _tcontains_t _tparameters_t/_tnumbers_t _twith_t _tundeclared_t _tunits_t.

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t _tincludes_t _tparameters_t/_tnumbers_t _twith_t _tundeclared_t _tunits_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tnote_t _ta_t _treturn_t _tvalue_t _tof_t @_tc_t _t1_t (_ttrue_t) _tindicates_t _tthat_t _tthe_t _tUnitDefinition_t_t _treturned_t _tby_t _tthe_t _tgetDerivedUnitDefinition_t _tfunction_t _tmay_t _tnot_t _taccurately_t _trepresent_t _tthe_t _tunits_t _tof_t _tthe_t _texpression_t.

@_tsee_t _tRule_getDerivedUnitDefinition_t()

@_tmemberof_t _tRule_t_t

◆ Rule_createAlgebraic()

Rule_t * Rule_createAlgebraic ( unsigned int  level,
unsigned int  version 
)

_tCreates_t _ta_t _tnew_t _tAlgebraicRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.

@_tparam_t _tlevel_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tLevel_t _tto_t _tassign_t _tto_t _tthis_t _talgebraic_t _tRule_t_t.

@_tparam_t _tversion_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tVersion_t _tto_t _tassign_t _tto_t _tthis_t _talgebraic_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

_tCreates_t _ta_t _tnew_t _tAlgebraicRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.

@_tcond_t _tdoxygenIgnored_t

◆ Rule_createAlgebraicWithNS()

Rule_t * Rule_createAlgebraicWithNS ( SBMLNamespaces_t sbmlns)

_tCreates_t _ta_t _tnew_t _tAlgebraicRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.

@_tparam_t _tsbmlns_t _tSBMLNamespaces_t_t, _ta_t _tpointer_t _tto_t _tan_t _tSBMLNamespaces_t_t _tstructure_t _tto_t _tassign_t _tto_t _tthis_t _talgebraic_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

◆ Rule_createAssignment()

Rule_t * Rule_createAssignment ( unsigned int  level,
unsigned int  version 
)

_tCreates_t _ta_t _tnew_t _tAssignmentRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.

@_tparam_t _tlevel_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tLevel_t _tto_t _tassign_t _tto_t _tthis_t _tassignment_t _tRule_t_t.

@_tparam_t _tversion_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tVersion_t _tto_t _tassign_t _tto_t _tthis_t _tassignment_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

◆ Rule_createAssignmentWithNS()

Rule_t * Rule_createAssignmentWithNS ( SBMLNamespaces_t sbmlns)

_tCreates_t _ta_t _tnew_t _tAssignmentRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.

@_tparam_t _tsbmlns_t _tSBMLNamespaces_t_t, _ta_t _tpointer_t _tto_t _tan_t _tSBMLNamespaces_t_t _tstructure_t _tto_t _tassign_t _tto_t _tthis_t _tassignment_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

◆ Rule_createRate()

Rule_t * Rule_createRate ( unsigned int  level,
unsigned int  version 
)

_tCreates_t _ta_t _tnew_t _tRateRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBML_t @_tp_t _tlevel_t _tand_t @_tp_t _tversion_t _tvalues_t.

@_tparam_t _tlevel_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tLevel_t _tto_t _tassign_t _tto_t _tthis_t _trate_t _tRule_t_t.

@_tparam_t _tversion_t _tan_t _tunsigned_t _tint_t, _tthe_t _tSBML_t _tVersion_t _tto_t _tassign_t _tto_t _tthis_t _trate_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

◆ Rule_createRateWithNS()

Rule_t * Rule_createRateWithNS ( SBMLNamespaces_t sbmlns)

_tCreates_t _ta_t _tnew_t _tRateRule_t (_tRule_t_t) _tstructure_t _tusing_t _tthe_t _tgiven_t _tSBMLNamespaces_t_t _tstructure_t.

@_tparam_t _tsbmlns_t _tSBMLNamespaces_t_t, _ta_t _tpointer_t _tto_t _tan_t _tSBMLNamespaces_t_t _tstructure_t _tto_t _tassign_t _tto_t _tthis_t _trate_t _tRule_t_t.

@_treturn_t _ta_t _tpointer_t _tto_t _tthe_t _tnewly_t _tcreated_t _tRule_t_t _tstructure_t.

@_tcopydetails_t _tdoc_note_setting_lv_t

@_tmemberof_t _tRule_t_t

◆ Rule_free()

void Rule_free ( Rule_t r)

_tDestroys_t _tthis_t _tRule_t_t.

@_tmemberof_t _tRule_t_t

◆ Rule_getDerivedUnitDefinition()

UnitDefinition_t * Rule_getDerivedUnitDefinition ( Rule_t ia)

_tCalculates_t _tand_t _treturns_t _ta_t _tUnitDefinition_t_t _tthat_t _texpresses_t _tthe_t _tunits_t _treturned_t _tby_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t.

@_treturn_t _ta_t _tUnitDefinition_t_t _tthat_t _texpresses_t _tthe_t _tunits_t _tof_t _tthe_t _tmath_t _texpression_t _tof_t _tthis_t _tRule_t_t.

_tNote_t _tthat_t _tthe_t _tfunctionality_t _tthat_t _tfacilitates_t _tunit_t _tanalysis_t _tdepends_t _ton_t _tthe_t _tmodel_t _tas_t _ta_t _twhole_t. _tThus_t, _tin_t _tcases_t _twhere_t _tthe_t _tstructure_t _thas_t _tnot_t _tbeen_t _tadded_t _tto_t _ta_t _tmodel_t _tor_t _tthe_t _tmodel_t _titself_t _tis_t _tincomplete_t, _tunit_t _tanalysis_t _tis_t _tnot_t _tpossible_t _tand_t _tthis_t _tmethod_t _twill_t _treturn_t @_tc_t _tNULL_t.

@_tnote_t _tThe_t _tunits_t _tare_t _tcalculated_t _tby_t _tapplying_t _tthe_t _tmathematics_t _tfrom_t _tthe_t _texpression_t _tto_t _tthe_t _tunits_t _tof_t _tthe_t &_tlt_t;_tci_t&_tgt_t; _telements_t _tused_t _twithin_t _tthe_t _texpression_t. _tWhere_t _tthere_t _tare_t _tparameters_t/_tnumbers_t _twith_t _tundeclared_t _tunits_t _tthe_t _tUnitDefinition_t_t _treturned_t _tby_t _tthis_t _tfunction_t _tmay_t _tnot_t _taccurately_t _trepresent_t _tthe_t _tunits_t _tof_t _tthe_t _texpression_t.

@_tsee_t _tRule_containsUndeclaredUnits_t()

@_tmemberof_t _tRule_t_t

◆ Rule_getFormula()

const char * Rule_getFormula ( const Rule_t r)

@_tnote_t _tSBML_t _tLevel_t _t1_t _tuses_t _ta_t _ttext_t-_tstring_t _tformat_t _tfor_t _tmathematical_t _tformulas_t.

_tOther_t _tlevels_t _tof_t _tSBML_t _tuse_t _tMathML_t, _tan_t _tXML_t _tformat_t _tfor_t _trepresenting_t _tmathematical_t _texpressions_t. _tLibSBML_t _tprovides_t _tan_t _tAbstract_t _tSyntax_t _tTree_t _tAPI_t _tfor_t _tworking_t _twith_t _tmathematical_t _texpressions_t; _tthis_t _tAPI_t _tis_t _tmore_t _tpowerful_t _tthan_t _tworking_t _twith_t _tformulas_t _tdirectly_t _tin_t _ttext_t _tform_t, _tand_t _tASTs_t _tcan_t _tbe_t _ttranslated_t _tinto_t _teither_t _tMathML_t _tor_t _tthe_t _ttext_t-_tstring_t _tsyntax_t. _tThe_t _tlibSBML_t _tmethods_t _tthat_t _taccept_t _ttext_t-_tstring_t _tformulas_t _tdirectly_t (_tsuch_t _tas_t _tthis_t _tone_t) _tare_t _tprovided_t _tfor_t _tSBML_t _tLevel_t _t1_t _tcompatibility_t, _tbut_t _tdevelopers_t _tare_t _tencouraged_t _tto_t _tuse_t _tthe_t _tAST_t _tmechanisms_t.

@_treturn_t _tthe_t _tformula_t _tfor_t _tthis_t _tRule_t_t.

@_tmemberof_t _tRule_t_t

◆ Rule_getL1TypeCode()

int Rule_getL1TypeCode ( const Rule_t r)

@_treturn_t _tthe_t _tSBML_t _tLevel_t _t1_t _ttypecode_t _tfor_t _tthis_t _tRule_t_t _tor_t @_tsbmlconstant_t{_tSBML_UNKNOWN_t, _tSBMLTypeCode_t_t} (_tdefault_t).

@_tmemberof_t _tRule_t_t

◆ Rule_getMath()

const ASTNode_t * Rule_getMath ( const Rule_t r)

@_treturn_t _tthe_t _tmath_t _tfor_t _tthis_t _tRule_t_t.

@_tmemberof_t _tRule_t_t

◆ Rule_getNamespaces()

const XMLNamespaces_t * Rule_getNamespaces ( Rule_t r)

_tReturns_t _ta_t _tlist_t _tof_t _tXMLNamespaces_t_t _tassociated_t _twith_t _tthis_t _tRule_t_t _tstructure_t.

@_tparam_t _tr_t _tthe_t _tRule_t_t _tstructure_t.

@_treturn_t _tpointer_t _tto_t _tthe_t _tXMLNamespaces_t_t _tstructure_t _tassociated_t _twith_t _tthis_t _tstructure_t

@_tmemberof_t _tRule_t_t

◆ Rule_getType()

RuleType_t Rule_getType ( const Rule_t r)

_tReturns_t _ta_t _tcode_t _trepresenting_t _tthe_t _ttype_t _tof_t _trule_t _tthis_t _tis_t.

@_treturn_t _tthe_t _trule_t _ttype_t, _twhich_t _twill_t _tbe_t _tone_t _tof_t _tthe_t _tfollowing_t _tthree_t _tpossible_t _tvalues_t: @_tli_t @_tsbmlconstant_t{_tRULE_TYPE_RATE_t, _tRuleType_t_t} @_tli_t @_tsbmlconstant_t{_tRULE_TYPE_SCALAR_t, _tRuleType_t_t} @_tli_t @_tsbmlconstant_t{_tRULE_TYPE_INVALID_t, _tRuleType_t_t}

@_tnote_t _tThe_t _tattribute_t "_ttype_t" _ton_t _tRule_t _tobjects_t _tis_t _tpresent_t _tonly_t _tin_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t. _tIn_t _tSBML_t _tLevel_t&_tnbsp_t;_t2_t _tand_t _tlater_t, _tthe_t _ttype_t _thas_t _tbeen_t _treplaced_t _tby_t _tsubclassing_t _tthe_t _tRule_t _tobject_t.

@_tmemberof_t _tRule_t_t

◆ Rule_getTypeCode()

int Rule_getTypeCode ( const Rule_t r)

_tReturns_t _tthe_t _tlibSBML_t _ttype_t _tcode_t _tfor_t _tthis_t _tRule_t_t _tobject_t.

@_tcopydetails_t _tdoc_what_are_typecodes_t

@_treturn_t _tthe_t _tSBML_t _ttype_t _tcode_t _tfor_t _tthis_t _tobject_t, _teither_t @_tsbmlconstant_t{_tSBML_ASSIGNMENT_RULE_t, _tSBMLTypeCode_t_t}, @_tsbmlconstant_t{_tSBML_RATE_RULE_t, _tSBMLTypeCode_t_t}, _tor_t @_tsbmlconstant_t{_tSBML_ALGEBRAIC_RULE_t, _tSBMLTypeCode_t_t} _tfor_t SBML_t _tCore_t.

@_tcopydetails_t _tdoc_warning_typecodes_not_unique_t

@_tsee_t _tgetElementName_t() @_tsee_t _tgetPackageName_t()

@_tmemberof_t _tRule_t_t

◆ Rule_getUnits()

const char * Rule_getUnits ( const Rule_t r)

@_treturn_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t (_tL1_t _tParameterRules_t _tonly_t).

@_tmemberof_t _tRule_t_t

◆ Rule_getVariable()

const char * Rule_getVariable ( const Rule_t r)

@_treturn_t _tthe_t _tvariable_t _tfor_t _tthis_t _tRule_t_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isAlgebraic()

int Rule_isAlgebraic ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAlgebraicRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isAssignment()

int Rule_isAssignment ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAssignmentRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isCompartmentVolume()

int Rule_isCompartmentVolume ( const Rule_t r)

_tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tCompartments_t.

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _ta_t _tCompartmentVolumeRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isParameter()

int Rule_isParameter ( const Rule_t r)

_tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tParameters_t.

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _ta_t _tParameterRule_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isRate()

int Rule_isRate ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _ta_t _tRateRule_t (_tL2_t) _tor_t _thas_t _ttype_t="_trate_t" (_tL1_t), @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isScalar()

int Rule_isScalar ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _tan_t _tAssignmentRule_t (_tL2_t) _thas_t _ttype_t="_tscalar_t" (_tL1_t), @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isSetFormula()

int Rule_isSetFormula ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tformula_t (_tor_t _tequivalently_t _tthe_t _tmath_t) _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isSetMath()

int Rule_isSetMath ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tmath_t (_tor_t _tequivalently_t _tthe_t _tformula_t) _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isSetUnits()

int Rule_isSetUnits ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t (_tL1_t _tParameterRules_t _tonly_t).

@_tmemberof_t _tRule_t_t

◆ Rule_isSetVariable()

int Rule_isSetVariable ( const Rule_t r)

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthe_t _tvariable_t _tof_t _tthis_t _tRule_t_t _tis_t _tset_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_isSpeciesConcentration()

int Rule_isSpeciesConcentration ( const Rule_t r)

_tThis_t _tmethod_t _tattempts_t _tto_t _tlookup_t _tthe_t _tRule_t_t'_ts_t _tvariable_t _tin_t _tthe_t _tModel_t_t'_ts_t _tlist_t _tof_t _tSpecies_t.

@_treturn_t @_tc_t _t1_t (_ttrue_t) _tif_t _tthis_t _tRule_t_t _tis_t _ta_t _tspecies_t _tconcentration_t _tRule_t_t, @_tc_t _t0_t (_tfalse_t) _totherwise_t.

@_tmemberof_t _tRule_t_t

◆ Rule_setFormula()

int Rule_setFormula ( Rule_t r,
const char *  formula 
)

_tSets_t _tthe_t _tformula_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tstring_t.

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_OBJECT_t, _tOperationReturnValues_t_t}

@_tnote_t _tSBML_t _tLevel_t _t1_t _tuses_t _ta_t _ttext_t-_tstring_t _tformat_t _tfor_t _tmathematical_t _tformulas_t. _tOther_t _tlevels_t _tof_t _tSBML_t _tuse_t _tMathML_t, _tan_t _tXML_t _tformat_t _tfor_t _trepresenting_t _tmathematical_t _texpressions_t. _tLibSBML_t _tprovides_t _tan_t _tAbstract_t _tSyntax_t _tTree_t _tAPI_t _tfor_t _tworking_t _twith_t _tmathematical_t _texpressions_t; _tthis_t _tAPI_t _tis_t _tmore_t _tpowerful_t _tthan_t _tworking_t _twith_t _tformulas_t _tdirectly_t _tin_t _ttext_t _tform_t, _tand_t _tASTs_t _tcan_t _tbe_t _ttranslated_t _tinto_t _teither_t _tMathML_t _tor_t _tthe_t _ttext_t-_tstring_t _tsyntax_t. _tThe_t _tlibSBML_t _tmethods_t _tthat_t _taccept_t _ttext_t-_tstring_t _tformulas_t _tdirectly_t (_tsuch_t _tas_t _tthis_t _tone_t) _tare_t _tprovided_t _tfor_t _tSBML_t _tLevel_t _t1_t _tcompatibility_t, _tbut_t _tdevelopers_t _tare_t _tencouraged_t _tto_t _tuse_t _tthe_t _tAST_t _tmechanisms_t.

@_tmemberof_t _tRule_t_t

◆ Rule_setL1TypeCode()

int Rule_setL1TypeCode ( Rule_t r,
int  L1Type 
)

_tSets_t _tthe_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t _ttypecode_t _tfor_t _tthis_t _tRule_t_t.

@_tparam_t _tr_t _tthe_t _tRule_t_t _tstructure_t. @_tparam_t _tL1Type_t _tthe_t _tSBML_t _tLevel_t&_tnbsp_t;_t1_t _ttypecode_t _tfor_t _tthis_t _tRule_t_t (@_tc_t _tSBML_COMPARTMENT_VOLUME_RULE_t, @_tc_t _tSBML_PARAMETER_RULE_t, _tor_t @_tc_t _tSBML_SPECIES_CONCENTRATION_RULE_t).

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_ATTRIBUTE_VALUE_t, _tOperationReturnValues_t_t}

@_tmemberof_t _tRule_t_t

◆ Rule_setMath()

int Rule_setMath ( Rule_t r,
const ASTNode_t math 
)

_tSets_t _tthe_t _tmath_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tthe_t _tgiven_t _tASTNode_t_t.

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_OBJECT_t, _tOperationReturnValues_t_t}

@_tmemberof_t _tRule_t_t

◆ Rule_setUnits()

int Rule_setUnits ( Rule_t r,
const char *  sname 
)

_tSets_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t _tsname_t (_tL1_t _tParameterRules_t _tonly_t).

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_ATTRIBUTE_VALUE_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_UNEXPECTED_ATTRIBUTE_t, _tOperationReturnValues_t_t}

@_tnote_t _tUsing_t _tthis_t _tfunction_t _twith_t _tan_t @_tp_t _tsname_t _tof_t _tNULL_t _tis_t _tequivalent_t _tto_t _tunsetting_t _tthe_t "_tunits_t" _tattribute_t.

@_tmemberof_t _tRule_t_t

◆ Rule_setVariable()

int Rule_setVariable ( Rule_t r,
const char *  sid 
)

_tSets_t _tthe_t _tvariable_t _tof_t _tthis_t _tRule_t_t _tto_t _ta_t _tcopy_t _tof_t @_tp_t _tsid_t.

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_INVALID_ATTRIBUTE_VALUE_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_UNEXPECTED_ATTRIBUTE_t, _tOperationReturnValues_t_t}

@_tnote_t _tUsing_t _tthis_t _tfunction_t _twith_t _tan_t @_tp_t _tsid_t _tof_t _tNULL_t _tis_t _tequivalent_t _tto_t _tunsetting_t _tthe_t "_tvariable_t" _tattribute_t.

@_tmemberof_t _tRule_t_t

◆ Rule_unsetUnits()

int Rule_unsetUnits ( Rule_t r)

_tUnsets_t _tthe_t _tunits_t _tfor_t _tthis_t _tRule_t_t (_tL1_t _tParameterRules_t _tonly_t).

@_tcopydetails_t _tdoc_returns_success_code_t @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_SUCCESS_t, _tOperationReturnValues_t_t} @_tli_t @_tsbmlconstant_t{_tLIBSBML_OPERATION_FAILED_t, _tOperationReturnValues_t_t}

@_tmemberof_t _tRule_t_t