From: Klaus Kaempf Date: Fri, 27 Jan 2006 18:18:30 +0000 (+0000) Subject: "Source &" -> "Source_Ref" X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~3019 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4095fba001fd43676c35ae2c83e9eb4a2b34cd40;p=platform%2Fupstream%2Flibzypp.git "Source &" -> "Source_Ref" --- diff --git a/zypp/Package.cc b/zypp/Package.cc index 2243c07..cfcf5e2 100644 --- a/zypp/Package.cc +++ b/zypp/Package.cc @@ -10,6 +10,7 @@ * */ #include "zypp/Package.h" +#include "zypp/source/SourceImpl.h" #include "zypp/base/Exception.h" using namespace std; diff --git a/zypp/ResFilters.h b/zypp/ResFilters.h index 69bcd2e..57c98ed 100644 --- a/zypp/ResFilters.h +++ b/zypp/ResFilters.h @@ -17,6 +17,7 @@ #include "zypp/CapFilters.h" #include "zypp/Source.h" +#include "zypp/source/SourceImpl.h" #include "zypp/PoolItem.h" @@ -186,7 +187,7 @@ namespace zypp /** Select ResObject by source. */ struct BySource : public ResObjectFilterFunctor { - BySource( const Source & source_r ) + BySource( Source_Ref source_r ) : _source( source_r ) {} @@ -195,7 +196,7 @@ namespace zypp return p->source() == _source; } - const Source & _source; + Source_Ref _source; }; diff --git a/zypp/ResObject.cc b/zypp/ResObject.cc index c12ec3f..5d391f7 100644 --- a/zypp/ResObject.cc +++ b/zypp/ResObject.cc @@ -10,6 +10,7 @@ * */ #include "zypp/ResObject.h" +#include "zypp/source/SourceImpl.h" #include "zypp/detail/ResObjectImplIf.h" using namespace std; @@ -57,7 +58,7 @@ namespace zypp ByteCount ResObject::size() const { return pimpl().size(); } - Source & ResObject::source() const + Source_Ref ResObject::source() const { return pimpl().source(); } ///////////////////////////////////////////////////////////////// diff --git a/zypp/ResObject.h b/zypp/ResObject.h index b9c8d16..67e1e13 100644 --- a/zypp/ResObject.h +++ b/zypp/ResObject.h @@ -22,7 +22,7 @@ namespace zypp namespace detail { class ResObjectImplIf; } - class Source; + class Source_Ref; class ByteCount; /////////////////////////////////////////////////////////////////// @@ -57,7 +57,7 @@ namespace zypp ByteCount size() const; /** */ - zypp::Source & source() const; + Source_Ref source() const; protected: /** Ctor */ diff --git a/zypp/Source.cc b/zypp/Source.cc index c23aa1e..7e70045 100644 --- a/zypp/Source.cc +++ b/zypp/Source.cc @@ -25,28 +25,28 @@ namespace zypp /////////////////////////////////////////////////////////////////// // - // METHOD NAME : Source::Source + // METHOD NAME : Source_Ref::Source_Ref // METHOD TYPE : Ctor // - Source::Source() + Source_Ref::Source_Ref() {} /////////////////////////////////////////////////////////////////// // - // METHOD NAME : Source::Source + // METHOD NAME : Source_Ref::Source_Ref // METHOD TYPE : Ctor // - Source::Source( const Impl_Ptr & impl_r ) + Source_Ref::Source_Ref( const Impl_Ptr & impl_r ) : _pimpl( impl_r ) { assert( impl_r ); } - Source Source::_nullimpl; - bool Source::_nullimpl_initialized = false; + Source_Ref Source_Ref::_nullimpl; + bool Source_Ref::_nullimpl_initialized = false; /** Null implementation */ - Source & Source::nullimpl() + Source_Ref & Source_Ref::nullimpl() { if (! _nullimpl_initialized) { @@ -63,32 +63,32 @@ namespace zypp // /////////////////////////////////////////////////////////////////// - const ResStore & Source::resolvables() + const ResStore & Source_Ref::resolvables() { return _pimpl->resolvables(*this); } - std::ostream & Source::dumpOn( std::ostream & str ) const + std::ostream & Source_Ref::dumpOn( std::ostream & str ) const { return _pimpl->dumpOn( str ); } - const Pathname Source::provideFile(const Pathname & file_r, + const Pathname Source_Ref::provideFile(const Pathname & file_r, const unsigned media_nr) { return _pimpl->provideFile(file_r, media_nr); } - const Pathname Source::provideDir(const Pathname & dir_r, + const Pathname Source_Ref::provideDir(const Pathname & dir_r, const unsigned media_nr, const bool recursive) { return _pimpl->provideDir(dir_r, media_nr, recursive); } - const bool Source::enabled() const + const bool Source_Ref::enabled() const { return _pimpl->enabled(); } - void Source::enable() + void Source_Ref::enable() { _pimpl->enable(); } - void Source::disable() + void Source_Ref::disable() { _pimpl->disable(); } - string Source::alias (void) const - { _pimpl->alias(); } + string Source_Ref::alias (void) const + { return _pimpl->alias(); } ///////////////////////////////////////////////////////////////// diff --git a/zypp/Source.h b/zypp/Source.h index 2483f3f..cd5135c 100644 --- a/zypp/Source.h +++ b/zypp/Source.h @@ -17,7 +17,6 @@ #include "zypp/base/PtrTypes.h" -#include "zypp/ResStore.h" #include "zypp/Pathname.h" /////////////////////////////////////////////////////////////////// @@ -27,6 +26,7 @@ namespace zypp { class SourceImpl; } + class ResStore; /////////////////////////////////////////////////////////////////// // @@ -36,7 +36,7 @@ namespace zypp * \note Source is a reference to the implementation. No COW * is performed. */ - class Source + class Source_Ref { public: typedef source::SourceImpl Impl; @@ -47,7 +47,7 @@ namespace zypp /** All resolvables provided by this source. */ const ResStore & resolvables(); /** Null implementation */ - static Source & nullimpl(); + static Source_Ref & nullimpl(); private: /** Factory */ @@ -55,13 +55,13 @@ namespace zypp friend class SourceManager; private: /** Factory ctor */ - Source(); + Source_Ref(); /** Factory ctor */ explicit - Source( const Impl_Ptr & impl_r ); + Source_Ref( const Impl_Ptr & impl_r ); private: - friend std::ostream & operator<<( std::ostream & str, const Source & obj ); + friend std::ostream & operator<<( std::ostream & str, Source_Ref obj ); /** Stream output. */ std::ostream & dumpOn( std::ostream & str ) const; @@ -69,7 +69,7 @@ namespace zypp /** Pointer to implementation */ RW_pointer > _pimpl; - static Source _nullimpl; + static Source_Ref _nullimpl; static bool _nullimpl_initialized; public: @@ -96,17 +96,15 @@ namespace zypp }; /////////////////////////////////////////////////////////////////// - /** \todo Rename Source and eliminate this typedef. */ - typedef Source Source_Ref; + typedef Source_Ref Source; /////////////////////////////////////////////////////////////////// - /** \relates Source Stream output. */ - inline std::ostream & operator<<( std::ostream & str, const Source & obj ) + inline std::ostream & operator<<( std::ostream & str, Source_Ref obj ) { return obj.dumpOn( str ); } /** \relates Source */ - inline bool operator==( const Source & lhs, const Source & rhs ) + inline bool operator==( Source_Ref lhs, Source_Ref rhs ) { return !lhs.alias().empty() && !rhs.alias().empty() && lhs.alias() == rhs.alias(); } ///////////////////////////////////////////////////////////////// diff --git a/zypp/SourceFactory.h b/zypp/SourceFactory.h index 3b0ab64..ab87584 100644 --- a/zypp/SourceFactory.h +++ b/zypp/SourceFactory.h @@ -14,6 +14,7 @@ #include #include +#include #include "zypp/base/PtrTypes.h" diff --git a/zypp/detail/ResObjectImplIf.cc b/zypp/detail/ResObjectImplIf.cc index abec2a3..0ca57d8 100644 --- a/zypp/detail/ResObjectImplIf.cc +++ b/zypp/detail/ResObjectImplIf.cc @@ -43,8 +43,8 @@ namespace zypp bool ResObjectImplIf::providesSources() const { return false; } - Source & ResObjectImplIf::source() const - { return Source::nullimpl(); } + Source_Ref ResObjectImplIf::source() const + { return Source_Ref::nullimpl(); } Label ResObjectImplIf::instSrcLabel() const { return Label(); } diff --git a/zypp/detail/ResObjectImplIf.h b/zypp/detail/ResObjectImplIf.h index 2a7da04..4308878 100644 --- a/zypp/detail/ResObjectImplIf.h +++ b/zypp/detail/ResObjectImplIf.h @@ -21,7 +21,6 @@ #include "zypp/Date.h" #include "zypp/NeedAType.h" // volatile include propagating type drafts -#include "zypp/Source.h" // will be defined =0 later #define PURE_VIRTUAL @@ -31,6 +30,7 @@ namespace zypp { ///////////////////////////////////////////////////////////////// class Resolvable; + class Source_Ref; /////////////////////////////////////////////////////////////////// namespace detail @@ -81,7 +81,7 @@ namespace zypp virtual bool providesSources() const PURE_VIRTUAL; /** Installation source which provides the package */ - virtual Source & source() const PURE_VIRTUAL; + virtual Source_Ref source() const PURE_VIRTUAL; /** \name deprecated * \todo These should be replaced by a offering a diff --git a/zypp/source/SourceImpl.cc b/zypp/source/SourceImpl.cc index 9fe1647..b2ff284 100644 --- a/zypp/source/SourceImpl.cc +++ b/zypp/source/SourceImpl.cc @@ -47,8 +47,8 @@ namespace zypp : _media(media_r) , _path(path_r) , _enabled(true) - , _res_store_initialized(false) , _alias (alias_r) + , _res_store_initialized(false) {} /////////////////////////////////////////////////////////////////// @@ -59,7 +59,7 @@ namespace zypp SourceImpl::~SourceImpl() {} - const ResStore & SourceImpl::resolvables(Source & source_r) + const ResStore & SourceImpl::resolvables(Source_Ref source_r) { if (! _res_store_initialized) { @@ -92,7 +92,7 @@ namespace zypp return _media->localPath (path_r); } - void SourceImpl::createResolvables(Source & source_r) + void SourceImpl::createResolvables(Source_Ref source_r) {} ///////////////////////////////////////////////////////////////// diff --git a/zypp/source/SourceImpl.h b/zypp/source/SourceImpl.h index 40292da..d3f7b0e 100644 --- a/zypp/source/SourceImpl.h +++ b/zypp/source/SourceImpl.h @@ -18,11 +18,12 @@ #include "zypp/base/ReferenceCounted.h" #include "zypp/base/NonCopyable.h" #include "zypp/base/PtrTypes.h" +#include "zypp/Source.h" + #include "zypp/ResStore.h" #include "zypp/Pathname.h" #include "zypp/media/MediaAccess.h" -#include "zypp/Source.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -64,7 +65,7 @@ namespace zypp public: /** All resolvables provided by this source. */ - const ResStore & resolvables(Source & source_r); + const ResStore & resolvables(Source_Ref source_r); /** * Provide a file to local filesystem @@ -118,7 +119,7 @@ namespace zypp /** ResStore initialized? */ bool _res_store_initialized; /** Fill in the ResStore */ - virtual void createResolvables(Source & source_r); + virtual void createResolvables(Source_Ref source_r); }; /////////////////////////////////////////////////////////////////// diff --git a/zypp/source/susetags/SuseTagsImpl.cc b/zypp/source/susetags/SuseTagsImpl.cc index 1c2cbd5..84352f2 100644 --- a/zypp/source/susetags/SuseTagsImpl.cc +++ b/zypp/source/susetags/SuseTagsImpl.cc @@ -62,7 +62,7 @@ namespace zypp #warning TODO check if the source is of this type } - void SuseTagsImpl::createResolvables(Source & source_r) + void SuseTagsImpl::createResolvables(Source_Ref source_r) { Pathname p = provideFile(_path + "suse/setup/descr/packages"); DBG << "Going to parse " << p << endl; diff --git a/zypp/source/susetags/SuseTagsImpl.h b/zypp/source/susetags/SuseTagsImpl.h index 2458fe4..5cc316d 100644 --- a/zypp/source/susetags/SuseTagsImpl.h +++ b/zypp/source/susetags/SuseTagsImpl.h @@ -45,7 +45,7 @@ namespace zypp /** Dtor */ ~SuseTagsImpl(); - virtual void createResolvables(Source & source_r); + virtual void createResolvables(Source_Ref source_r); public: /** Stream output. */ virtual std::ostream & dumpOn( std::ostream & str ) const; diff --git a/zypp/source/yum/YUMGroupImpl.cc b/zypp/source/yum/YUMGroupImpl.cc index c90c00c..5b86906 100644 --- a/zypp/source/yum/YUMGroupImpl.cc +++ b/zypp/source/yum/YUMGroupImpl.cc @@ -34,7 +34,7 @@ namespace zypp /** Default ctor */ YUMGroupImpl::YUMGroupImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMGroupData & parsed ) : _user_visible(parsed.userVisible == "true") @@ -133,7 +133,7 @@ namespace zypp return Label("base"); } - Source & YUMGroupImpl::source() const + Source_Ref YUMGroupImpl::source() const { return _source; } diff --git a/zypp/source/yum/YUMGroupImpl.h b/zypp/source/yum/YUMGroupImpl.h index 2a152c0..5bc3995 100644 --- a/zypp/source/yum/YUMGroupImpl.h +++ b/zypp/source/yum/YUMGroupImpl.h @@ -12,10 +12,10 @@ #ifndef ZYPP_SOURCE_YUM_YUMGROUPIMPL_H #define ZYPP_SOURCE_YUM_YUMGROUPIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/SelectionImplIf.h" #include "zypp/parser/yum/YUMParserData.h" #include "zypp/Edition.h" -#include "zypp/Source.h" /////////////////////////////////////////////////////////////////// namespace zypp @@ -37,7 +37,7 @@ namespace zypp public: /** Default ctor */ YUMGroupImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMGroupData & parsed ); @@ -77,9 +77,9 @@ namespace zypp CapSet _optional_req; CapSet _default_req; private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// } // namespace yum diff --git a/zypp/source/yum/YUMMessageImpl.cc b/zypp/source/yum/YUMMessageImpl.cc index 6bc8b96..c29d466 100644 --- a/zypp/source/yum/YUMMessageImpl.cc +++ b/zypp/source/yum/YUMMessageImpl.cc @@ -32,7 +32,7 @@ namespace zypp /** Default ctor */ YUMMessageImpl::YUMMessageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchMessage & parsed ) : _source(source_r) @@ -69,7 +69,7 @@ namespace zypp Vendor YUMMessageImpl::instSrcVendor() const { return ResObjectImplIf::instSrcVendor(); } - Source & YUMMessageImpl::source() const + Source_Ref YUMMessageImpl::source() const { return _source; } diff --git a/zypp/source/yum/YUMMessageImpl.h b/zypp/source/yum/YUMMessageImpl.h index 8f05921..6348b76 100644 --- a/zypp/source/yum/YUMMessageImpl.h +++ b/zypp/source/yum/YUMMessageImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMMESSAGEIMPL_H #define ZYPP_SOURCE_YUM_YUMMESSAGEIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/MessageImpl.h" #include "zypp/parser/yum/YUMParserData.h" @@ -35,7 +36,7 @@ namespace zypp public: /** Default ctor */ YUMMessageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchMessage & parsed ); /** Get the text of the message */ @@ -64,9 +65,9 @@ namespace zypp /** The type of the message (YesNo / OK) */ std::string _type; private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// } // namespace yum diff --git a/zypp/source/yum/YUMPackageImpl.cc b/zypp/source/yum/YUMPackageImpl.cc index c617e8e..7a51d52 100644 --- a/zypp/source/yum/YUMPackageImpl.cc +++ b/zypp/source/yum/YUMPackageImpl.cc @@ -35,7 +35,7 @@ namespace zypp /** Default ctor */ YUMPackageImpl::YUMPackageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPrimaryData & parsed, const zypp::parser::yum::YUMFileListData & filelist, const zypp::parser::yum::YUMOtherData & other @@ -91,7 +91,7 @@ namespace zypp } YUMPackageImpl::YUMPackageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchPackage & parsed ) : _summary(parsed.summary), @@ -337,7 +337,7 @@ namespace zypp std::list YUMPackageImpl::patchRpms() const { return _patch_rpms; } - Source & YUMPackageImpl::source() const + Source_Ref YUMPackageImpl::source() const { return _source; } #if 0 diff --git a/zypp/source/yum/YUMPackageImpl.h b/zypp/source/yum/YUMPackageImpl.h index 006ca60..47edc28 100644 --- a/zypp/source/yum/YUMPackageImpl.h +++ b/zypp/source/yum/YUMPackageImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMPACKAGEIMPL_H #define ZYPP_SOURCE_YUM_YUMPACKAGEIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/PackageImpl.h" #include "zypp/parser/yum/YUMParserData.h" #include "zypp/Changelog.h" @@ -40,13 +41,13 @@ namespace zypp /** Default ctor */ YUMPackageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPrimaryData & parsed, const zypp::parser::yum::YUMFileListData & filelist, const zypp::parser::yum::YUMOtherData & other ); YUMPackageImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchPackage & parsed ); @@ -228,9 +229,9 @@ namespace zypp std::list changelog; */ private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; diff --git a/zypp/source/yum/YUMPatchImpl.cc b/zypp/source/yum/YUMPatchImpl.cc index 0ef8040..7c4c790 100644 --- a/zypp/source/yum/YUMPatchImpl.cc +++ b/zypp/source/yum/YUMPatchImpl.cc @@ -43,7 +43,7 @@ namespace zypp * \bug CANT BE CONSTUCTED THAT WAY ANYMORE */ YUMPatchImpl::YUMPatchImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchData & parsed, YUMSourceImpl & srcimpl_r ) @@ -253,7 +253,7 @@ namespace zypp } } - Source & YUMPatchImpl::source() const + Source_Ref YUMPatchImpl::source() const { return _source; } } // namespace yum diff --git a/zypp/source/yum/YUMPatchImpl.h b/zypp/source/yum/YUMPatchImpl.h index 1b01e50..49ac488 100644 --- a/zypp/source/yum/YUMPatchImpl.h +++ b/zypp/source/yum/YUMPatchImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMPATCHIMPL_H #define ZYPP_SOURCE_YUM_YUMPATCHIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/PatchImpl.h" #include "zypp/parser/yum/YUMParserData.h" #include "zypp/source/yum/YUMSourceImpl.h" @@ -36,7 +37,7 @@ namespace zypp public: /** Default ctor */ YUMPatchImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchData & parsed, YUMSourceImpl & srcimpl_r ); @@ -89,9 +90,9 @@ namespace zypp /** The list of all atoms building the patch */ AtomList _atoms; private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// } // namespace yum diff --git a/zypp/source/yum/YUMPatternImpl.cc b/zypp/source/yum/YUMPatternImpl.cc index 38cff3c..0fa10c6 100644 --- a/zypp/source/yum/YUMPatternImpl.cc +++ b/zypp/source/yum/YUMPatternImpl.cc @@ -34,7 +34,7 @@ namespace zypp /** Default ctor */ YUMPatternImpl::YUMPatternImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatternData & parsed ) : _user_visible(parsed.userVisible == "true") @@ -119,7 +119,7 @@ namespace zypp ByteCount YUMPatternImpl::size() const { return ResObjectImplIf::size(); } - Source & YUMPatternImpl::source() const + Source_Ref YUMPatternImpl::source() const { return _source; } diff --git a/zypp/source/yum/YUMPatternImpl.h b/zypp/source/yum/YUMPatternImpl.h index 216bfdb..84b24b5 100644 --- a/zypp/source/yum/YUMPatternImpl.h +++ b/zypp/source/yum/YUMPatternImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMPATTERNIMPL_H #define ZYPP_SOURCE_YUM_YUMPATTERNIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/PatternImplIf.h" #include "zypp/parser/yum/YUMParserData.h" #include "zypp/Edition.h" @@ -36,7 +37,7 @@ namespace zypp public: /** Default ctor */ YUMPatternImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatternData & parsed ); /** Is to be visible for user? */ @@ -70,9 +71,9 @@ namespace zypp CapSet _optional_req; CapSet _default_req; private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// } // namespace yum diff --git a/zypp/source/yum/YUMProductImpl.cc b/zypp/source/yum/YUMProductImpl.cc index 33bb650..66603ad 100644 --- a/zypp/source/yum/YUMProductImpl.cc +++ b/zypp/source/yum/YUMProductImpl.cc @@ -43,7 +43,7 @@ namespace zypp * \bug CANT BE CONSTUCTED THAT WAY ANYMORE */ YUMProductImpl::YUMProductImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMProductData & parsed ) : _category(parsed.type), @@ -86,7 +86,7 @@ namespace zypp Vendor YUMProductImpl::instSrcVendor() const { return ResObjectImplIf::instSrcVendor(); } - Source & YUMProductImpl::source() const + Source_Ref YUMProductImpl::source() const { return _source; } } // namespace yum diff --git a/zypp/source/yum/YUMProductImpl.h b/zypp/source/yum/YUMProductImpl.h index cff68c8..50cd295 100644 --- a/zypp/source/yum/YUMProductImpl.h +++ b/zypp/source/yum/YUMProductImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMPRODUCTIMPL_H #define ZYPP_SOURCE_YUM_YUMPRODUCTIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/ProductImpl.h" #include "zypp/parser/yum/YUMParserData.h" #include "zypp/source/yum/YUMSourceImpl.h" @@ -36,7 +37,7 @@ namespace zypp public: /** Default ctor */ YUMProductImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMProductData & parsed ); std::string category() const; @@ -58,9 +59,9 @@ namespace zypp private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// diff --git a/zypp/source/yum/YUMScriptImpl.cc b/zypp/source/yum/YUMScriptImpl.cc index 8db105a..d5e6e8b 100644 --- a/zypp/source/yum/YUMScriptImpl.cc +++ b/zypp/source/yum/YUMScriptImpl.cc @@ -35,7 +35,7 @@ namespace zypp /** Default ctor */ YUMScriptImpl::YUMScriptImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchScript & parsed ) : _source(source_r) @@ -75,7 +75,7 @@ namespace zypp Vendor YUMScriptImpl::instSrcVendor() const { return ResObjectImplIf::instSrcVendor(); } - Source & YUMScriptImpl::source() const + Source_Ref YUMScriptImpl::source() const { return _source; } diff --git a/zypp/source/yum/YUMScriptImpl.h b/zypp/source/yum/YUMScriptImpl.h index 008f041..5ceef10 100644 --- a/zypp/source/yum/YUMScriptImpl.h +++ b/zypp/source/yum/YUMScriptImpl.h @@ -12,6 +12,7 @@ #ifndef ZYPP_SOURCE_YUM_YUMSCRIPTIMPL_H #define ZYPP_SOURCE_YUM_YUMSCRIPTIMPL_H +#include "zypp/source/SourceImpl.h" #include "zypp/detail/ScriptImpl.h" #include "zypp/parser/yum/YUMParserData.h" @@ -34,7 +35,7 @@ namespace zypp public: /** Default ctor */ YUMScriptImpl( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchScript & parsed ); /** Get the script to perform the change */ @@ -59,9 +60,9 @@ namespace zypp /** The script to undo the change */ std::string _undo_script; private: - Source & _source; + Source_Ref _source; public: - Source & source() const; + Source_Ref source() const; }; /////////////////////////////////////////////////////////////////// } // namespace yum diff --git a/zypp/source/yum/YUMSourceImpl.cc b/zypp/source/yum/YUMSourceImpl.cc index f52ba53..d87438d 100644 --- a/zypp/source/yum/YUMSourceImpl.cc +++ b/zypp/source/yum/YUMSourceImpl.cc @@ -72,7 +72,7 @@ namespace zypp } } - void YUMSourceImpl::createResolvables(Source & source_r) + void YUMSourceImpl::createResolvables(Source_Ref source_r) { std::list repo_primary; std::list repo_files; @@ -361,7 +361,7 @@ namespace zypp } Package::Ptr YUMSourceImpl::createPackage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPrimaryData & parsed, const zypp::parser::yum::YUMFileListData & filelist, const zypp::parser::yum::YUMOtherData & other @@ -392,7 +392,7 @@ namespace zypp } Package::Ptr YUMSourceImpl::createPackage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchPackage & parsed ) { @@ -420,7 +420,7 @@ namespace zypp } Selection::Ptr YUMSourceImpl::createGroup( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMGroupData & parsed ) { @@ -445,7 +445,7 @@ namespace zypp } Pattern::Ptr YUMSourceImpl::createPattern( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatternData & parsed ) { @@ -470,7 +470,7 @@ namespace zypp } Message::Ptr YUMSourceImpl::createMessage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchMessage & parsed ) { @@ -498,7 +498,7 @@ namespace zypp } Script::Ptr YUMSourceImpl::createScript( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchScript & parsed ) { @@ -526,7 +526,7 @@ namespace zypp } Product::Ptr YUMSourceImpl::createProduct( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMProductData & parsed ) { @@ -554,7 +554,7 @@ namespace zypp } Patch::Ptr YUMSourceImpl::createPatch( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchData & parsed ) { diff --git a/zypp/source/yum/YUMSourceImpl.h b/zypp/source/yum/YUMSourceImpl.h index 266c17c..805de61 100644 --- a/zypp/source/yum/YUMSourceImpl.h +++ b/zypp/source/yum/YUMSourceImpl.h @@ -48,40 +48,40 @@ namespace zypp /** Default ctor */ YUMSourceImpl(media::MediaAccess::Ptr & media_r, const Pathname & path_r = "/", const std::string & alias_r = ""); - virtual void createResolvables(Source & source_r); + virtual void createResolvables(Source_Ref source_r); Package::Ptr createPackage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPrimaryData & parsed, const zypp::parser::yum::YUMFileListData & filelist, const zypp::parser::yum::YUMOtherData & other ); Package::Ptr createPackage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchPackage & parsed ); Selection::Ptr createGroup( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMGroupData & parsed ); Pattern::Ptr createPattern( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatternData & parsed ); Message::Ptr createMessage( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchMessage & parsed ); Script::Ptr createScript( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchScript & parsed ); Patch::Ptr createPatch( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMPatchData & parsed ); Product::Ptr createProduct( - Source & source_r, + Source_Ref source_r, const zypp::parser::yum::YUMProductData & parsed );