18#include <zypp/TriBool.h>
19#include <zypp/Pathname.h>
41 Impl(
const std::string & alias_r )
64 friend Impl * rwcowClone<Impl>(
const Impl * rhs );
67 {
return new Impl( *
this ); }
78 : _pimpl( new
Impl() )
82 : _pimpl( new
Impl(alias) )
105 {
return indeterminate(
_pimpl->_enabled) ? true : (
bool)
_pimpl->_enabled; }
109 {
return indeterminate(
_pimpl->_autorefresh) ? false : (
bool)
_pimpl->_autorefresh; }
112 {
return _pimpl->_alias; }
115 {
return _pimpl->_escaped_alias; }
125 {
return _pimpl->_name.raw(); }
135 {
return _pimpl->_filepath; }
140 str <<
"--------------------------------------" << std::endl;
141 str <<
"- alias : " <<
alias() << std::endl;
144 str <<
"- enabled : " <<
enabled() << std::endl;
153 str <<
"[" <<
alias() <<
"]" << endl;
156 str <<
"enabled=" << (
enabled() ?
"1" :
"0") << endl;
164 return str <<
"<!-- there's no XML representation of RepoInfoBase -->" << endl;
base::ValueTransform< std::string, repo::RepoVariablesStringReplacer > RepoVariablesReplacedString
Helper managing repo variables replaced strings.
static ZConfig & instance()
Singleton ctor.
Base class implementing common features of RepoInfo and ServiceInfo.
virtual std::ostream & dumpOn(std::ostream &str) const
Write a human-readable representation of this RepoInfoBase object into the str stream.
std::string label() const
Label for use in messages for the user interface.
void setAutorefresh(bool autorefresh)
enable or disable autorefresh
std::string escaped_alias() const
Same as alias(), just escaped in a way to be a valid file name.
virtual std::ostream & dumpAsIniOn(std::ostream &str) const
Write this RepoInfoBase object into str in a .repo (ini) file format.
void setFilepath(const Pathname &filename)
set the path to the .repo file
void setAlias(const std::string &alias)
set the repository alias
Pathname filepath() const
File where this repo was read from.
void setName(const std::string &name)
set the repository name
bool autorefresh() const
If true, the repostory must be refreshed before creating resolvables from it.
std::string name() const
Repository name.
std::string rawName() const
The raw metadata name (no default, no variables replaced).
virtual std::ostream & dumpAsXmlOn(std::ostream &str, const std::string &content="") const
Write an XML representation of this object with content (if available).
bool enabled() const
If enabled is false, then this repository must be ignored as if does not exists, except when checking...
void setEnabled(bool enabled)
enable or disable the repository
RWCOW_pointer< Impl > _pimpl
Pointer to implementation.
std::string alias() const
unique identifier for this source.
boost::logic::tribool TriBool
3-state boolean logic (true, false and indeterminate).
String related utilities and Regular expression matching.
std::ostream & operator<<(std::ostream &str, const DeltaCandidates &obj)
std::string & replaceAll(std::string &str_r, const std::string &from_r, const std::string &to_r)
Replace all occurrences of from_r with to_r in str_r (inplace).
Easy-to use interface to the ZYPP dependency resolver.
void setAlias(const std::string &alias_r)
Impl(const std::string &alias_r)
RepoVariablesReplacedString _name
Impl * clone() const
clone for RWCOW_pointer
std::string _escaped_alias
Functor replacing repository variables.