libzypp  17.38.7
zyppng::sat::PoolComponentSet Class Reference

Registry and dispatcher for all pool components. More...

#include <zypp/ng/sat/components/poolcomponents.h>

Classes

struct  CompContainer
 
struct  TypeErasure
 

Public Member Functions

 PoolComponentSet ()=default
 
 PoolComponentSet (const PoolComponentSet &)=delete
 
 PoolComponentSet (PoolComponentSet &&)=default
 
PoolComponentSetoperator= (const PoolComponentSet &)=delete
 
PoolComponentSetoperator= (PoolComponentSet &&)=default
 
template<typename T >
T & assertComponent (std::unique_ptr< T > &&compPtr={})
 
template<typename T >
const T * findComponent () const
 
void notifyCheckDirty (Pool &pool)
 Pass 1 of prepare(): probe external state. More...
 
void notifyPrepare (Pool &pool)
 Pass 2 of prepare(): pre-index component work (stage/priority order). More...
 
void notifyPrepareWithIndex (PreparedPool &pp)
 Pass 3 of prepare(): post-index component work (stage/priority order). More...
 
void notifyInvalidate (Pool &pool, PoolInvalidation invalidation)
 
void notifyRepoAdded (Pool &pool, detail::RepoIdType id)
 
void notifyRepoRemoved (Pool &pool, detail::RepoIdType id)
 
void notifyReset (Pool &pool)
 

Private Member Functions

void sortInitBuckets ()
 
void sortPreparedBuckets ()
 

Private Attributes

std::unordered_map< std::type_index, std::unique_ptr< TypeErasure > > _components
 
std::vector< detail::IBasicPoolComponent * > _basicComponents
 Unified list for checkDirty / onInvalidate / onRepoAdded / onRepoRemoved. More...
 
std::array< std::vector< IPoolComponent * >, static_cast< size_t >InitStage::COUNT)> _initComponents
 Pre-index components — stage-bucketed, priority-sorted within bucket. More...
 
std::array< bool, static_cast< size_t >InitStage::COUNT)> _initDirtyBuckets = {false,}
 
std::array< std::vector< IPreparedPoolComponent * >, static_cast< size_t >PreparedStage::COUNT)> _preparedComponents
 Post-index components — stage-bucketed, priority-sorted within bucket. More...
 
std::array< bool, static_cast< size_t >PreparedStage::COUNT)> _preparedDirtyBuckets = {false,}
 

Detailed Description

Registry and dispatcher for all pool components.

Maintains three internal structures:

  • A unified flat list of IBasicPoolComponent* for checkDirty/onInvalidate/onRepo* callbacks.
  • Stage-bucketed lists of IPoolComponent* for pre-index prepare dispatch.
  • Stage-bucketed lists of IPreparedPoolComponent* for post-index prepare dispatch.

Dual-phase components (inheriting both IPoolComponent and IPreparedPoolComponent) are explicitly forbidden by policy — split into two cooperating components instead.

Definition at line 138 of file poolcomponents.h.

Constructor & Destructor Documentation

◆ PoolComponentSet() [1/3]

zyppng::sat::PoolComponentSet::PoolComponentSet ( )
default

◆ PoolComponentSet() [2/3]

zyppng::sat::PoolComponentSet::PoolComponentSet ( const PoolComponentSet )
delete

◆ PoolComponentSet() [3/3]

zyppng::sat::PoolComponentSet::PoolComponentSet ( PoolComponentSet &&  )
default

Member Function Documentation

◆ operator=() [1/2]

PoolComponentSet& zyppng::sat::PoolComponentSet::operator= ( const PoolComponentSet )
delete

◆ operator=() [2/2]

PoolComponentSet& zyppng::sat::PoolComponentSet::operator= ( PoolComponentSet &&  )
default

◆ assertComponent()

template<typename T >
T& zyppng::sat::PoolComponentSet::assertComponent ( std::unique_ptr< T > &&  compPtr = {})
inline

