Author: aschnell Date: Mon Jul 30 15:51:39 2007 New Revision: 6293 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6293&view=rev Log: - removed operators swig can't wrap Modified: trunk/libzypp-bindings/swig/CapFactory.i trunk/libzypp-bindings/swig/CapMatch.i trunk/libzypp-bindings/swig/MediaSetAccess.i trunk/libzypp-bindings/swig/PoolItem.i trunk/libzypp-bindings/swig/RepoInfo.i trunk/libzypp-bindings/swig/RepoStatus.i trunk/libzypp-bindings/swig/ResPool.i trunk/libzypp-bindings/swig/ResStatus.i trunk/libzypp-bindings/swig/ResStore.i trunk/libzypp-bindings/swig/TranslatedText.i Modified: trunk/libzypp-bindings/swig/CapFactory.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/CapFactory.... ============================================================================== --- trunk/libzypp-bindings/swig/CapFactory.i (original) +++ trunk/libzypp-bindings/swig/CapFactory.i Mon Jul 30 15:51:39 2007 @@ -1,7 +1,6 @@ class CapFactory - { - friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj ); +{ public: /** Default ctor */ @@ -54,4 +53,4 @@ struct Impl; /** Pointer to implementation */ RW_pointer<Impl> _pimpl; - }; \ No newline at end of file +}; Modified: trunk/libzypp-bindings/swig/CapMatch.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/CapMatch.i?... ============================================================================== --- trunk/libzypp-bindings/swig/CapMatch.i (original) +++ trunk/libzypp-bindings/swig/CapMatch.i Mon Jul 30 15:51:39 2007 @@ -1,6 +1,6 @@ class CapMatch - { +{ enum Result { NOMATCH, MATCH, IRRELEVANT }; public: @@ -13,45 +13,11 @@ static const CapMatch no; static const CapMatch irrelevant; - friend bool operator==( const CapMatch & lhs, const CapMatch & rhs ) - { return lhs._result == rhs._result; } - - friend bool operator!=( const CapMatch & lhs, const CapMatch & rhs ) - { return lhs._result != rhs._result; } - - friend CapMatch operator!( const CapMatch & lhs ) - { - if ( lhs._result == CapMatch::IRRELEVANT ) - return lhs; - return !(lhs._result == CapMatch::MATCH); - } - - friend CapMatch operator&&( const CapMatch & lhs, const CapMatch & rhs ) - { - if ( lhs._result == CapMatch::IRRELEVANT ) - return rhs; - if ( rhs._result == CapMatch::IRRELEVANT ) - return lhs; - return (lhs._result == CapMatch::MATCH) - && (rhs._result == CapMatch::MATCH); - } - - friend CapMatch operator||( const CapMatch & lhs, const CapMatch & rhs ) - { - if ( lhs._result == CapMatch::IRRELEVANT ) - return rhs; - if ( rhs._result == CapMatch::IRRELEVANT ) - return lhs; - return (lhs._result == CapMatch::MATCH) - || (rhs._result == CapMatch::MATCH); - } - - friend std::ostream & operator<<( std::ostream & str, const CapMatch & obj ); - private: CapMatch() : _result( IRRELEVANT ) {} Result _result; - }; \ No newline at end of file +}; + Modified: trunk/libzypp-bindings/swig/MediaSetAccess.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/MediaSetAcc... ============================================================================== --- trunk/libzypp-bindings/swig/MediaSetAccess.i (original) +++ trunk/libzypp-bindings/swig/MediaSetAccess.i Mon Jul 30 15:51:39 2007 @@ -1,19 +1,16 @@ class MediaSetAccess { - friend std::ostream & operator<<( std::ostream & str, const MediaSetAccess & obj ); - public: - /** - * creates a callback enabled media access for \param url and \param path. - * with only 1 media no verified - */ - MediaSetAccess( const Url &url, const Pathname &path ); - ~MediaSetAccess(); - - /** - * Sets a verifier for given media number - */ - void setVerifier( unsigned media_nr, media::MediaVerifierRef verifier ); - Pathname provideFile(const Pathname & file, unsigned media_nr ); - }; \ No newline at end of file +public: + + MediaSetAccess( const Url &url, const Pathname &path ); + + ~MediaSetAccess(); + + void setVerifier( unsigned media_nr, media::MediaVerifierRef verifier ); + + Pathname provideFile(const Pathname & file, unsigned media_nr ); + +}; + Modified: trunk/libzypp-bindings/swig/PoolItem.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/PoolItem.i?... ============================================================================== --- trunk/libzypp-bindings/swig/PoolItem.i (original) +++ trunk/libzypp-bindings/swig/PoolItem.i Mon Jul 30 15:51:39 2007 @@ -1,7 +1,6 @@ class PoolItem_Ref - { - friend std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj ); +{ public: /** Implementation */ @@ -34,21 +33,11 @@ ResObject::constPtr resolvable() const; public: - /** Implicit conversion into ResObject::constPtr to - * support query filters operating on ResObject. - */ - operator ResObject::constPtr() const - { return resolvable(); } /** Forward \c -> access to ResObject. */ ResObject::constPtr operator->() const { return resolvable(); } - /** Conversion to bool to allow pointer style tests - * for nonNULL \ref resolvable. */ - operator ResObject::constPtr::unspecified_bool_type() const - { return resolvable(); } - private: /** Pointer to implementation */ RW_pointer<Impl> _pimpl; @@ -62,7 +51,7 @@ void restoreState() const; bool sameState() const; //@} - }; - /////////////////////////////////////////////////////////////////// +}; + +typedef PoolItem_Ref PoolItem; - typedef PoolItem_Ref PoolItem; Modified: trunk/libzypp-bindings/swig/RepoInfo.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoInfo.i?... ============================================================================== --- trunk/libzypp-bindings/swig/RepoInfo.i (original) +++ trunk/libzypp-bindings/swig/RepoInfo.i Mon Jul 30 15:51:39 2007 @@ -1,14 +1,12 @@ %template(UrlSet) std::set<Url>; - + class RepoInfo - { - friend std::ostream & operator<<( std::ostream & str, const RepoInfo & obj ); - - public: +{ +public: RepoInfo(); ~RepoInfo(); - + /** * unique identifier for this source. If not specified * It should be generated from the base url. @@ -17,7 +15,7 @@ * ( [somerepo] ) */ std::string alias() const; - + /** * A Url under which the metadata are located, or a set of mirrors. * @@ -32,37 +30,37 @@ * If empty, the base url will be used. */ Url mirrorListUrl() const; - + typedef std::set<Url>::const_iterator urls_const_iterator; - + /** * iterator that points at begin of repository urls */ urls_const_iterator baseUrlsBegin() const; - + /** * iterator that points at end of repository urls */ urls_const_iterator baseUrlsEnd() const; - + /** * If enabled is false, then this repository must be ignored as if does * not exists, except when checking for duplicate alias. */ boost::tribool enabled() const; - + /** * If true, the repostory must be refreshed before creating resolvables * from it */ boost::tribool autorefresh() const; - + /** * Type of repository, - * + * */ repo::RepoType type() const; - + /** * \short Repository short label * @@ -79,7 +77,7 @@ * infos created in memory. */ Pathname filepath() const; - + /** * Add a base url. \see baseUrls * \param url The base url for the repository. @@ -87,37 +85,37 @@ * To edit or remove urls, create a new RepoInfo instead. */ RepoInfo & addBaseUrl( const Url &url ); - + /** * Set mirror list url. \see mirrorListUrl * \param url The base url for the list */ RepoInfo & setMirrorListUrl( const Url &url ); - + /** * enable or disable the repository \see enabled * \param enabled */ RepoInfo & setEnabled( boost::tribool enabled ); - + /** * enable or disable autorefresh \see autorefresh * \param enabled */ RepoInfo & setAutorefresh( boost::tribool autorefresh ); - + /** * set the repository alias \see alias * \param alias */ RepoInfo & setAlias( const std::string &alias ); - + /** * set the repository type \see type * \param t */ RepoInfo & setType( const repo::RepoType &t ); - + /** * set the repository name \see name * \param name @@ -129,16 +127,17 @@ * \param path File path */ RepoInfo & setFilepath( const Pathname &filename ); - + std::ostream & dumpOn( std::ostream & str ) const; - + std::ostream & dumpRepoOn( std::ostream & str ) const; class Impl; private: /** Pointer to implementation */ RWCOW_pointer<Impl> _pimpl; - }; - typedef std::list<RepoInfo> RepoInfoList; - %template(RepoInfoList) std::list<RepoInfo>; +}; + +typedef std::list<RepoInfo> RepoInfoList; +%template(RepoInfoList) std::list<RepoInfo>; Modified: trunk/libzypp-bindings/swig/RepoStatus.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/RepoStatus.... ============================================================================== --- trunk/libzypp-bindings/swig/RepoStatus.i (original) +++ trunk/libzypp-bindings/swig/RepoStatus.i Mon Jul 30 15:51:39 2007 @@ -1,9 +1,9 @@ + class RepoStatus - { - friend std::ostream & operator<<( std::ostream & str, const RepoStatus & obj ); +{ public: - + /** * Checksum of the repository. * Usually the checksum of the index, but any @@ -11,20 +11,20 @@ * in any way is sufficient. */ std::string checksum() const; - + /** * timestamp of the repository. If the repository * changes, it has to be updated as well with the * new timestamp. */ Date timestamp() const; - + /** * set the repository checksum \see checksum * \param checksum */ RepoStatus & setChecksum( const std::string &checksum ); - + /** * set the repository timestamp \see timestamp * \param timestamp @@ -37,7 +37,7 @@ public: /** Default ctor */ RepoStatus(); - + /** * \short Status from a single file * As most repository state is represented @@ -45,7 +45,7 @@ * construct the status from a file. */ RepoStatus( const Pathname &file ); - + /** Dtor */ ~RepoStatus(); @@ -54,4 +54,4 @@ private: /** Pointer to implementation */ RWCOW_pointer<Impl> _pimpl; - }; \ No newline at end of file +}; Modified: trunk/libzypp-bindings/swig/ResPool.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResPool.i?r... ============================================================================== --- trunk/libzypp-bindings/swig/ResPool.i (original) +++ trunk/libzypp-bindings/swig/ResPool.i Mon Jul 30 15:51:39 2007 @@ -1,7 +1,6 @@ class ResPool - { - friend std::ostream & operator<<( std::ostream & str, const ResPool & obj ); +{ public: /** \ref zypp::pool::PoolItem */ @@ -28,7 +27,7 @@ /** \name Iterate through all ResObjects (all kinds). */ //@{ - /** + /** const_iterator begin() const; const_iterator end() const; */ @@ -87,12 +86,12 @@ */ /** - * Handling additional requirement. E.G. need package "foo" and package + * Handling additional requirement. E.G. need package "foo" and package * "foo1" which has a greater version than 1.0: * * \code * CapSet capset; - * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo")); + * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo")); * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo1 > 1.0")); * * // The user is setting this capablility @@ -109,36 +108,36 @@ * Handling additional conflicts. E.G. do not install anything which provides "foo": * * \code - * CapSet capset; + * CapSet capset; * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo")); * * // The user is setting this capablility * ResPool::AdditionalCapSet aCapSet; * aCapSet[ResStatus::USER] = capset; * - * setAdditionalConflict( aCapSet ); + * setAdditionalConflict( aCapSet ); * \endcode - */ + */ void setAdditionalConflict( const AdditionalCapSet & capset ) const; AdditionalCapSet & additionaConflict() const; - + /** * Handling additional provides. This is used for ignoring a requirement. * e.G. Do ignore the requirement "foo": * * \code - * CapSet capset; + * CapSet capset; * capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo")); * * // The user is setting this capablility * ResPool::AdditionalCapSet aCapSet; * aCapSet[ResStatus::USER] = capset; * - * setAdditionalProvide( aCapSet ); + * setAdditionalProvide( aCapSet ); * \endcode - */ + */ void setAdditionalProvide( const AdditionalCapSet & capset ) const; - AdditionalCapSet & additionaProvide() const; + AdditionalCapSet & additionaProvide() const; private: /** */ @@ -148,4 +147,5 @@ private: /** Const access to implementation. */ pool::PoolTraits::Impl_constPtr _pimpl; - }; \ No newline at end of file + +}; Modified: trunk/libzypp-bindings/swig/ResStatus.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResStatus.i... ============================================================================== --- trunk/libzypp-bindings/swig/ResStatus.i (original) +++ trunk/libzypp-bindings/swig/ResStatus.i Mon Jul 30 15:51:39 2007 @@ -1,8 +1,6 @@ class ResStatus - { - friend std::ostream & operator<<( std::ostream & str, const ResStatus & obj ); - friend bool operator==( const ResStatus & lhs, const ResStatus & rhs ); +{ public: /** \name BitField range definitions. @@ -177,7 +175,7 @@ { return fieldValueIs<TransactField>( LOCKED ); } bool isKept() const - { return fieldValueIs<TransactField>( KEEP_STATE ); } + { return fieldValueIs<TransactField>( KEEP_STATE ); } bool transacts() const { return fieldValueIs<TransactField>( TRANSACT ); } @@ -214,7 +212,7 @@ bool isToBeInstalledNotSoft () const { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); } - + bool isToBeUninstalledSoft () const { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); } @@ -222,7 +220,7 @@ public: bool setTransactValue( TransactValue newVal_r, TransactByValue causer_r ); - bool setLock( bool toLock_r, TransactByValue causer_r ); + bool setLock( bool toLock_r, TransactByValue causer_r ); bool maySetLock( bool to_r, TransactByValue causer_r ); bool setTransact( bool toTansact_r, TransactByValue causer_r ); bool maySetTransact( bool val_r, TransactByValue causer ); @@ -370,4 +368,4 @@ private: BitFieldType _bitfield; - }; \ No newline at end of file +}; Modified: trunk/libzypp-bindings/swig/ResStore.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/ResStore.i?... ============================================================================== --- trunk/libzypp-bindings/swig/ResStore.i (original) +++ trunk/libzypp-bindings/swig/ResStore.i Mon Jul 30 15:51:39 2007 @@ -4,8 +4,7 @@ typedef ResObject ResT; typedef std::setResT::Ptr StorageT; typedef StorageT::size_type size_type; - - friend std::ostream & operator<<( std::ostream & str, const ResStore & obj ); + public: ResStore(); ~ResStore(); Modified: trunk/libzypp-bindings/swig/TranslatedText.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-bindings/swig/TranslatedT... ============================================================================== --- trunk/libzypp-bindings/swig/TranslatedText.i (original) +++ trunk/libzypp-bindings/swig/TranslatedText.i Mon Jul 30 15:51:39 2007 @@ -1,7 +1,6 @@ - class TranslatedText - { - friend std::ostream & operator<<( std::ostream & str, const TranslatedText & obj ); +class TranslatedText +{ public: /** Implementation */ class Impl; @@ -20,7 +19,7 @@ /** true if the text have no translations for any language */ bool empty() const ; - + /** static default empty translated text */ static const TranslatedText notext; @@ -41,4 +40,5 @@ private: /** Pointer to implementation */ RWCOW_pointer<Impl> _pimpl; - }; \ No newline at end of file + +}; -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org