X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=3c_disasm%2Fuint32_from_hex.hpp;fp=3c_disasm%2Fuint32_from_hex.hpp;h=cea35374d2368f10cadcfcf763f2f53fef86bd72;hb=12d2a7c14a42e01b6caf2a097db32404a403d213;hp=0000000000000000000000000000000000000000;hpb=31d88f201bf427d70924b9737ecdb6e0611939d3;p=calu.git diff --git a/3c_disasm/uint32_from_hex.hpp b/3c_disasm/uint32_from_hex.hpp new file mode 100644 index 0000000..cea3537 --- /dev/null +++ b/3c_disasm/uint32_from_hex.hpp @@ -0,0 +1,19 @@ +#ifndef __UINT32_FROM_HEX_H__ +#define __UINT32_FROM_HEX_H__ + +class uint32_from_hex // For use with boost::lexical_cast +{ + typedef unsigned int uint32; + uint32 value; + public: + operator uint32() const { + return value; + } + friend std::istream& operator>>(std::istream& in, uint32_from_hex& outValue) + { + in >> std::hex >> outValue.value; + return in; + } +}; + +#endif