libzypp  17.23.5
PluginExecutor.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_PLUGINEXECUTOR_H
12 #define ZYPP_PLUGINEXECUTOR_H
13 
14 #include <iosfwd>
15 
16 #include <zypp/base/PtrTypes.h>
17 #include <zypp/PluginScript.h>
18 
20 namespace zypp
21 {
42  {
43  friend std::ostream & operator<<( std::ostream & str, const PluginExecutor & obj );
44  friend bool operator==( const PluginExecutor & lhs, const PluginExecutor & rhs );
45 
46  public:
49 
52 
53  public:
55  explicit operator bool() const
56  { return !empty(); }
57 
59  bool empty() const;
60 
62  size_t size() const;
63 
64  public:
71  void load( const Pathname & path_r );
72 
76  void send( const PluginFrame & frame_r );
77 
78  public:
79  class Impl;
80  private:
82  };
83 
85  std::ostream & operator<<( std::ostream & str, const PluginExecutor & obj );
86 
88  inline bool operator==( const PluginExecutor & lhs, const PluginExecutor & rhs )
89  { return ( lhs._pimpl == rhs._pimpl ); }
90 
92  inline bool operator!=( const PluginExecutor & lhs, const PluginExecutor & rhs )
93  { return( ! operator==( lhs, rhs ) ); }
94 
95 } // namespace zypp
97 #endif // ZYPP_PLUGINEXECUTOR_H
zypp::PluginExecutor::Impl
PluginExecutor implementation.
Definition: PluginExecutor.cc:31
zypp::PluginExecutor::operator==
friend bool operator==(const PluginExecutor &lhs, const PluginExecutor &rhs)
PluginScript.h
zypp::PluginExecutor::load
void load(const Pathname &path_r)
Find and launch plugins sending PLUGINBEGIN.
Definition: PluginExecutor.cc:170
zypp::PluginExecutor::send
void send(const PluginFrame &frame_r)
Send PluginFrame to all open plugins.
Definition: PluginExecutor.cc:173
zypp::PluginExecutor::_pimpl
RW_pointer< Impl > _pimpl
Implementation class.
Definition: PluginExecutor.h:79
zypp::PluginExecutor::PluginExecutor
PluginExecutor()
Default ctor: Empty plugin list.
Definition: PluginExecutor.cc:157
PtrTypes.h
zypp::PluginExecutor::size
size_t size() const
Number of open plugins.
Definition: PluginExecutor.cc:167
bool
zypp::RW_pointer< Impl >
zypp::PluginExecutor::operator<<
friend std::ostream & operator<<(std::ostream &str, const PluginExecutor &obj)
Definition: PluginExecutor.cc:176
zypp::PluginExecutor::~PluginExecutor
~PluginExecutor()
Dtor: Send PLUGINEND and close all plugins.
Definition: PluginExecutor.cc:161
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1
zypp::PluginFrame
Command frame for communication with PluginScript.
Definition: PluginFrame.h:40
zypp::PluginExecutor::operator!=
bool operator!=(const PluginExecutor &lhs, const PluginExecutor &rhs)
Definition: PluginExecutor.h:92
zypp::PluginExecutor
Parallel execution of stateful PluginScripts.
Definition: PluginExecutor.h:41
zypp::operator<<
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
zypp::filesystem::Pathname
Pathname.
Definition: Pathname.h:44
str
String related utilities and Regular expression matching.
zypp::PluginExecutor::empty
bool empty() const
Whether no plugins are waiting.
Definition: PluginExecutor.cc:164