libzypp: zypp/ng/sat/namespaces/namespaceprovider.h Source File

libzypp 17.38.11

namespaceprovider.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_NAMESPACES_NAMESPACEPROVIDER_H_INCLUDED
15#define ZYPP_NG_SAT_NAMESPACES_NAMESPACEPROVIDER_H_INCLUDED
16
17#include <string_view>
18#include <initializer_list>
19#include <zypp/ng/sat/poolconstants.h>
20
21namespace zyppng::sat {
22
23 class Pool;
24
35 class NamespaceProvider {
36 public:
37 virtual ~NamespaceProvider() = default;
38
46 virtual bool isSatisfied( detail::IdType value ) const;
47
55 virtual void checkDirty( Pool & /*pool*/ ) {}
56
66 virtual void prepare( Pool & /*pool*/ ) {}
67
68 virtual void onReset( Pool & /*pool*/ ) {}
69
73 virtual void attach(Pool &pool);
74
75 protected:
82 void notifyDirty( PoolInvalidation invalidationLevel , std::initializer_list<std::string_view> reasons );
83
84 protected:
85 Pool *_pool = nullptr;
86
87 };
88
89} // namespace zyppng::sat
90
91#endif
zyppng::sat::NamespaceProvider
Abstract base class for logic providing data to a libsolv namespace.
Definition namespaceprovider.h:35
zyppng::sat::NamespaceProvider::isSatisfied
virtual bool isSatisfied(detail::IdType value) const
Check if a specific value satisfies this namespace condition.
Definition namespaceprovider.cc:16
zyppng::sat::NamespaceProvider::notifyDirty
void notifyDirty(PoolInvalidation invalidationLevel, std::initializer_list< std::string_view > reasons)
Notify the attached registry/pool that data has changed.
Definition namespaceprovider.cc:26
zyppng::sat::NamespaceProvider::_pool
Pool * _pool
Definition namespaceprovider.h:85
zyppng::sat::NamespaceProvider::onReset
virtual void onReset(Pool &)
Definition namespaceprovider.h:68
zyppng::sat::NamespaceProvider::checkDirty
virtual void checkDirty(Pool &)
checkDirty
Definition namespaceprovider.h:55
zyppng::sat::NamespaceProvider::attach
virtual void attach(Pool &pool)
Definition namespaceprovider.cc:21
zyppng::sat::NamespaceProvider::prepare
virtual void prepare(Pool &)
prepare
Definition namespaceprovider.h:66
zyppng::sat::NamespaceProvider::~NamespaceProvider
virtual ~NamespaceProvider()=default
zyppng::sat::Pool
Orchestrator for a libsolv pool instance.
Definition pool.h:37
zypp::pool
Definition ByIdent.h:24
zyppng::sat::detail::IdType
zypp::sat::detail::IdType IdType
Definition poolconstants.h:43
zyppng::sat
This file contains private API, this might break at any time between releases.
Definition capabilities.h:22
zyppng::sat::PoolInvalidation
PoolInvalidation
Defines the scope of an invalidation request for the Pool.
Definition poolconstants.h:66
poolconstants.h