30 #include <boost/cstdint.hpp>
36 using namespace boost;
41 const string Uint64Converter::WIRE_SCHEMA =
"uint64";
43 Uint64Converter::Uint64Converter() :
51 assert(data.first == this->getDataType());
53 boost::shared_ptr<uint64_t> number = boost::static_pointer_cast<uint64_t>(data.second);
55 for (uint64_t i = 0; i < 8; ++i) {
56 wire[i] = (
unsigned char) ((*number & (0xffull << (i * 8ull))) >> (i * 8ull));
64 assert(wire.size() == 8);
66 boost::shared_ptr<uint64_t> number(
new uint64_t(0));
67 for (uint64_t i = 0; i < 8; ++i) {
68 *number |= ((uint64_t) ((
unsigned char) wire[i]) << (i * 8ull));