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


C++ ConstraintSet::add方法代码示例

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


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

示例1:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
ReqValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }
  if (dynamic_cast< TConstraint<ChangedMath>* >(c) != NULL)
  {
    mChangedMath.add( static_cast< TConstraint<ChangedMath>* >(c) );
    return;
  }

}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:28,代码来源:ReqValidator.cpp

示例2:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
ArraysValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }
  if (dynamic_cast< TConstraint<Dimension>* >(c) != NULL)
  {
    mDimension.add( static_cast< TConstraint<Dimension>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Index>* >(c) != NULL)
  {
    mIndex.add( static_cast< TConstraint<Index>* >(c) );
    return;
  }

}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:34,代码来源:ArraysValidator.cpp

示例3:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
GroupsValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }
  if (dynamic_cast< TConstraint<Member>* >(c) != NULL)
  {
    mMember.add( static_cast< TConstraint<Member>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<MemberConstraint>* >(c) != NULL)
  {
    mMemberConstraint.add( static_cast< TConstraint<MemberConstraint>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Group>* >(c) != NULL)
  {
    mGroup.add( static_cast< TConstraint<Group>* >(c) );
    return;
  }

}
开发者ID:sys-bio,项目名称:libroadrunner-deps,代码行数:40,代码来源:GroupsValidator.cpp

示例4:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
DistribValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }
  if (dynamic_cast< TConstraint<DrawFromDistribution>* >(c) != NULL)
  {
    mDrawFromDistribution.add( static_cast< TConstraint<DrawFromDistribution>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<DistribInput>* >(c) != NULL)
  {
    mDistribInput.add( static_cast< TConstraint<DistribInput>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Uncertainty>* >(c) != NULL)
  {
    mUncertainty.add( static_cast< TConstraint<Uncertainty>* >(c) );
    return;
  }

}
开发者ID:TheCoSMoCompany,项目名称:biopredyn,代码行数:40,代码来源:DistribValidator.cpp

示例5:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
QualValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<QualitativeSpecies>* >(c) != NULL)
  {
    mQualitativeSpecies.add( static_cast< TConstraint<QualitativeSpecies>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Transition>* >(c) != NULL)
  {
    mTransition.add( static_cast< TConstraint<Transition>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Input>* >(c) != NULL)
  {
    mInput.add( static_cast< TConstraint<Input>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Output>* >(c) != NULL)
  {
    mOutput.add( static_cast< TConstraint<Output>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<FunctionTerm>* >(c) != NULL)
  {
    mFunctionTerm.add( static_cast< TConstraint<FunctionTerm>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<DefaultTerm>* >(c) != NULL)
  {
    mDefaultTerm.add( static_cast< TConstraint<DefaultTerm>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<ListOfFunctionTerms>* >(c) != NULL)
  {
    mListOfFunctionTerms.add( static_cast< TConstraint<ListOfFunctionTerms>* >(c) );
    return;
  }
}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:64,代码来源:QualValidator.cpp

示例6:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
ValidatorConstraints::add (VConstraint* c)
{
  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c))
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c))
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<FunctionDefinition>* >(c))
  {
    mFunctionDefinition.add
    (
      static_cast< TConstraint<FunctionDefinition>* >(c)
    );
    return;
  }

  if (dynamic_cast< TConstraint<UnitDefinition>* >(c))
  {
    mUnitDefinition.add( static_cast< TConstraint<UnitDefinition>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Unit>* >(c))
  {
    mUnit.add( static_cast< TConstraint<Unit>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Compartment>* >(c))
  {
    mCompartment.add( static_cast< TConstraint<Compartment>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Species>* >(c))
  {
    mSpecies.add( static_cast< TConstraint<Species>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Parameter>* >(c))
  {
    mParameter.add( static_cast< TConstraint<Parameter>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Rule>* >(c))
  {
    mRule.add( static_cast< TConstraint<Rule>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<AlgebraicRule>* >(c))
  {
    mAlgebraicRule.add( static_cast< TConstraint<AlgebraicRule>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<AssignmentRule>* >(c))
  {
    mAssignmentRule.add( static_cast< TConstraint<AssignmentRule>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<RateRule>* >(c))
  {
    mRateRule.add( static_cast< TConstraint<RateRule>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Reaction>* >(c))
  {
    mReaction.add( static_cast< TConstraint<Reaction>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<KineticLaw>* >(c))
  {
    mKineticLaw.add( static_cast< TConstraint<KineticLaw>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SimpleSpeciesReference>* >(c))
  {
    mSimpleSpeciesReference.add
    (
      static_cast< TConstraint<SimpleSpeciesReference>* >(c)
//.........这里部分代码省略.........
开发者ID:mgaldzic,项目名称:copasi_api,代码行数:101,代码来源:Validator.cpp

示例7:

/*
 * Adds the given Contraint to the appropriate ConstraintSet.
 */
void
MultiValidatorConstraints::add (VConstraint* c)
{
  if (c == NULL) return;

  ptrMap.insert(pair<VConstraint*,bool>(c,true));

  if (dynamic_cast< TConstraint<SBMLDocument>* >(c) != NULL)
  {
    mSBMLDocument.add( static_cast< TConstraint<SBMLDocument>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<Model>* >(c) != NULL)
  {
    mModel.add( static_cast< TConstraint<Model>* >(c) );
    return;
  }
  if (dynamic_cast< TConstraint<PossibleSpeciesFeatureValue>* >(c) != NULL)
  {
    mPossibleSpeciesFeatureValue.add( static_cast< TConstraint<PossibleSpeciesFeatureValue>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesFeatureValue>* >(c) != NULL)
  {
    mSpeciesFeatureValue.add( static_cast< TConstraint<SpeciesFeatureValue>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<CompartmentReference>* >(c) != NULL)
  {
    mCompartmentReference.add( static_cast< TConstraint<CompartmentReference>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesTypeInstance>* >(c) != NULL)
  {
    mSpeciesTypeInstance.add( static_cast< TConstraint<SpeciesTypeInstance>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<InSpeciesTypeBond>* >(c) != NULL)
  {
    mInSpeciesTypeBond.add( static_cast< TConstraint<InSpeciesTypeBond>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<DenotedSpeciesTypeComponentIndex>* >(c) != NULL)
  {
    mDenotedSpeciesTypeComponentIndex.add( static_cast< TConstraint<DenotedSpeciesTypeComponentIndex>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<OutwardBindingSite>* >(c) != NULL)
  {
    mOutwardBindingSite.add( static_cast< TConstraint<OutwardBindingSite>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesFeatureChange>* >(c) != NULL)
  {
    mSpeciesFeatureChange.add( static_cast< TConstraint<SpeciesFeatureChange>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesFeatureType>* >(c) != NULL)
  {
    mSpeciesFeatureType.add( static_cast< TConstraint<SpeciesFeatureType>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesTypeComponentIndex>* >(c) != NULL)
  {
    mSpeciesTypeComponentIndex.add( static_cast< TConstraint<SpeciesTypeComponentIndex>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesFeature>* >(c) != NULL)
  {
    mSpeciesFeature.add( static_cast< TConstraint<SpeciesFeature>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<SpeciesTypeComponentMapInProduct>* >(c) != NULL)
  {
    mSpeciesTypeComponentMapInProduct.add( static_cast< TConstraint<SpeciesTypeComponentMapInProduct>* >(c) );
    return;
  }

  if (dynamic_cast< TConstraint<MultiSpeciesType>* >(c) != NULL)
  {
    mMultiSpeciesType.add( static_cast< TConstraint<MultiSpeciesType>* >(c) );
    return;
  }

}
开发者ID:kirichoi,项目名称:roadrunner,代码行数:100,代码来源:MultiValidator.cpp


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