本文整理汇总了C++中ControlPoint::getTriggerPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlPoint::getTriggerPoint方法的具体用法?C++ ControlPoint::getTriggerPoint怎么用?C++ ControlPoint::getTriggerPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControlPoint
的用法示例。
在下文中一共展示了ControlPoint::getTriggerPoint方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getBoxById
void
CSPold::removeBox(unsigned int boxId, std::vector<unsigned int>& relationsRemoved, std::vector<unsigned int>& triggersRemoved)
{
ConstrainedBox* cedBox = getBoxById(boxId);
relationsRemoved.clear();
triggersRemoved.clear();
/*
remove cedBox from the boxes hierarchy
*/
// for (vector<ConstrainedBox*>::iterator it = cedBox->children()->begin() ; it != cedBox->children()->end() ; it++)
// {
// removeBoundingRelation((*it)->boundingRelation());
// (*it)->setMother(cedBox->mother(), addBoundingRelation(cedBox->mother(), (*it)));
// }
if (cedBox->mother())
{
// removeBoundingRelation(cedBox->boundingRelation());
// cedBox->mother()->removeChild(cedBox);
}
/*
remove temporal constraints implicating cedBox
*/
vector<BinaryTemporalRelation*> *relToRemove = links(cedBox);
for (vector<BinaryTemporalRelation*>::iterator it = relToRemove->begin() ; it != relToRemove->end() ; it++)
{
unsigned int relationId = (*it)->getId();
relationsRemoved.push_back(relationId);
removeTemporalRelation((*it));
delete (*it);
}
relToRemove->clear();
delete relToRemove;
vector<unsigned int>* controlPointID = new vector <unsigned int>;
cedBox->getAllControlPointsId(controlPointID);
for (unsigned int i = 0 ; i < controlPointID->size() ; ++i) {
ControlPoint* currentControlPoint = cedBox->getControlPoint(controlPointID->at(i));
if(currentControlPoint->getTriggerPoint() != NULL) {
TriggerPoint* currentTriggerPoint = currentControlPoint->getTriggerPoint();
triggersRemoved.push_back(currentTriggerPoint->getTriggerId());
currentTriggerPoint->removeRelatedControlPoint();
}
relToRemove = links(currentControlPoint);
for (vector<BinaryTemporalRelation*>::iterator it = relToRemove->begin() ; it != relToRemove->end() ; it++)
{
removeTemporalRelation((*it));
delete (*it);
}
_solver->removeIntVar(currentControlPoint->beginID());
_solver->removeIntVar(currentControlPoint->lengthID());
}
/*
remove related variables from the solver
*/
_solver->removeIntVar(cedBox->beginID());
_solver->removeIntVar(cedBox->lengthID());
/*
remove cedBox from the constrained objects' list of the CSPold
*/
_cedEntities->erase(boxId);
}