Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11714 - /trunk/libzypp/zypp/base/Flags.h
  • From: mlandres@xxxxxxxxxxxxxxxx
  • Date: Wed, 19 Nov 2008 12:38:57 -0000
  • Message-id: <20081119123857.7F54B9E527@xxxxxxxxxxxxxxxx>
Author: mlandres
Date: Wed Nov 19 13:38:57 2008
New Revision: 11714

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11714&view=rev
Log:
stream output for Flags

Modified:
trunk/libzypp/zypp/base/Flags.h

Modified: trunk/libzypp/zypp/base/Flags.h
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/Flags.h?rev=11714&r1=11713&r2=11714&view=diff
==============================================================================
--- trunk/libzypp/zypp/base/Flags.h (original)
+++ trunk/libzypp/zypp/base/Flags.h Wed Nov 19 13:38:57 2008
@@ -11,6 +11,9 @@
*/
#ifndef ZYPP_BASE_FLAGS_H
#define ZYPP_BASE_FLAGS_H
+
+#include "zypp/base/String.h"
+
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
@@ -101,6 +104,10 @@
};
///////////////////////////////////////////////////////////////////

+ template<typename Enum>
+ inline std::ostream & operator<<( std::ostream & str, const Flags<Enum> &
obj )
+ { return str << str::hexstring(obj); }
+
/** \relates Flags */
#define ZYPP_DECLARE_FLAGS(Name,Enum) typedef zypp::base::Flags<Enum> Name


--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages