1 #ifndef SimTK_SimTKCOMMON_EVENT_H_
2 #define SimTK_SimTKCOMMON_EVENT_H_
137 operator Num()
const {
return value;}
190 return Trigger(transition & mask);
214 bool shouldTriggerOnRisingSignTransition()
const;
215 bool shouldTriggerOnFallingSignTransition()
const;
216 Real getRequiredLocalizationTimeWindow()
const;
226 if (shouldTriggerOnRisingSignTransition()) {
229 if (shouldTriggerOnFallingSignTransition()) {
243 assert(!
"impossible event transition situation");
248 class EventTriggerInfoRep;
251 EventTriggerInfoRep* rep;
253 const EventTriggerInfoRep& getRep()
const {assert(rep);
return *rep;}
254 EventTriggerInfoRep& updRep() {assert(rep);
return *rep;}
276 UseInfinityNorm = 0x0002
282 { clear(); setAccuracy(accuracy); }
284 { clear(); setOption(opt); }
290 { optionSet=0; setAccuracyDefaults();
return *
this; }
296 assert(accuracy > 0);
297 requiredAccuracy = accuracy;
304 { optionSet &= ~(unsigned)opt;
return *
this; }
308 { optionSet |= (unsigned)opt;
return *
this; }
319 { optionSet |= opts.optionSet;
return *
this; }
321 { optionSet &= opts.optionSet;
return *
this; }
323 { optionSet &= ~opts.optionSet;
return *
this; }
329 Real requiredAccuracy;
332 void setAccuracyDefaults() {
333 requiredAccuracy = getDefaultAccuracy();
364 m_exitStatus = Invalid;
365 m_anyChangeMade =
false;
370 bool isValid()
const {
return m_exitStatus != Invalid;}
373 bool getAnyChangeMade()
const
374 { assert(isValid());
return m_anyChangeMade; }
375 Stage getLowestModifiedStage()
const
376 { assert(isValid());
return m_lowestModifiedStage; }
378 { assert(isValid());
return m_message; }
381 { m_exitStatus=status;
return *
this; }
383 { m_anyChangeMade=changeMade;
return *
this; }
385 { m_lowestModifiedStage=stage;
return *
this; }
387 { m_message=message;
return *
this; }
390 bool m_anyChangeMade;
391 Stage m_lowestModifiedStage;
397 #endif // SimTK_SimTKCOMMON_EVENT_H_