- removed operators swig can't wrap
authorArvin Schnell <aschnell@suse.de>
Mon, 30 Jul 2007 13:51:39 +0000 (13:51 +0000)
committerArvin Schnell <aschnell@suse.de>
Mon, 30 Jul 2007 13:51:39 +0000 (13:51 +0000)
swig/CapFactory.i
swig/CapMatch.i
swig/MediaSetAccess.i
swig/PoolItem.i
swig/RepoInfo.i
swig/RepoStatus.i
swig/ResPool.i
swig/ResStatus.i
swig/ResStore.i
swig/TranslatedText.i

index b71e72e..4eaae2b 100644 (file)
@@ -1,7 +1,6 @@
 
 class CapFactory
-  {
-    friend std::ostream & operator<<( std::ostream & str, const CapFactory & obj );
+{
 
   public:
     /** Default ctor */
@@ -54,4 +53,4 @@ class CapFactory
     struct Impl;
     /** Pointer to implementation */
     RW_pointer<Impl> _pimpl;
-  };
\ No newline at end of file
+};
index 068a4a8..bb179cb 100644 (file)
@@ -1,6 +1,6 @@
 
 class CapMatch
-  {
+{
     enum Result { NOMATCH, MATCH, IRRELEVANT };
 
   public:
@@ -13,45 +13,11 @@ class CapMatch
     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
+};
+
index fc0d1b1..9193124 100644 (file)
@@ -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 );
+
+};
+
index 3f4880c..08559c1 100644 (file)
@@ -1,7 +1,6 @@
 
 class PoolItem_Ref
-  {
-    friend std::ostream & operator<<( std::ostream & str, const PoolItem_Ref & obj );
+{
 
   public:
     /** Implementation  */
@@ -34,21 +33,11 @@ class PoolItem_Ref
     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 @@ class PoolItem_Ref
     void restoreState() const;
     bool sameState() const;
     //@}
-  };
-  ///////////////////////////////////////////////////////////////////
+};
+
+typedef PoolItem_Ref PoolItem;
 
-  typedef PoolItem_Ref PoolItem;
index fa8589a..28a8298 100644 (file)
@@ -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 @@ class RepoInfo
      * ( [somerepo] )
      */
     std::string alias() const;
-    
+
     /**
      * A Url under which the metadata are located, or a set of mirrors.
      *
@@ -32,37 +30,37 @@ class RepoInfo
      * 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 @@ class RepoInfo
      * 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 @@ class RepoInfo
      * 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 @@ class RepoInfo
      * \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>;
 
index 7bec53c..058ddcc 100644 (file)
@@ -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 @@ class RepoStatus
      * 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 @@ class RepoStatus
   public:
     /** Default ctor */
     RepoStatus();
-    
+
     /**
      * \short Status from a single file
      * As most repository state is represented
@@ -45,7 +45,7 @@ class RepoStatus
      * construct the status from a file.
      */
     RepoStatus( const Pathname &file );
-    
+
     /** Dtor */
     ~RepoStatus();
 
@@ -54,4 +54,4 @@ class RepoStatus
   private:
     /** Pointer to implementation */
     RWCOW_pointer<Impl> _pimpl;
-  };
\ No newline at end of file
+};
index 5fc5589..0c51432 100644 (file)
@@ -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 @@ class ResPool
 
     /** \name Iterate through all ResObjects (all kinds). */
     //@{
-    /** 
+    /**
     const_iterator begin() const;
     const_iterator end() const;
     */
@@ -87,12 +86,12 @@ class ResPool
    */
 
    /**
-    *  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 @@ class ResPool
     *  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 @@ class ResPool
   private:
     /** Const access to implementation. */
     pool::PoolTraits::Impl_constPtr _pimpl;
-  };
\ No newline at end of file
+
+};
index be0641d..a26056c 100644 (file)
@@ -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 @@ class ResStatus
     { 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 @@ class ResStatus
 
     bool isToBeInstalledNotSoft () const
     { return isToBeInstalled() && !fieldValueIs<TransactDetailField>( SOFT_INSTALL ); }
-      
+
 
     bool isToBeUninstalledSoft () const
     { return isToBeUninstalled() && fieldValueIs<TransactDetailField>( SOFT_REMOVE ); }
@@ -222,7 +220,7 @@ class ResStatus
   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 @@ class ResStatus
 
   private:
     BitFieldType _bitfield;
-  };
\ No newline at end of file
+};
index 5abb934..26ae9e4 100644 (file)
@@ -4,8 +4,7 @@ class ResStore
   typedef ResObject                ResT;
   typedef std::set<ResT::Ptr>      StorageT;
   typedef StorageT::size_type      size_type;
-  
-  friend std::ostream & operator<<( std::ostream & str, const ResStore & obj );
+
   public:
     ResStore();
     ~ResStore();
index 5f21754..9ee4e9c 100644 (file)
@@ -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
+
+};