pin.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <sstream>
00023 #include "pin.h"
00024
00025 namespace Barry {
00026
00027 std::ostream& operator<<(std::ostream &os, const Pin &pin)
00028 {
00029 os << pin.Str();
00030 return os;
00031 }
00032
00033 std::istream& operator>>(std::istream &is, Pin &pin)
00034 {
00035 uint32_t newpin;
00036 is >> std::hex >> newpin;
00037 if( is )
00038 pin = newpin;
00039 return is;
00040 }
00041
00042 std::string Pin::Str() const
00043 {
00044 std::ostringstream oss;
00045 oss << std::hex << pin;
00046 return oss.str();
00047 }
00048
00049 }
00050