44 Data() : current(2) {}
45 std::vector<uint8_t> current;
48 bool serialise(ecl::PushAndPop<unsigned char> & byteStream)
50 buildBytes(Header::Current, byteStream);
51 buildBytes(
length, byteStream);
52 buildBytes(data.current[0], byteStream);
53 buildBytes(data.current[1], byteStream);
57 bool deserialise(ecl::PushAndPop<unsigned char> & byteStream)
59 if (byteStream.size() <
static_cast<unsigned int>(
length)+2)
65 unsigned char header_id(0x00), length_packed(0x00);
66 buildVariable(header_id, byteStream);
67 buildVariable(length_packed, byteStream);
68 if( header_id != Header::Current )
return false;
69 if( length_packed !=
length )
return false;
71 buildVariable(data.current[0], byteStream);
72 buildVariable(data.current[1], byteStream);