MESSAGE("ENGINE : SETATTRACTOR START ENTRY : " << entry);
bool valueChanged = false;
try {
- valueChanged = (this->GetImpl()->GetAttractorEntry(entry) != attractor);
- if (valueChanged) {
- boost::regex re("^ATTRACTOR\\((?:(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+);){5}(True|False)\\)$");
+ valueChanged = ( this->GetImpl()->GetAttractorEntry(entry) != attractor );
+ if ( valueChanged ) {
+ //boost::regex re("^ATTRACTOR\\((?:(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+);){5}(True|False)\\)$");
+ boost::regex re("^ATTRACTOR\\((?:(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+);){5}(True|False)(?:;(-?0(\\.\\d*)*|-?[1-9]+\\d*(\\.\\d*)*|-?\\.(\\d)+))?\\)$");
if (!boost::regex_match(string(attractor), re))
- throw std::invalid_argument(
- "Error: an attractor is defined with the following pattern: ATTRACTOR(xa;ya;za;a;b;True|False)");
+ throw std::invalid_argument("Error: an attractor is defined with the following pattern: ATTRACTOR(xa;ya;za;a;b;True|False;d(opt.))");
this->GetImpl()->SetAttractorEntry(entry, attractor);
}
} catch (const std::invalid_argument& ex) {