12#ifndef ZYPP_REPO_ORIGIN_INCLUDED_H 
   13#define ZYPP_REPO_ORIGIN_INCLUDED_H 
   18#include <boost/iterator/iterator_facade.hpp> 
   46     using SettingsMap = std::unordered_map<std::string, std::any>;
 
   63     bool hasConfig( 
const std::string &key ) 
const;
 
   67     void setConfig( 
const std::string &key, std::any value );
 
   68     const std::any &getConfig( 
const std::string &key ) 
const;
 
   69     std::any &getConfig( 
const std::string &key );
 
   70     void eraseConfigValue( 
const std::string &key );
 
   72     const SettingsMap &config() 
const;
 
   73     SettingsMap &config();
 
   77       setConfig( key, std::make_any<T>( std::forward<T>(value) ) );
 
   82       const std::any &c = getConfig(key);
 
   85       const T* ref = std::any_cast<const T>(&c);
 
   87         throw std::bad_any_cast();
 
   94       std::any &c = getConfig(key);
 
   97       T* ref = std::any_cast<T>(&c);
 
   99         throw std::bad_any_cast();
 
  108     std::string scheme() 
const;
 
  113     bool schemeIsDownloading() 
const;
 
  115     bool isValid() 
const;
 
 
  173     template <
class Parent, 
class Value>
 
  174     class iter : 
public boost::iterator_facade<
 
  177           , boost::forward_traversal_tag
 
  183        explicit iter( Parent *list, uint idx )
 
 
  189        friend class boost::iterator_core_access;
 
  193           return ((this->
_list == other.
_list) && (this->_idx == other.
_idx));
 
 
  209              throw std::out_of_range( 
"OriginEndpoint index out of range." );
 
 
 
  235    const std::vector<OriginEndpoint> &mirrors() 
const;
 
  240    bool isValid() 
const;
 
  243    void setMirrors( std::vector<OriginEndpoint> mirrors );
 
  249    std::string scheme() 
const;
 
  254    bool schemeIsDownloading() 
const;
 
  281    uint endpointCount() 
const;
 
 
  328    using iterator = std::vector<MirroredOrigin>::iterator;
 
  386    template<
typename InputIterator>
 
  404    void addEndpoints(std::vector<OriginEndpoint> endpoints );
 
  413    const_iterator begin() 
const;
 
  416    const_iterator end() 
const;
 
  422    size_type size() 
const;
 
  432    bool hasFallbackUrls() 
const;
 
 
A smart container that manages a collection of MirroredOrigin objects, automatically grouping endpoin...
MirroredOriginSet(std::list< zypp::Url > urls)
const_iterator findByUrl(const zypp::Url &url) const
Finds the MirroredOrigin that contains a specific URL.
const MirroredOrigin & at(size_type idx) const
Accesses the MirroredOrigin at a specific index.
MirroredOrigin value_type
std::vector< MirroredOrigin >::const_iterator const_iterator
RWCOW_pointer< Private > _pimpl
std::vector< MirroredOrigin >::iterator iterator
void addEndpoints(InputIterator first, InputIterator last)
A convenience method to add multiple endpoints from a range.
void addEndpoint(OriginEndpoint endpoint)
Adds a single endpoint, routing it to the correct MirroredOrigin.
bool equal(iter< Parent, Value > const &other) const
iter(Parent *list, uint idx)
Value & dereference() const
Manages a data source characterized by an authoritative URL and a list of mirror URLs.
OriginEndpoint & operator[](uint index)
const std::vector< OriginEndpoint > & mirrors() const
endpoint_const_iterator end() const
const OriginEndpoint & at(uint index) const
RWCOW_pointer< Private > _pimpl
iter< MirroredOrigin const, OriginEndpoint const  > endpoint_const_iterator
endpoint_iterator begin()
iter< MirroredOrigin, OriginEndpoint > endpoint_iterator
endpoint_const_iterator begin() const
const OriginEndpoint & authority() const
const OriginEndpoint & operator[](uint index) const
uint endpointCount() const
Represents a single, configurable network endpoint, combining a URL with specific access settings.
OriginEndpoint(OriginEndpoint &&)=default
OriginEndpoint(const OriginEndpoint &)=default
OriginEndpoint & operator=(OriginEndpoint &&)=default
RWCOW_pointer< Private > _pimpl
const zypp::Url & url() const
~OriginEndpoint()=default
void setUrl(const zypp::Url &newUrl)
bool hasConfig(const std::string &key) const
OriginEndpoint & operator=(const OriginEndpoint &)=default
typename enable_if< B, T >::type enable_if_t
String related utilities and Regular expression matching.
Easy-to use interface to the ZYPP dependency resolver.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
bool operator!=(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
RW_pointer supporting 'copy on write' functionality.