DQCsim
|
Generic class for plugin configurations. More...
Public Member Functions | |
PluginConfiguration (HandleIndex handle) noexcept | |
Wraps the given plugin process or thread configuration handle. More... | |
PluginConfiguration (const PluginConfiguration &)=delete | |
void | operator= (const PluginConfiguration &)=delete |
PluginConfiguration (PluginConfiguration &&)=default | |
Default move constructor. | |
PluginConfiguration & | operator= (PluginConfiguration &&)=default |
Default move assignment. | |
virtual PluginType | get_plugin_type () const =0 |
Returns the plugin type. More... | |
virtual std::string | get_name () const =0 |
Returns the name given to the plugin. More... | |
virtual void | add_init_cmd (ArbCmd &&cmd)=0 |
Attaches an arbitrary initialization command to the plugin. More... | |
void | add_init_cmd (const ArbCmd &cmd) |
Attaches an arbitrary initialization command to the plugin. More... | |
virtual void | set_verbosity (Loglevel level)=0 |
Sets the logging verbosity level of the plugin. More... | |
virtual Loglevel | get_verbosity () const =0 |
Returns the current logging verbosity level of the plugin. More... | |
virtual void | log_tee (Loglevel verbosity, const std::string &filename)=0 |
Configures a plugin thread to also output its log messages to a file. 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... | |
Handle & | operator= (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. | |
|
inlinenoexcept |
|
pure virtual |
Returns the plugin type.
std::runtime_error | When the plugin definition handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.
|
pure virtual |
Returns the name given to the plugin.
std::runtime_error | When the plugin definition handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.
|
pure virtual |
Attaches an arbitrary initialization command to the plugin.
cmd | The initialization command to attach. |
std::runtime_error | When the plugin definition or command handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.
|
inline |
|
pure virtual |
Sets the logging verbosity level of the plugin.
level | The desired logging verbosity for the plugin instance. |
std::runtime_error | When the plugin definition handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.
|
pure virtual |
Returns the current logging verbosity level of the plugin.
std::runtime_error | When the plugin definition handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.
|
pure virtual |
Configures a plugin thread to also output its log messages to a file.
verbosity | Configures the verbosity level for the tee'd output file only. |
filename | The path to the file to tee log messages to. |
std::runtime_error | When the plugin definition handle is invalid. |
Implemented in dqcsim::wrap::PluginThreadConfiguration, and dqcsim::wrap::PluginProcessConfiguration.