30 #include <boost/cstdint.hpp>
36 using namespace boost;
41 const string Int64Converter::WIRE_SCHEMA =
"int64";
43 Int64Converter::Int64Converter() :
51 assert(data.first == this->getDataType());
53 boost::shared_ptr<int64_t> number = boost::static_pointer_cast<int64_t>(data.second);
55 for (int64_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<int64_t> number(
new int64_t(0));
67 for (int64_t i = 0; i < 8; ++i) {
68 *number |= ((int64_t) ((
unsigned char) wire[i]) << (i * 8ull));