本文整理汇总了C++中SpeciesReference::getAncestorOfType方法的典型用法代码示例。如果您正苦于以下问题:C++ SpeciesReference::getAncestorOfType方法的具体用法?C++ SpeciesReference::getAncestorOfType怎么用?C++ SpeciesReference::getAncestorOfType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpeciesReference
的用法示例。
在下文中一共展示了SpeciesReference::getAncestorOfType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SBMLDocument
END_TEST
START_TEST ( test_Reaction_parent_NULL )
{
SBMLDocument *d = new SBMLDocument();
Model *m = d->createModel();
Reaction *c = m->createReaction();
SpeciesReference *sr = c->createReactant();
KineticLaw *kl = c->createKineticLaw();
fail_unless(c->getAncestorOfType(SBML_MODEL) == m);
fail_unless (c->getSBMLDocument() == d);
fail_unless(sr->getAncestorOfType(SBML_REACTION) == c);
fail_unless(kl->getAncestorOfType(SBML_REACTION) == c);
Reaction *c1 = c->clone();
delete d;
fail_unless(c1->getAncestorOfType(SBML_MODEL) == NULL);
fail_unless(c1->getParentSBMLObject() == NULL);
fail_unless (c1->getSBMLDocument() == NULL);
SpeciesReference *sr1 = c1->getReactant(0);
fail_unless(sr1->getAncestorOfType(SBML_MODEL) == NULL);
fail_unless(sr1->getAncestorOfType(SBML_REACTION) == c1);
fail_unless (sr1->getSBMLDocument() == NULL);
fail_unless(c1->getKineticLaw()->getAncestorOfType(SBML_MODEL) == NULL);
fail_unless(c1->getKineticLaw()->getAncestorOfType(SBML_REACTION) == c1);
fail_unless (c1->getKineticLaw()->getSBMLDocument() == NULL);
delete c1;
}