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

Method isConditionMet

bwapi/include/BWAPI/InterfaceEvent.h:87–103  ·  view source on GitHub ↗

Function to check if the condition associated with the event is true. Includes frame and run count checking.

Source from the content-addressed store, hash-verified

85 // Function to check if the condition associated with the event is true. Includes frame and
86 // run count checking.
87 bool isConditionMet(T *instance)
88 {
89 // Validity check
90 if ( this->isFinished() )
91 return false;
92
93 // Frame check
94 --step;
95 if ( step > 0 )
96 return false;
97 this->step = this->runFreq;
98
99 // Conditional check
100 if ( this->condProc )
101 return this->condProc(instance);
102 return true; // always run if there is no conditional function
103 };
104 private:
105 // Data members
106 std::function<bool(T*)> condProc = nullptr;

Callers 1

executeMethod · 0.95

Calls 1

isFinishedMethod · 0.95

Tested by

no test coverage detected