libzypp  17.38.7
CommitPackageCache.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_COMMITPACKAGECACHE_H
13 #define ZYPP_TARGET_COMMITPACKAGECACHE_H
14 
15 #include <iosfwd>
16 
19 
20 #include <zypp/PoolItem.h>
21 #include <zypp-core/Pathname.h>
22 #include <zypp/ManagedFile.h>
23 
25 namespace zypp
26 {
27  namespace target
29  {
30 
39  {
40  public:
43 
45  ManagedFile operator()( const PoolItem & pi, bool fromCache_r );
46 
47  private:
48  struct Impl;
50  };
51 
53  //
54  // CLASS NAME : CommitPackageCache
55  //
59  {
60  friend std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
61 
62  public:
63  using PackageProvider = function<ManagedFile (const PoolItem &, bool)>;
64 
65  public:
68 
71 
72  public:
74  void setCommitList( std::vector<sat::Solvable> commitList_r );
76  template <class TIterator>
77  void setCommitList( TIterator begin_r, TIterator end_r )
78  { setCommitList( std::vector<sat::Solvable>( begin_r, end_r ) ); }
79 
81  ManagedFile get( const PoolItem & citem_r );
83  ManagedFile get( sat::Solvable citem_r )
84  { return get( PoolItem(citem_r) ); }
85 
90  bool preloaded() const;
92  void preloaded( bool newval_r );
93 
94  public:
96  class Impl;
98  explicit CommitPackageCache( Impl * pimpl_r );
99  private:
102  };
104 
106  std::ostream & operator<<( std::ostream & str, const CommitPackageCache & obj );
107 
109  } // namespace target
112 } // namespace zypp
114 #endif // ZYPP_TARGET_COMMITPACKAGECACHE_H
A Solvable object within the sat Pool.
Definition: Solvable.h:53
Target::commit helper optimizing package provision.
String related utilities and Regular expression matching.
RW_pointer< Impl > _pimpl
Pointer to implementation.
const Arch Arch_empty ZYPP_API
relates: Arch This is an empty Arch represented by an empty string.
Definition: Arch.h:173
void setCommitList(TIterator begin_r, TIterator end_r)
std::ostream & operator<<(std::ostream &str, const CommitPackageCache &obj)
relates: CommitPackageCache Stream output
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:50
Default PackageProvider for CommitPackageCache.
function< ManagedFile(const PoolItem &, bool)> PackageProvider
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1