Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::SolveInterrupter Class Reference

Detailed Description

Definition at line 37 of file solve_interrupter.h.

#include <solve_interrupter.h>

Public Types

using Callback = absl::AnyInvocable<void() &&>

Public Member Functions

 DEFINE_STRONG_INT_TYPE (CallbackId, int64_t)
 SolveInterrupter ()=default
 SolveInterrupter (const SolveInterrupter &)=delete
SolveInterrupteroperator= (const SolveInterrupter &)=delete
void Interrupt ()
bool IsInterrupted () const
CallbackId AddInterruptionCallback (absl_nonnull Callback callback) const
void RemoveInterruptionCallback (CallbackId id) const

Member Typedef Documentation

◆ Callback

using operations_research::SolveInterrupter::Callback = absl::AnyInvocable<void() &&>

Definition at line 42 of file solve_interrupter.h.

Constructor & Destructor Documentation

◆ SolveInterrupter() [1/2]

operations_research::SolveInterrupter::SolveInterrupter ( )
default

◆ SolveInterrupter() [2/2]

operations_research::SolveInterrupter::SolveInterrupter ( const SolveInterrupter & )
delete

Member Function Documentation

◆ AddInterruptionCallback()

SolveInterrupter::CallbackId operations_research::SolveInterrupter::AddInterruptionCallback ( absl_nonnull Callback callback) const

Definition at line 59 of file solve_interrupter.cc.

◆ DEFINE_STRONG_INT_TYPE()

operations_research::SolveInterrupter::DEFINE_STRONG_INT_TYPE ( CallbackId ,
int64_t  )

◆ Interrupt()

void operations_research::SolveInterrupter::Interrupt ( )

Definition at line 28 of file solve_interrupter.cc.

◆ IsInterrupted()

bool operations_research::SolveInterrupter::IsInterrupted ( ) const
inline

Definition at line 61 of file solve_interrupter.h.

◆ operator=()

SolveInterrupter & operations_research::SolveInterrupter::operator= ( const SolveInterrupter & )
delete

◆ RemoveInterruptionCallback()

void operations_research::SolveInterrupter::RemoveInterruptionCallback ( CallbackId id) const

Definition at line 82 of file solve_interrupter.cc.


The documentation for this class was generated from the following files: