libzypp 17.31.23
|
Parallel execution of stateful PluginScripts. More...
#include <PluginExecutor.h>
Classes | |
class | Impl |
PluginExecutor implementation. More... | |
Public Member Functions | |
PluginExecutor () | |
Default ctor: Empty plugin list. | |
~PluginExecutor () | |
Dtor: Send PLUGINEND and close all plugins. | |
operator bool () const | |
Validate object in a boolean context: There are plugins waiting for input. | |
bool | empty () const |
Whether no plugins are waiting. | |
size_t | size () const |
Number of open plugins. | |
void | load (const Pathname &path_r) |
Find and launch plugins sending PLUGINBEGIN . | |
void | send (const PluginFrame &frame_r) |
Send PluginFrame to all open plugins. | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Implementation class. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const PluginExecutor &obj) |
bool | operator== (const PluginExecutor &lhs, const PluginExecutor &rhs) |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const PluginExecutor &obj) |
Stream output. | |
bool | operator== (const PluginExecutor &lhs, const PluginExecutor &rhs) |
Comparison based on reference. | |
bool | operator!= (const PluginExecutor &lhs, const PluginExecutor &rhs) |
Comparison based on reference. | |
Parallel execution of stateful PluginScripts.
Sent PluginFrames are distributed to all open PluginScripts and need to be receipted by sending back either ACK
or _ENOMETHOD
command.
All PluginScripts receive an initial PLUGINBEGIN
frame, containing a userdata
header if ZConfig::userData are defined.
A final PLUGINEND
frame is sent and open scripts are closed, when the executors last reference goes out of scope. Failing PluginScripts are closed immediately.
Definition at line 41 of file PluginExecutor.h.
zypp::PluginExecutor::PluginExecutor | ( | ) |
Default ctor: Empty plugin list.
Definition at line 157 of file PluginExecutor.cc.
zypp::PluginExecutor::~PluginExecutor | ( | ) |
Dtor: Send PLUGINEND
and close all plugins.
Definition at line 161 of file PluginExecutor.cc.
|
inlineexplicit |
Validate object in a boolean context: There are plugins waiting for input.
Definition at line 55 of file PluginExecutor.h.
bool zypp::PluginExecutor::empty | ( | ) | const |
Whether no plugins are waiting.
Definition at line 164 of file PluginExecutor.cc.
size_t zypp::PluginExecutor::size | ( | ) | const |
Number of open plugins.
Definition at line 167 of file PluginExecutor.cc.
void zypp::PluginExecutor::load | ( | const Pathname & | path_r | ) |
Find and launch plugins sending PLUGINBEGIN
.
If path_r is a directory all executable files within are expected to be plugins. Otherwise path_r must point to an executable plugin.
Definition at line 170 of file PluginExecutor.cc.
void zypp::PluginExecutor::send | ( | const PluginFrame & | frame_r | ) |
Send PluginFrame to all open plugins.
Failed plugins are removed from the execution list.
Definition at line 173 of file PluginExecutor.cc.
|
friend |
Definition at line 176 of file PluginExecutor.cc.
|
friend |
|
related |
Stream output.
Definition at line 176 of file PluginExecutor.cc.
|
related |
Comparison based on reference.
Definition at line 88 of file PluginExecutor.h.
|
related |
Comparison based on reference.
Definition at line 92 of file PluginExecutor.h.
|
private |