libzypp  17.38.7
preparedpool.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 ----------------------------------------------------------------------/
9 *
10 * This file contains private API, this might break at any time between releases.
11 * You have been warned!
12 *
13 */
14 #ifndef ZYPP_NG_SAT_PREPAREDPOOL_H_INCLUDED
15 #define ZYPP_NG_SAT_PREPAREDPOOL_H_INCLUDED
16 
18 #include <zypp/ng/sat/queue.h>
19 #include <zypp/ng/sat/solvattr.h>
21 
22 namespace zyppng::sat {
23 
24  class Pool;
25  class Capability;
26  class Solvable;
27 
51  {
52  public:
53  PreparedPool() = delete;
54  PreparedPool( const PreparedPool & ) = delete;
55  PreparedPool & operator=( const PreparedPool & ) = delete;
56 
57  PreparedPool( PreparedPool && ) = default;
58  PreparedPool & operator=( PreparedPool && ) = default;
59 
60  ~PreparedPool() = default;
61 
63  Pool & pool() const noexcept { return _pool; }
64 
66  detail::CPool * get() const noexcept;
67 
74 
77  unsigned whatProvidesCapabilityId( detail::IdType cap_r ) const;
78 
81  detail::IdType whatProvidesData( unsigned offset_r ) const;
82 
84  Queue whatMatchesDep ( const SolvAttr &, const Capability & ) const;
85 
87  Queue whatMatchesSolvable( const SolvAttr &, const Solvable & ) const;
88 
90  Queue whatContainsDep ( const SolvAttr &, const Capability & ) const;
92 
93  private:
94  friend class Pool;
95 
97  explicit PreparedPool( Pool & pool_r ) noexcept;
98 
100 #ifndef NDEBUG
102 #endif
103  };
104 
105 } // namespace zyppng::sat
106 
107 #endif // ZYPP_NG_SAT_PREPAREDPOOL_H_INCLUDED
Simple serial number watcher.
Definition: SerialNumber.h:122
A Solvable object within the sat Pool.
Definition: solvable.h:64
SerialNumberWatcher _serialWatcher
Definition: preparedpool.h:101
Orchestrator for a libsolv pool instance.
Definition: pool.h:36
Queue whatMatchesDep(const SolvAttr &, const Capability &) const
All solvables whose attribute attr_r matches dependency cap_r.
Definition: preparedpool.cc:50
zypp::sat::detail::CPool CPool
Definition: poolconstants.h:36
Queue whatContainsDep(const SolvAttr &, const Capability &) const
All solvables whose attribute attr_r contains dependency cap_r.
Definition: preparedpool.cc:64
A move-only, non-owning view of a Pool that guarantees the whatprovides index is valid.
Definition: preparedpool.h:50
PreparedPool & operator=(const PreparedPool &)=delete
This file contains private API, this might break at any time between releases.
Definition: capabilities.h:22
A sat capability.
Definition: capability.h:73
zypp::sat::detail::IdType IdType
Definition: poolconstants.h:43
Queue whatMatchesSolvable(const SolvAttr &, const Solvable &) const
All solvables whose attribute attr_r matches solvable solv_r.
Definition: preparedpool.cc:57
Libsolv Id queue wrapper.
Definition: queue.h:36
detail::IdType whatProvidesData(unsigned offset_r) const
Returns the id stored at offset_r in the whatprovidesdata array.
Definition: preparedpool.cc:45
unsigned whatProvidesCapabilityId(detail::IdType cap_r) const
Returns the offset into the internal whatprovidesdata array for cap_r.
Definition: preparedpool.cc:40
Pool & pool() const noexcept
Access the owning Pool.
Definition: preparedpool.h:63