| 61 | } |
| 62 | |
| 63 | bool HighsCallback::callbackActive(const int callback_type) { |
| 64 | // Check that callback function has been defined |
| 65 | if (!this->user_callback) return false; |
| 66 | // Check that callback_type is within range |
| 67 | const bool callback_type_ok = |
| 68 | callback_type >= kCallbackMin && callback_type <= kCallbackMax; |
| 69 | assert(callback_type_ok); |
| 70 | if (!callback_type_ok) return false; |
| 71 | // Don't call callback if it is not active |
| 72 | assert(this->active.size() > 0); |
| 73 | if (!this->active[callback_type]) return false; |
| 74 | return true; |
| 75 | } |
| 76 | |
| 77 | bool HighsCallback::callbackAction(const int callback_type, |
| 78 | std::string message) { |
no test coverage detected