All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
pieceMask.cc
Go to the documentation of this file.
2 #include "osl/piece.h"
3 #include <boost/static_assert.hpp>
4 #include <iostream>
5 #include <iomanip>
6 #include <bitset>
7 
8 BOOST_STATIC_ASSERT(sizeof(osl::PieceMask) == 8);
9 
10 #ifndef MINIMAL
11 std::ostream& osl::container::operator<<(std::ostream& os,const PieceMask& pieceMask){
12 #if OSL_WORDSIZE == 64
13  os << '(' << std::setbase(16) << std::setfill('0')
14  << std::setw(12) << pieceMask.getMask(0).value()
15  << std::setbase(10) << ')';
16 #elif OSL_WORDSIZE == 32
17  os << '(' << std::setbase(16) << std::setfill('0')
18  << std::setw(4) << pieceMask.getMask(1).value()
19  << std::setw(8) << pieceMask.getMask(0).value() << std::setbase(10) << ')';
20 #endif
21  os << std::bitset<64>(pieceMask.getMask(0).value());
22  return os;
23 }
24 #endif
25 // ;;; Local Variables:
26 // ;;; mode:c++
27 // ;;; c-basic-offset:2
28 // ;;; End: