本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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)
//.........这里部分代码省略.........
示例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;
}
}