Author: jkupec
Date: Fri Sep 5 11:40:34 2008
New Revision: 10942
URL: http://svn.opensuse.org/viewcvs/zypp?rev=10942&view=rev
Log:
- operator ==, !=, < definition moved to RepoInfoBase
- fixed RepoInfo::dumpAsIniOn() to not print 'type' if it is unknown
(bnc #407515)
Modified:
trunk/libzypp/zypp/RepoInfo.cc
trunk/libzypp/zypp/RepoInfo.h
trunk/libzypp/zypp/ServiceInfo.h
trunk/libzypp/zypp/repo/RepoInfoBase.cc
trunk/libzypp/zypp/repo/RepoInfoBase.h
Modified: trunk/libzypp/zypp/RepoInfo.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.cc?rev=10942&r1=10941&r2=10942&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.cc (original)
+++ trunk/libzypp/zypp/RepoInfo.cc Fri Sep 5 11:40:34 2008
@@ -335,8 +335,10 @@
str
<< "http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoInfo.h?rev=10942&r1=10941&r2=10942&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoInfo.h (original)
+++ trunk/libzypp/zypp/RepoInfo.h Fri Sep 5 11:40:34 2008
@@ -333,16 +333,14 @@
};
///////////////////////////////////////////////////////////////////
- /** \relates RepoInfo Stream output */
- std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
-
- inline bool operator<( const RepoInfo& lhs, const RepoInfo & rhs )
- { return lhs.alias() < rhs.alias(); }
-
typedef shared_ptr<RepoInfo> RepoInfo_Ptr;
typedef std::list<RepoInfo> RepoInfoList;
+ /** \relates RepoInfo Stream output */
+ std::ostream & operator<<( std::ostream & str, const RepoInfo & obj );
+
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
Modified: trunk/libzypp/zypp/ServiceInfo.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ServiceInfo.h?rev=10942&r1=10941&r2=10942&view=diff
==============================================================================
--- trunk/libzypp/zypp/ServiceInfo.h (original)
+++ trunk/libzypp/zypp/ServiceInfo.h Fri Sep 5 11:40:34 2008
@@ -96,17 +96,6 @@
/** \relates ServiceInfo Stream output */
std::ostream & operator<<( std::ostream & str, const ServiceInfo & obj );
- /** \relates ServiceInfo */
- inline bool operator==( const ServiceInfo & lhs, const ServiceInfo & rhs )
- { return lhs.alias() == rhs.alias(); }
-
- /** \relates ServiceInfo */
- inline bool operator!=( const ServiceInfo & lhs, const ServiceInfo & rhs )
- { return lhs.alias() != rhs.alias(); }
-
- /** \relates ServiceInfo */
- inline bool operator<( const ServiceInfo & lhs, const ServiceInfo & rhs )
- { return lhs.alias() < rhs.alias(); }
/////////////////////////////////////////////////////////////////
} // namespace zypp
Modified: trunk/libzypp/zypp/repo/RepoInfoBase.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoInfoBase.cc?rev=10942&r1=10941&r2=10942&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/RepoInfoBase.cc (original)
+++ trunk/libzypp/zypp/repo/RepoInfoBase.cc Fri Sep 5 11:40:34 2008
@@ -161,6 +161,11 @@
return str;
}
+ std::ostream & RepoInfoBase::dumpAsXMLOn( std::ostream & str) const
+ {
+ return str << "<!-- there's no XML representation of RepoInfoBase -->" << endl;
+ }
+
std::ostream & operator<<( std::ostream & str, const RepoInfoBase & obj )
{
return obj.dumpOn(str);
Modified: trunk/libzypp/zypp/repo/RepoInfoBase.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/RepoInfoBase.h?rev=10942&r1=10941&r2=10942&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/RepoInfoBase.h (original)
+++ trunk/libzypp/zypp/repo/RepoInfoBase.h Fri Sep 5 11:40:34 2008
@@ -135,9 +135,10 @@
virtual std::ostream & dumpAsIniOn( std::ostream & str ) const;
/**
- * Write an XML representation of this object.
+ * Write an XML representation of this object. Implement in
+ * derived classes.
*/
- virtual std::ostream & dumpAsXMLOn( std::ostream & str) const = 0;
+ virtual std::ostream & dumpAsXMLOn( std::ostream & str) const;
class Impl;
private:
@@ -146,12 +147,20 @@
};
///////////////////////////////////////////////////////////////////
- /** \relates RepoInfoBase Stream output */
- std::ostream & operator<<( std::ostream & str, const RepoInfoBase & obj );
+ /** \relates RepoInfoBase */
+ inline bool operator==( const RepoInfoBase & lhs, const RepoInfoBase & rhs )
+ { return lhs.alias() == rhs.alias(); }
+
+ /** \relates RepoInfoBase */
+ inline bool operator!=( const RepoInfoBase & lhs, const RepoInfoBase & rhs )
+ { return lhs.alias() != rhs.alias(); }
inline bool operator<( const RepoInfoBase & lhs, const RepoInfoBase & rhs )
{ return lhs.alias() < rhs.alias(); }
+ /** \relates RepoInfoBase Stream output */
+ std::ostream & operator<<( std::ostream & str, const RepoInfoBase & obj );
+
typedef shared_ptr<RepoInfoBase> RepoInfoBase_Ptr;
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org