Slvs_hEntity aResult = SLVS_E_UNKNOWN;
if (!myFeatureStorage)
return aResult;
+ // Obtain regular constraints interacting with the feature and find its ID
std::set<ConstraintPtr> aConstraints = myFeatureStorage->getConstraints(theFeature);
if (aConstraints.empty())
return aResult;
std::set<ConstraintPtr>::iterator aConstrIter = aConstraints.begin();
- for (; aConstrIter != aConstraints.end(); aConstrIter++) {
+ for (; aConstrIter != aConstraints.end(); ++aConstrIter) {
ConstraintConstraintMap::const_iterator aCIter = myConstraints.find(*aConstrIter);
if (aCIter == myConstraints.end())
continue;
if (aResult != SLVS_E_UNKNOWN)
return aResult;
}
- return SLVS_E_UNKNOWN;
+ // The feature is not found, check it in the temporary constraints
+ std::set<SolverConstraintPtr>::iterator aTmpCIter = myTempConstraints.begin();
+ for (; aTmpCIter != myTempConstraints.end() && aResult == SLVS_E_UNKNOWN; ++aTmpCIter)
+ aResult = (*aTmpCIter)->getId(theFeature);
+ return aResult;
}
// ============================================================================
Slvs_hEntity aResult = SLVS_E_UNKNOWN;
if (!myFeatureStorage)
return aResult;
+ // Obtain regular constraints interacting with the attribute and find its ID
std::set<ConstraintPtr> aConstraints = myFeatureStorage->getConstraints(theAttribute);
if (aConstraints.empty())
return aResult;
if (aResult != SLVS_E_UNKNOWN)
return aResult;
}
- return SLVS_E_UNKNOWN;
+ // The attribute is not found, check it in the temporary constraints
+ std::set<SolverConstraintPtr>::iterator aTmpCIter = myTempConstraints.begin();
+ for (; aTmpCIter != myTempConstraints.end() && aResult == SLVS_E_UNKNOWN; ++aTmpCIter)
+ aResult = (*aTmpCIter)->getId(theAttribute);
+ return aResult;
}
// ============================================================================