libzypp: zypp/ng/sat/preparedpool.h Source File

libzypp 17.38.14

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
17#include <zypp/ng/sat/poolconstants.h>
18#include <zypp/ng/sat/queue.h>
19#include <zypp/ng/sat/solvattr.h>
20#include <zypp/ng/base/serialnumber.h>
21
22namespace zyppng::sat {
23
24 class Pool;
25 class Capability;
26 class Solvable;
27
50 class PreparedPool
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
99 Pool & _pool;
100#ifndef NDEBUG
101 SerialNumberWatcher _serialWatcher;
102#endif
103 };
104
105} // namespace zyppng::sat
106
107#endif // ZYPP_NG_SAT_PREPAREDPOOL_H_INCLUDED
zypp::SerialNumberWatcher
Simple serial number watcher.
Definition SerialNumber.h:123
zypp::sat::SolvAttr
Solvable attribute keys.
Definition SolvAttr.h:41
zyppng::sat::Capability
A sat capability.
Definition capability.h:74
zyppng::sat::Pool
Orchestrator for a libsolv pool instance.
Definition pool.h:37
zyppng::sat::PreparedPool::pool
Pool & pool() const noexcept
Access the owning Pool.
Definition preparedpool.h:63
zyppng::sat::PreparedPool::whatProvidesData
detail::IdType whatProvidesData(unsigned offset_r) const
Returns the id stored at offset_r in the whatprovidesdata array.
Definition preparedpool.cc:45
zyppng::sat::PreparedPool::PreparedPool
PreparedPool(PreparedPool &&)=default
zyppng::sat::PreparedPool::~PreparedPool
~PreparedPool()=default
zyppng::sat::PreparedPool::_pool
Pool & _pool
Definition preparedpool.h:99
zyppng::sat::PreparedPool::PreparedPool
PreparedPool(const PreparedPool &)=delete
zyppng::sat::PreparedPool::PreparedPool
PreparedPool()=delete
zyppng::sat::PreparedPool::whatMatchesDep
Queue whatMatchesDep(const SolvAttr &, const Capability &) const
All solvables whose attribute attr_r matches dependency cap_r.
Definition preparedpool.cc:50
zyppng::sat::PreparedPool::whatProvidesCapabilityId
unsigned whatProvidesCapabilityId(detail::IdType cap_r) const
Returns the offset into the internal whatprovidesdata array for cap_r.
Definition preparedpool.cc:40
zyppng::sat::PreparedPool::whatMatchesSolvable
Queue whatMatchesSolvable(const SolvAttr &, const Solvable &) const
All solvables whose attribute attr_r matches solvable solv_r.
Definition preparedpool.cc:57
zyppng::sat::PreparedPool::Pool
friend class Pool
Definition preparedpool.h:94
zyppng::sat::PreparedPool::_serialWatcher
SerialNumberWatcher _serialWatcher
Definition preparedpool.h:101
zyppng::sat::PreparedPool::operator=
PreparedPool & operator=(PreparedPool &&)=default
zyppng::sat::PreparedPool::operator=
PreparedPool & operator=(const PreparedPool &)=delete
zyppng::sat::PreparedPool::get
detail::CPool * get() const noexcept
Expert backdoor — raw libsolv pool pointer.
Definition preparedpool.cc:31
zyppng::sat::PreparedPool::whatContainsDep
Queue whatContainsDep(const SolvAttr &, const Capability &) const
All solvables whose attribute attr_r contains dependency cap_r.
Definition preparedpool.cc:64
zyppng::sat::Queue
Libsolv Id queue wrapper.
Definition queue.h:37
zyppng::sat::Solvable
A Solvable object within the sat Pool.
Definition solvable.h:66
zyppng::sat::detail
CLASS NAME : detail::DIWrap.
Definition cap2str.cc:14
zyppng::sat::detail::CPool
zypp::sat::detail::CPool CPool
Definition poolconstants.h:36
zyppng::sat
This file contains private API, this might break at any time between releases.
Definition capabilities.h:22
poolconstants.h
queue.h
serialnumber.h
solvattr.h