| 49 |  | namespace oopse { | 
| 50 |  |  | 
| 51 |  |  | 
| 52 | < | SelectionEvaluator::SelectionEvaluator(SimInfo* si) : info(si), nameFinder(info), distanceFinder(info), isLoaded_(false){ | 
| 52 | > | SelectionEvaluator::SelectionEvaluator(SimInfo* si) | 
| 53 | > | : info(si), nameFinder(info), distanceFinder(info), indexFinder(info), isLoaded_(false){ | 
| 54 | > |  | 
| 55 |  | nStuntDouble = info->getNGlobalAtoms() + info->getNRigidBodies(); | 
| 56 |  | } | 
| 57 |  |  | 
| 86 |  | } | 
| 87 |  |  | 
| 88 |  | void SelectionEvaluator::clearState() { | 
| 87 | – | //for (int i = scriptLevelMax; --i >= 0; ) | 
| 88 | – | //    stack[i].clear(); | 
| 89 | – | //scriptLevel = 0; | 
| 89 |  | error = false; | 
| 90 |  | errorMessage = ""; | 
| 91 |  | } | 
| 227 |  | compareProperty(atom, bs, property, comparator, comparisonValue); | 
| 228 |  | } | 
| 229 |  |  | 
| 231 | – | //change the positions of atoms which belong to the rigidbodies | 
| 230 |  | for (rb = mol->beginRigidBody(rbIter); rb != NULL; rb = mol->nextRigidBody(rbIter)) { | 
| 231 |  | compareProperty(rb, bs, property, comparator, comparisonValue); | 
| 232 |  | } | 
| 298 |  |  | 
| 299 |  | std::string variable = boost::any_cast<std::string>(statement[1].value); | 
| 300 |  |  | 
| 301 | < | variables.insert(std::make_pair(variable, expression(statement, 2))); | 
| 301 | > | variables.insert(VariablesType::value_type(variable, expression(statement, 2))); | 
| 302 |  | } | 
| 303 |  |  | 
| 304 |  |  | 
| 317 |  | int tok = statement[1].tok; | 
| 318 |  | if (tok == Token::identifier || (tok & Token::predefinedset) == Token::predefinedset) { | 
| 319 |  | std::string variable = boost::any_cast<std::string>(statement[1].value); | 
| 320 | < | variables.insert(std::make_pair(variable, statement)); | 
| 320 | > | variables.insert(VariablesType::value_type(variable, statement)); | 
| 321 |  |  | 
| 322 |  | } else { | 
| 323 |  | evalError("invalid variable name:" + script); | 
| 399 |  | if (index < 0 || index >= bs.size()) { | 
| 400 |  | invalidIndex(index); | 
| 401 |  | } else { | 
| 402 | < | bs.setBitOn(index); | 
| 402 | > | bs = indexFinder.find(index); | 
| 403 |  | } | 
| 404 |  | } else if (value.type() == typeid(std::pair<int, int>)) { | 
| 405 |  | std::pair<int, int> indexRange= boost::any_cast<std::pair<int, int> >(value); | 
| 407 |  | if (indexRange.first < 0 || indexRange.second >= bs.size()) { | 
| 408 |  | invalidIndexRange(indexRange); | 
| 409 |  | }else { | 
| 410 | < | bs.setRangeOn(indexRange.first, indexRange.second); | 
| 410 | > | bs = indexFinder.find(indexRange.first, indexRange.second); | 
| 411 |  | } | 
| 412 |  | } | 
| 413 |  |  | 
| 414 |  | return bs; | 
| 415 |  | } | 
| 416 |  |  | 
| 419 | – | //BitSet SelectionEvaluator::evaluate(int frameNo) { | 
| 420 | – | // | 
| 421 | – | //} | 
| 422 | – |  | 
| 417 |  | } |