当前位置: 首页>>代码示例>>C++>>正文


C++ ListOf::getParentSBMLObject方法代码示例

本文整理汇总了C++中ListOf::getParentSBMLObject方法的典型用法代码示例。如果您正苦于以下问题:C++ ListOf::getParentSBMLObject方法的具体用法?C++ ListOf::getParentSBMLObject怎么用?C++ ListOf::getParentSBMLObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ListOf的用法示例。


在下文中一共展示了ListOf::getParentSBMLObject方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Model

END_TEST


START_TEST ( test_Event_parent_create )
{
    Model *m = new Model(2, 4);
    Event *e = m->createEvent();

    ListOf *lo = m->getListOfEvents();

    fail_unless(lo == m->getEvent(0)->getParentSBMLObject());
    fail_unless(lo == e->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestSBMLParentObject.cpp

示例2: Reaction

END_TEST


START_TEST ( test_SpeciesReference_Reactant_parent_create )
{
    Reaction *r = new Reaction(2, 4);
    SpeciesReference *sr = r->createReactant();

    ListOf *lo = r->getListOfReactants();

    fail_unless(lo == r->getReactant(0)->getParentSBMLObject());
    fail_unless(lo == sr->getParentSBMLObject());
    fail_unless(r == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:14,代码来源:TestSBMLParentObject.cpp

示例3: Event

END_TEST


START_TEST ( test_EventAssignment_parent_create )
{
    Event *e = new Event(2, 4);

    EventAssignment *ea = e->createEventAssignment();

    ListOf *lo = e->getListOfEventAssignments();

    fail_unless(lo == e->getEventAssignment(0)->getParentSBMLObject());
    fail_unless(lo == ea->getParentSBMLObject());
    fail_unless(e == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:15,代码来源:TestSBMLParentObject.cpp

示例4: Constraint

END_TEST


START_TEST ( test_Constraint_parent_add )
{
    Constraint *ct = new Constraint(2, 4);
    Model *m = new Model(2, 4);
    ct->setMath(SBML_parseFormula("a-k"));
    m->addConstraint(ct);

    delete ct;

    ListOf *lo = m->getListOfConstraints();

    fail_unless(lo == m->getConstraint(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestSBMLParentObject.cpp

示例5: CompartmentType

END_TEST


START_TEST ( test_CompartmentType_parent_add )
{
    CompartmentType *ct = new CompartmentType(2, 4);
    Model *m = new Model(2, 4);
    ct->setId("ct");
    m->addCompartmentType(ct);

    delete ct;

    ListOf *lo = m->getListOfCompartmentTypes();

    fail_unless(lo == m->getCompartmentType(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:17,代码来源:TestSBMLParentObject.cpp

示例6: UnitDefinition

END_TEST


START_TEST ( test_Unit_parent_create )
{
    UnitDefinition* ud = new UnitDefinition(2, 4);
    Unit * u = ud->createUnit();

    fail_unless(ud->getNumUnits() == 1);

    ListOf *lo = ud->getListOfUnits();

    fail_unless(lo == ud->getUnit(0)->getParentSBMLObject());
    fail_unless(lo == u->getParentSBMLObject());
    fail_unless(ud == lo->getParentSBMLObject());

    delete ud;
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestSBMLParentObject.cpp

示例7: Parameter

END_TEST


START_TEST ( test_Parameter_parent_add )
{
    Parameter *ia = new Parameter(2, 4);
    Model *m = new Model(2, 4);
    ia->setId("p");

    m->addParameter(ia);

    delete ia;

    ListOf *lo = m->getListOfParameters();

    fail_unless(lo == m->getParameter(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestSBMLParentObject.cpp

示例8: SpeciesReference

END_TEST


START_TEST ( test_SpeciesReference_Reactant_parent_add )
{
    SpeciesReference *sr = new SpeciesReference(2, 4);
    Reaction *r = new Reaction(2, 4);

    sr->setSpecies("s");
    r->addReactant(sr);

    delete sr;

    ListOf *lo = r->getListOfReactants();

    fail_unless(lo == r->getReactant(0)->getParentSBMLObject());
    fail_unless(r == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestSBMLParentObject.cpp

示例9: SpeciesType

END_TEST


START_TEST ( test_SpeciesType_parent_add )
{
    SpeciesType *ia = new SpeciesType(2, 4);
    ia->setId("s");
    Model *m = new Model(2, 4);

    m->addSpeciesType(ia);

    delete ia;

    ListOf *lo = m->getListOfSpeciesTypes();

    fail_unless(lo == m->getSpeciesType(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestSBMLParentObject.cpp

示例10: ModifierSpeciesReference

END_TEST


START_TEST ( test_SpeciesReference_Modifier_parent_add )
{
    ModifierSpeciesReference *sr = new ModifierSpeciesReference(2, 4);
    sr->setSpecies("s");
    Reaction *r = new Reaction(2, 4);

    r->addModifier(sr);

    delete sr;

    ListOf *lo = r->getListOfModifiers();

    fail_unless(lo == r->getModifier(0)->getParentSBMLObject());
    fail_unless(r == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:18,代码来源:TestSBMLParentObject.cpp

示例11: InitialAssignment

END_TEST


START_TEST ( test_InitialAssignment_parent_add )
{
    InitialAssignment *ia = new InitialAssignment(2, 4);
    Model *m = new Model(2, 4);
    ia->setSymbol("c");
    ia->setMath(SBML_parseFormula("9"));

    m->addInitialAssignment(ia);

    delete ia;

    ListOf *lo = m->getListOfInitialAssignments();

    fail_unless(lo == m->getInitialAssignment(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:19,代码来源:TestSBMLParentObject.cpp

示例12: FunctionDefinition

END_TEST


START_TEST ( test_FunctionDefinition_parent_add )
{
    FunctionDefinition *fd = new FunctionDefinition(2, 4);
    Model *m = new Model(2, 4);
    fd->setId("fd");
    fd->setMath(SBML_parseFormula("l"));

    m->addFunctionDefinition(fd);

    delete fd;

    ListOf *lo = m->getListOfFunctionDefinitions();

    fail_unless(lo == m->getFunctionDefinition(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:19,代码来源:TestSBMLParentObject.cpp

示例13: RateRule

END_TEST



START_TEST ( test_Rule_parent_add )
{
    Rule *ia = new RateRule(2, 4);
    ia->setVariable("a");
    ia->setMath(SBML_parseFormula("9"));
    Model *m = new Model(2, 4);

    m->addRule(ia);

    delete ia;

    ListOf *lo = m->getListOfRules();

    fail_unless(lo == m->getRule(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:20,代码来源:TestSBMLParentObject.cpp

示例14: Compartment

LIBSBML_CPP_NAMESPACE_USE

/** @endcond */


BEGIN_C_DECLS

START_TEST ( test_Compartment_parent_add )
{
    Compartment *c = new Compartment(2, 4);
    c->setId("c");
    Model *m = new Model(2, 4);

    m->addCompartment(c);

    delete c;

    ListOf *lo = m->getListOfCompartments();

    fail_unless(lo == m->getCompartment(0)->getParentSBMLObject());
    fail_unless(m == lo->getParentSBMLObject());
}
开发者ID:alexholehouse,项目名称:SBMLIntegrator,代码行数:22,代码来源:TestSBMLParentObject.cpp


注:本文中的ListOf::getParentSBMLObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。