Author: jkupec
Date: Sat Apr 26 15:52:55 2008
New Revision: 9833
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9833&view=rev
Log:
- stream output for TriBool added
Modified:
trunk/libzypp/zypp/TriBool.h
Modified: trunk/libzypp/zypp/TriBool.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/TriBool.h?rev=9833&r1=9832&r2=9833&view=diff
==============================================================================
--- trunk/libzypp/zypp/TriBool.h (original)
+++ trunk/libzypp/zypp/TriBool.h Sat Apr 26 15:52:55 2008
@@ -12,6 +12,7 @@
#ifndef ZYPP_TRIBOOL_H
#define ZYPP_TRIBOOL_H
+#include <iosfwd>
#include
///////////////////////////////////////////////////////////////////
@@ -34,6 +35,18 @@
using boost::logic::tribool;
using boost::logic::indeterminate;
+ /** \relates TriBool stream output */
+ inline std::ostream & operator<<(std::ostream & s, const TriBool & obj)
+ {
+ if (obj == indeterminate)
+ s << "indeterminate";
+ else if (obj)
+ s << "true";
+ else
+ s << "false";
+ return s;
+ }
+
/////////////////////////////////////////////////////////////////
} // namespace zypp
///////////////////////////////////////////////////////////////////
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org