MCPcopy Create free account
hub / github.com/bwapi/bwapi / execute

Method execute

bwapi/include/BWAPI/InterfaceEvent.h:66–83  ·  view source on GitHub ↗

Function that runs the event, checkings its conditions and running its action, then decrementing the run count.

Source from the content-addressed store, hash-verified

64 // Function that runs the event, checkings its conditions and running its action, then
65 // decrementing the run count.
66 bool execute(T *instance)
67 {
68 // condition check
69 if ( !this->isConditionMet(instance) )
70 return false;
71
72 // There must be an exec proc!
73 if ( !this->execProc )
74 return false;
75
76 // execute
77 this->execProc(instance);
78
79 // Decrement run count (-1 being infinite)
80 if ( this->runCount > 0 )
81 --this->runCount;
82 return true;
83 };
84
85 // Function to check if the condition associated with the event is true. Includes frame and
86 // run count checking.

Callers

nothing calls this directly

Calls 1

isConditionMetMethod · 0.95

Tested by

no test coverage detected