本文整理汇总了C++中Species::isSetId方法的典型用法代码示例。如果您正苦于以下问题:C++ Species::isSetId方法的具体用法?C++ Species::isSetId怎么用?C++ Species::isSetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Species
的用法示例。
在下文中一共展示了Species::isSetId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkSpecies
void checkSpecies(Model* model, set<string>& components, set<string>& tests, const map<string, vector<double> >& results, int type)
{
//Must call this after 'checkCompartments' because we look in 'tests' for 'NonUnityCompartment'.
if (model->getNumSpecies() > 0) {
components.insert("Species");
if (type==0) {
tests.insert("Amount||Concentration");
}
else if (type==2) {
tests.insert("Amount");
}
set<string> compartments;
for (unsigned int s=0; s<model->getNumSpecies(); s++) {
Species* species = model->getSpecies(s);
if (species->isSetBoundaryCondition() && species->getBoundaryCondition()) {
tests.insert("BoundaryCondition");
}
if (species->getConstant()) {
tests.insert("ConstantSpecies");
}
if (species->isSetConversionFactor()) {
tests.insert("ConversionFactors");
}
if (species->isSetHasOnlySubstanceUnits() && species->getHasOnlySubstanceUnits()) {
tests.insert("HasOnlySubstanceUnits");
}
if (!species->isSetInitialAmount() && !species->isSetInitialConcentration()) {
tests.insert("InitialValueReassigned");
}
else if (species->isSetId() && initialOverriddenIn(species->getId(), model, results, tests)) {
tests.insert("InitialValueReassigned");
}
if (species->isSetCompartment()) {
compartments.insert(species->getCompartment());
}
}
if (tests.find("MultiCompartment") != tests.end() && compartments.size()==1 && model->getNumSpecies() > 1) {
cerr << "Error: multiple compartments discovered, but all species are in a single compartment." << endl;
tests.insert("ERRORMultiCompartment");
}
}
}
示例2:
void
CompIdBase::checkId (const Species& x)
{
if (x.isSetId()) doCheckId(x.getId(), x);
}