DQCsim
Public Member Functions | List of all members
dqcsim::wrap::PluginJoinHandle Class Reference

Class wrapper for plugin join handles. More...

Inheritance diagram for dqcsim::wrap::PluginJoinHandle:
dqcsim::wrap::Handle

Public Member Functions

 PluginJoinHandle (HandleIndex handle) noexcept
 Wraps the given plugin join handle. More...
 
 PluginJoinHandle (const PluginJoinHandle &)=delete
 
void operator= (const PluginJoinHandle &)=delete
 
 PluginJoinHandle (PluginJoinHandle &&)=default
 Default move constructor.
 
PluginJoinHandleoperator= (PluginJoinHandle &&)=default
 Default move assignment.
 
void wait ()
 Waits for the plugin to terminate. More...
 
- Public Member Functions inherited from dqcsim::wrap::Handle
 Handle () noexcept
 Constructs an empty wrapper. More...
 
 Handle (HandleIndex handle) noexcept
 Wraps the given raw handle. More...
 
virtual ~Handle () noexcept
 Delete the handle and its wrapper.
 
void free ()
 Explicitly delete the handle, allowing errors to be caught. More...
 
bool is_valid () const noexcept
 Returns whether this wrapper (still) contains a valid handle. More...
 
HandleIndex get_handle () const noexcept
 Returns the raw handle without relinquishing ownership. More...
 
HandleIndex take_handle () noexcept
 Returns the raw handle and relinquishes ownership. More...
 
 Handle (const Handle &)=delete
 
void operator= (const Handle &)=delete
 
 Handle (Handle &&src)
 Move constructor; simply moves ownership of the handle from the source object to the constructed object. More...
 
Handleoperator= (Handle &&src)
 Move constructor; simply moves ownership of the handle from the source object to the assignment target. More...
 
std::string dump () const
 Returns a string containing a debug dump of the handle. More...
 
HandleType type () const
 Returns the type of this handle. More...
 

Additional Inherited Members

- Protected Attributes inherited from dqcsim::wrap::Handle
HandleIndex handle
 The wrapped handle.
 

Detailed Description

Class wrapper for plugin join handles.

Join handles are used only by the Plugin::start function, which starts the plugin process in a different, DQCsim-controlled thread. You can then use this object to wait for the thread to terminate, or let the destructor handle it if you want, RAII-style.

Definition at line 7333 of file dqcsim.

Constructor & Destructor Documentation

◆ PluginJoinHandle()

dqcsim::wrap::PluginJoinHandle::PluginJoinHandle ( HandleIndex  handle)
inlinenoexcept

Wraps the given plugin join handle.

Note
This constructor does not verify that the handle is actually valid.
Parameters
handleThe raw handle to wrap.

Definition at line 7344 of file dqcsim.

Member Function Documentation

◆ wait()

void dqcsim::wrap::PluginJoinHandle::wait ( )
inline

Waits for the plugin to terminate.

Exceptions
std::runtime_errorWhen plugin execution failed.

Definition at line 7366 of file dqcsim.


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