Definition at line 147 of file poolcomponents.h.

◆ findComponent()

template<typename T >
const T* zyppng::sat::PoolComponentSet::findComponent ( ) const
inline

Definition at line 183 of file poolcomponents.h.

◆ notifyCheckDirty()

void zyppng::sat::PoolComponentSet::notifyCheckDirty ( Pool pool)
inline

Pass 1 of prepare(): probe external state.

setDirty() is legal here.

Definition at line 191 of file poolcomponents.h.

◆ notifyPrepare()

void zyppng::sat::PoolComponentSet::notifyPrepare ( Pool pool)
inline

Pass 2 of prepare(): pre-index component work (stage/priority order).

Definition at line 197 of file poolcomponents.h.

◆ notifyPrepareWithIndex()

void zyppng::sat::PoolComponentSet::notifyPrepareWithIndex ( PreparedPool pp)
inline

Pass 3 of prepare(): post-index component work (stage/priority order).

Definition at line 205 of file poolcomponents.h.

◆ notifyInvalidate()

void zyppng::sat::PoolComponentSet::notifyInvalidate ( Pool pool,
PoolInvalidation  invalidation 
)
inline

Definition at line 212 of file poolcomponents.h.

◆ notifyRepoAdded()

void zyppng::sat::PoolComponentSet::notifyRepoAdded ( Pool pool,
detail::RepoIdType  id 
)
inline

Definition at line 217 of file poolcomponents.h.

◆ notifyRepoRemoved()

void zyppng::sat::PoolComponentSet::notifyRepoRemoved ( Pool pool,
detail::RepoIdType  id 
)
inline

Definition at line 222 of file poolcomponents.h.

◆ notifyReset()

void zyppng::sat::PoolComponentSet::notifyReset ( Pool pool)
inline

Definition at line 227 of file poolcomponents.h.

◆ sortInitBuckets()

void zyppng::sat::PoolComponentSet::sortInitBuckets ( )
inlineprivate

Definition at line 263 of file poolcomponents.h.

◆ sortPreparedBuckets()

void zyppng::sat::PoolComponentSet::sortPreparedBuckets ( )
inlineprivate

Definition at line 275 of file poolcomponents.h.

Member Data Documentation

◆ _components

std::unordered_map<std::type_index, std::unique_ptr<TypeErasure> > zyppng::sat::PoolComponentSet::_components
private

Definition at line 288 of file poolcomponents.h.

◆ _basicComponents

std::vector<detail::IBasicPoolComponent*> zyppng::sat::PoolComponentSet::_basicComponents
private

Unified list for checkDirty / onInvalidate / onRepoAdded / onRepoRemoved.

Definition at line 291 of file poolcomponents.h.

◆ _initComponents

std::array<std::vector<IPoolComponent*>, static_cast<size_t>InitStage::COUNT)> zyppng::sat::PoolComponentSet::_initComponents
private

Pre-index components — stage-bucketed, priority-sorted within bucket.

Definition at line 294 of file poolcomponents.h.

◆ _initDirtyBuckets

std::array<bool, static_cast<size_t>InitStage::COUNT)> zyppng::sat::PoolComponentSet::_initDirtyBuckets = {false,}
private

Definition at line 295 of file poolcomponents.h.

◆ _preparedComponents

std::array<std::vector<IPreparedPoolComponent*>, static_cast<size_t>PreparedStage::COUNT)> zyppng::sat::PoolComponentSet::_preparedComponents
private

Post-index components — stage-bucketed, priority-sorted within bucket.

Definition at line 298 of file poolcomponents.h.

◆ _preparedDirtyBuckets

std::array<bool, static_cast<size_t>PreparedStage::COUNT)> zyppng::sat::PoolComponentSet::_preparedDirtyBuckets = {false,}
private

Definition at line 299 of file poolcomponents.h.


The documentation for this class was generated from the following file: