Page MenuHomec4science

HexaByte.cpp
No OneTemporary

File Metadata

Created
Tue, Jun 17, 11:15

HexaByte.cpp

/**
* \file HexaByte.cpp
*
* \date Oct 23, 2012
* \author Alexandre Tuleu
*/
#include "HexaByte.h"
HexaByte::HexaByte() : d_value(UnitializedByteValue){}
HexaByte::~HexaByte(){}
unsigned int HexaByte::Value() const {
return d_value;
}
bool HexaByte::IsUnitialized() const {
return d_value == UnitializedByteValue;
}
std::ostream & operator << (std::ostream & out, const HexaByte & h){
std::ios_base::fmtflags oldflags = out.flags();
out << "0x" << std::hex << h.d_value;
out.flags(oldflags);
return out;
}
std::istream & operator >> (std::istream & in, HexaByte & h){
std::ios_base::fmtflags oldflags = in.flags();
in >> std::hex >> h.d_value;
in.flags(oldflags);
return in;
}

Event Timeline