Class to control a running ground call.
More...
#include <ground.hh>
|
| | GroundHandle (clingo_ground_handle_t *hnd) |
| | Constructor from the underlying C representation.
|
| |
| auto | get () const -> GroundResult |
| | Get the solve result.
|
| |
| void | cancel () |
| | Cancel the current search.
|
| |
| void | close () noexcept |
| | Closes the solve handle.
|
| |
| auto | wait (std::optional< double > timeout) -> bool |
| | Wait for a running ground call.
|
| |
Class to control a running ground call.
◆ GroundHandle()
Constructor from the underlying C representation.
For internal use.
- Parameters
-
| hnd | the C representation of the solve handle |
◆ cancel()
| void Clingo::GroundHandle::cancel |
( |
| ) |
|
|
inline |
Cancel the current search.
This is a blocking operation.
◆ close()
| void Clingo::GroundHandle::close |
( |
| ) |
|
|
inlinenoexcept |
Closes the solve handle.
Blocks until the grounding process has been cleaned up.
◆ get()
Get the solve result.
This is a blocking operation and should always be called at the end of a search.
- Returns
- the solve result
◆ wait()
| auto Clingo::GroundHandle::wait |
( |
std::optional< double > |
timeout | ) |
-> bool |
|
inline |
Wait for a running ground call.
If no timeout is given, waits until the ground call is finished. Otherwise, waits for the given timeout in seconds. A value of zero can be used for polling.
- Parameters
-
| timeout | the optional timeout in seconds |
- Returns
- whether a model or result is available
◆ c_cast
Cast the solve handle to its C representation.
- Parameters
-
| x | the solve handle to cast |
- Returns
- the C representation of the solve handle
The documentation for this class was generated from the following file: