cea35374d2368f10cadcfcf763f2f53fef86bd72
[calu.git] / 3c_disasm / uint32_from_hex.hpp
1 #ifndef __UINT32_FROM_HEX_H__
2 #define __UINT32_FROM_HEX_H__
3
4 class uint32_from_hex   // For use with boost::lexical_cast
5 {
6         typedef unsigned int uint32;
7         uint32 value;
8         public:
9                 operator uint32() const {
10                         return value;
11                 }
12                 friend std::istream& operator>>(std::istream& in, uint32_from_hex& outValue)
13                 {
14                         in >> std::hex >> outValue.value;
15                         return in;
16                 }
17 };
18
19 #endif