[zypp-commit] r10617 - in /trunk/libzypp/zypp: Capability.cc Capability.h IdString.h RepoManager.h ResStatus.cc ResStatus.h Resolvable.h ZYppCommitPolicy.h sat/Solvable.h
![](https://seccdn.libravatar.org/avatar/1a5a039cbdb74b7bb361ba2e9d30cb91.jpg?s=120&d=mm&r=g)
Author: mlandres Date: Mon Jul 21 16:22:01 2008 New Revision: 10617 URL: http://svn.opensuse.org/viewcvs/zypp?rev=10617&view=rev Log: some cleanup for swig Modified: trunk/libzypp/zypp/Capability.cc trunk/libzypp/zypp/Capability.h trunk/libzypp/zypp/IdString.h trunk/libzypp/zypp/RepoManager.h trunk/libzypp/zypp/ResStatus.cc trunk/libzypp/zypp/ResStatus.h trunk/libzypp/zypp/Resolvable.h trunk/libzypp/zypp/ZYppCommitPolicy.h trunk/libzypp/zypp/sat/Solvable.h Modified: trunk/libzypp/zypp/Capability.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Capability.cc?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/Capability.cc (original) +++ trunk/libzypp/zypp/Capability.cc Mon Jul 21 16:22:01 2008 @@ -155,6 +155,7 @@ /////////////////////////////////////////////////////////////////// const Capability Capability::Null( STRID_NULL ); + const Capability Capability::Empty( STRID_EMPTY ); ///////////////////////////////////////////////////////////////// Modified: trunk/libzypp/zypp/Capability.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Capability.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/Capability.h (original) +++ trunk/libzypp/zypp/Capability.h Mon Jul 21 16:22:01 2008 @@ -123,9 +123,10 @@ static const Capability Empty; public: +#ifndef SWIG // Swig treats it as syntax error /** Evaluate in a boolean context <tt>( ! empty() )</tt>. */ using base::SafeBool<Capability>::operator bool_type; - +#endif /** Whether the \ref Capability is empty. * This is true for \ref Null and \ref Empty. */ @@ -207,7 +208,9 @@ /** Match two Capabilities */ static CapMatch _doMatch( sat::detail::IdType lhs, sat::detail::IdType rhs ); private: +#ifndef SWIG // Swig treats it as syntax error friend base::SafeBool<Capability>::operator bool_type() const; +#endif bool boolTest() const { return ! empty(); } private: sat::detail::IdType _id; @@ -336,6 +339,6 @@ } // namespace zypp /////////////////////////////////////////////////////////////////// -ZYPP_DEFINE_ID_HASHABLE( ::zypp::Capability ) +ZYPP_DEFINE_ID_HASHABLE( ::zypp::Capability ); #endif // ZYPP_CAPABILITY_H Modified: trunk/libzypp/zypp/IdString.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/IdString.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/IdString.h (original) +++ trunk/libzypp/zypp/IdString.h Mon Jul 21 16:22:01 2008 @@ -215,6 +215,6 @@ } // namespace zypp /////////////////////////////////////////////////////////////////// -ZYPP_DEFINE_ID_HASHABLE( ::zypp::IdString ) +ZYPP_DEFINE_ID_HASHABLE( ::zypp::IdString ); #endif // ZYPP_SAT_IDSTR_H Modified: trunk/libzypp/zypp/RepoManager.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/RepoManager.h (original) +++ trunk/libzypp/zypp/RepoManager.h Mon Jul 21 16:22:01 2008 @@ -457,7 +457,7 @@ /** * Adds new service * - * \param name service info + * \param name service info * * \throws FIXME RepoAlreadyExistException and as reponame is service name */ @@ -515,7 +515,7 @@ void refreshServices(); /** - * Refresh specific service. + * Refresh specific service. * \throws Exception if cannot download file * \param name service structure */ @@ -524,7 +524,7 @@ /** * modify service, rewrite Service to filesystem. * If change Service name, then can escalate to rewrite all repositories which it contain. - * + * * \param oldName oldName of service * \param service Structure containing new datas * @@ -533,6 +533,7 @@ */ void modifyService(const std::string& oldName, const Service& service); + private: /** * Functor thats filter RepoInfo by service which belongs to. */ @@ -544,6 +545,7 @@ bool match( const RepoInfo& info ) { return info.service()==name; } }; + public: /** * fill to output iterator repositories in service name. This output iterator can perform * any action on with Repo or service Container, because it is sets and it isn't dynamic recreate. @@ -565,14 +567,14 @@ * ChangePriority changer(10); * getRepositoriesInService(name,getRepositoriesInService( name, boost::make_function_output_iterator(bind(&ChangePriority::doIt, &changer, _1)))); * \endcode - */ + */ template<typename OutputIterator> void getRepositoriesInService( const std::string& name, OutputIterator out ) const { MatchServiceName filter(name); - std::copy(boost::make_filter_iterator(bind(&MatchServiceName::match, + std::copy(boost::make_filter_iterator(bind(&MatchServiceName::match, filter, _1),repoBegin(),repoEnd()), boost::make_filter_iterator( bind(&MatchServiceName::match, filter, _1),repoEnd(),repoEnd()), out ); Modified: trunk/libzypp/zypp/ResStatus.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResStatus.cc?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/ResStatus.cc (original) +++ trunk/libzypp/zypp/ResStatus.cc Mon Jul 21 16:22:01 2008 @@ -21,13 +21,8 @@ { ///////////////////////////////////////////////////////////////// const ResStatus ResStatus::toBeInstalled (UNINSTALLED, UNDETERMINED, TRANSACT); - const ResStatus ResStatus::toBeInstalledSoft (UNINSTALLED, UNDETERMINED, TRANSACT, SOFT_INSTALL); const ResStatus ResStatus::toBeUninstalled (INSTALLED, UNDETERMINED, TRANSACT); - const ResStatus ResStatus::toBeUninstalledSoft (INSTALLED, UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, SOFT_REMOVE); - const ResStatus ResStatus::toBeUninstalledDueToObsolete(INSTALLED, UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, DUE_TO_OBSOLETE); const ResStatus ResStatus::toBeUninstalledDueToUpgrade (INSTALLED, UNDETERMINED, TRANSACT, EXPLICIT_INSTALL, DUE_TO_UPGRADE); - const ResStatus ResStatus::installed (INSTALLED); - const ResStatus ResStatus::uninstalled (UNINSTALLED); /////////////////////////////////////////////////////////////////// // Modified: trunk/libzypp/zypp/ResStatus.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResStatus.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/ResStatus.h (original) +++ trunk/libzypp/zypp/ResStatus.h Mon Jul 21 16:22:01 2008 @@ -420,7 +420,7 @@ { fieldValueAssign<TransactField>( KEEP_STATE ); } - fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again + fieldValueAssign<TransactDetailField>( NO_DETAIL ); // Details has to be set again fieldValueAssign<TransactByField>( causer_r ); return true; } @@ -633,21 +633,8 @@ /** \name Builtin ResStatus constants. */ //@{ static const ResStatus toBeInstalled; - static const ResStatus toBeInstalledSoft; static const ResStatus toBeUninstalled; - static const ResStatus toBeUninstalledSoft; - static const ResStatus toBeUninstalledDueToUnlink; - static const ResStatus toBeUninstalledDueToObsolete; static const ResStatus toBeUninstalledDueToUpgrade; - static const ResStatus installed; // installed, status after successful target 'install' commit - static const ResStatus uninstalled; // uninstalled, status after successful target 'uninstall' commit - static const ResStatus satisfied; // uninstalled, satisfied - static const ResStatus complete; // installed, satisfied - static const ResStatus unneeded; // uninstalled, unneeded - static const ResStatus needed; // uninstalled, incomplete - static const ResStatus incomplete; // installed, incomplete - static const ResStatus recommended; // recommended - static const ResStatus suggested; // suggested //@} private: Modified: trunk/libzypp/zypp/Resolvable.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Resolvable.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/Resolvable.h (original) +++ trunk/libzypp/zypp/Resolvable.h Mon Jul 21 16:22:01 2008 @@ -49,8 +49,10 @@ typedef TraitsType::constPtrType constPtr; public: +#ifndef SWIG // Swig treats it as syntax error /** Whether this represents a valid- or no-solvable. */ using sat::Solvable::operator bool_type; +#endif /** Whether this represents an installed solvable. */ using sat::Solvable::isSystem; Modified: trunk/libzypp/zypp/ZYppCommitPolicy.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ZYppCommitPolicy.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/ZYppCommitPolicy.h (original) +++ trunk/libzypp/zypp/ZYppCommitPolicy.h Mon Jul 21 16:22:01 2008 @@ -60,15 +60,15 @@ { return restrictToMedia( 0 ); } /** Set dry run (default: false) */ - ZYppCommitPolicy & dryRun( bool yesNo_r = true ) + ZYppCommitPolicy & dryRun( bool yesNo_r ) { _dryRun = yesNo_r; return *this; } /** Use rpm option --nosignature (default: false) */ - ZYppCommitPolicy & rpmNoSignature( bool yesNo_r = true ) + ZYppCommitPolicy & rpmNoSignature( bool yesNo_r ) { _rpmNoSignature = yesNo_r; return *this; } /** Kepp pool in sync with the Target databases after commit (default: true) */ - ZYppCommitPolicy & syncPoolAfterCommit( bool yesNo_r = true ) + ZYppCommitPolicy & syncPoolAfterCommit( bool yesNo_r ) { _syncPoolAfterCommit = yesNo_r; return *this; } private: Modified: trunk/libzypp/zypp/sat/Solvable.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/sat/Solvable.h?rev=10617&r1=10616&r2=10617&view=diff ============================================================================== --- trunk/libzypp/zypp/sat/Solvable.h (original) +++ trunk/libzypp/zypp/sat/Solvable.h Mon Jul 21 16:22:01 2008 @@ -73,8 +73,10 @@ /** Represents no \ref Solvable. */ static const Solvable noSolvable; +#ifndef SWIG // Swig treats it as syntax error /** Evaluate \ref Solvable in a boolean context (\c != \c noSolvable). */ using base::SafeBool<Solvable>::operator bool_type; +#endif /** Return whether this \ref Solvable belongs to the system repo. * \note This includes the otherwise hidden systemSolvable. @@ -231,7 +233,9 @@ /** Expert backdoor. */ IdType id() const { return _id; } private: +#ifndef SWIG // Swig treats it as syntax error friend base::SafeBool<Solvable>::operator bool_type() const; +#endif bool boolTest() const { return get(); } private: IdType _id; @@ -318,6 +322,6 @@ } // namespace zypp /////////////////////////////////////////////////////////////////// -ZYPP_DEFINE_ID_HASHABLE( ::zypp::sat::Solvable ) +ZYPP_DEFINE_ID_HASHABLE( ::zypp::sat::Solvable ); #endif // ZYPP_SAT_SOLVABLE_H -- 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