OR-Tools  9.6
SolveInterrupter

Detailed Description

Definition at line 39 of file solve_interrupter.h.

Public Types

using Callback = std::function< 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 (Callback callback)
 
void RemoveInterruptionCallback (CallbackId id)
 

Member Typedef Documentation

◆ Callback

using Callback = std::function<void()>

Definition at line 44 of file solve_interrupter.h.

Constructor & Destructor Documentation

◆ SolveInterrupter() [1/2]

SolveInterrupter ( )
default

◆ SolveInterrupter() [2/2]

SolveInterrupter ( const SolveInterrupter )
delete

Member Function Documentation

◆ AddInterruptionCallback()

SolveInterrupter::CallbackId AddInterruptionCallback ( Callback  callback)

Definition at line 55 of file solve_interrupter.cc.

◆ DEFINE_STRONG_INT_TYPE()

DEFINE_STRONG_INT_TYPE ( CallbackId  ,
int64_t   
)

◆ Interrupt()

void Interrupt ( )

Definition at line 30 of file solve_interrupter.cc.

◆ IsInterrupted()

bool IsInterrupted ( ) const
inline

Definition at line 63 of file solve_interrupter.h.

◆ operator=()

SolveInterrupter& operator= ( const SolveInterrupter )
delete

◆ RemoveInterruptionCallback()

void RemoveInterruptionCallback ( CallbackId  id)

Definition at line 77 of file solve_interrupter.cc.


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