[zypp-commit] r7252 - /trunk/libzypp/zypp/repo/DeltaCandidates.h
Author: mlandres Date: Fri Sep 14 17:32:39 2007 New Revision: 7252 URL: http://svn.opensuse.org/viewcvs/zypp?rev=7252&view=rev Log: Provide repo::makeDeltaCandidates templates for convenient construction from any Repository container or iterator pair. Modified: trunk/libzypp/zypp/repo/DeltaCandidates.h Modified: trunk/libzypp/zypp/repo/DeltaCandidates.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/DeltaCandidates.h?rev=7252&r1=7251&r2=7252&view=diff ============================================================================== --- trunk/libzypp/zypp/repo/DeltaCandidates.h (original) +++ trunk/libzypp/zypp/repo/DeltaCandidates.h Fri Sep 14 17:32:39 2007 @@ -42,7 +42,7 @@ class Impl; public: - /** + /** * \short Creates a candidate calculator * \param repos Set of repositories providing patch and delta packages * \param installed_callback Will be used to ask if a package is installed or not @@ -51,11 +51,9 @@ /** Dtor */ ~DeltaCandidates(); - + std::list<packagedelta::PatchRpm> patchRpms(const Package::constPtr & package) const; std::list<packagedelta::DeltaRpm> deltaRpms(const Package::constPtr & package) const; - - public: private: /** Pointer to implementation */ @@ -66,6 +64,19 @@ /** \relates DeltaCandidates Stream output */ std::ostream & operator<<( std::ostream & str, const DeltaCandidates & obj ); + /////////////////////////////////////////////////////////////////// + + /** \relates DeltaCandidates Convenient construction. */ + template<class RepositoryIter> + inline DeltaCandidates makeDeltaCandidates( RepositoryIter begin_r, RepositoryIter end_r ) + { return DeltaCandidates( std::list<Repository>( begin_r, end_r ) ); } + + /** \relates DeltaCandidates Convenient construction. */ + template<class RepositoryContainer> + inline DeltaCandidates makeDeltaCandidates( const RepositoryContainer & cont_r ) + { return makeDeltaCandidates( cont_r.begin(), cont_r.end() ); } + + ///////////////////////////////////////////////////////////////// } // namespace repo /////////////////////////////////////////////////////////////////// -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org
participants (1)
-
mlandres@svn.opensuse.org