36 inline std::ostream &
operator<<( std::ostream & str,
const RepoInfoBase::Impl & obj )
38 return str <<
"RepoInfo::Impl";
41 void RepoInfoBase::Impl::setAlias(
const string & alias_)
47 std::string escaped_alias = alias_;
48 size_t pos = escaped_alias.find(fnd);
49 while (pos != string::npos)
51 escaped_alias.replace(pos, fnd.length(), rep);
52 pos = escaped_alias.find(fnd, pos+rep.length());
54 this->escaped_alias = escaped_alias;
68 RepoInfoBase::RepoInfoBase()
69 : _pimpl( new
Impl() )
78 : _pimpl( new Impl(alias) )
152 str <<
"--------------------------------------" << std::endl;
153 str <<
"- alias : " <<
alias() << std::endl;
154 str <<
"- name : " <<
name() << std::endl;
155 str <<
"- enabled : " <<
enabled() << std::endl;
156 str <<
"- autorefresh : " <<
autorefresh() << std::endl;
164 str <<
"[" <<
alias() <<
"]" << endl;
165 str <<
"name=" <<
name() << endl;
166 str <<
"enabled=" << (
enabled() ?
"1" :
"0") << endl;
167 str <<
"autorefresh=" << (
autorefresh() ?
"1" :
"0") << endl;
177 return str <<
"<!-- there's no XML representation of RepoInfoBase -->" << endl;