Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F118091892
HexaByte.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jun 17, 15:32
Size
703 B
Mime Type
text/x-c
Expires
Thu, Jun 19, 15:32 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26819843
Attached To
R6621 SBCP High-Level Driver
HexaByte.cpp
View Options
/**
* \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
Log In to Comment