26 lines
491 B
C++
26 lines
491 B
C++
#include "pibitarray.h"
|
|
#include "picout.h"
|
|
|
|
|
|
PICout operator <<(PICout s, const PIBitArray & ba) {
|
|
s.space();
|
|
s.setControl(0, true);
|
|
for (uint i = 0; i < ba.bitSize(); ++i) {
|
|
s << int(ba[i]);
|
|
if (i % 8 == 7) s << ' ';
|
|
}
|
|
s.restoreControl();
|
|
return s;
|
|
}
|
|
|
|
#ifdef PIP_STD_IOSTREAM
|
|
std::ostream &operator <<(std::ostream & s, const PIBitArray & ba) {
|
|
for (uint i = 0; i < ba.bitSize(); ++i) {
|
|
s << ba[i];
|
|
if (i % 8 == 7) s << ' ';
|
|
}
|
|
return s;
|
|
}
|
|
#endif
|
|
|