typedef boost::int8_t value_type;
static size_type const fixed_bytes = 1;
+ static value_type const min_value = -128;
+ static value_type const max_value = 127;
value_type value() const { return i()[0]; }
void value(value_type v) { i()[0] = v; }
typedef boost::uint8_t value_type;
static size_type const fixed_bytes = 1;
+ static value_type const min_value = 0u;
+ static value_type const max_value = 255u;
value_type value() const { return i()[0]; }
void value(value_type v) { i()[0] = v; }
typedef boost::int16_t value_type;
static size_type const fixed_bytes = 2;
+ static value_type const min_value = -32768;
+ static value_type const max_value = 32767;
+
value_type value() const { return detail::packet::parse_uint16(i()); }
void value(value_type v) { detail::packet::write_uint16(i(),v); }
typedef boost::uint16_t value_type;
static size_type const fixed_bytes = 2;
+ static value_type const min_value = 0u;
+ static value_type const max_value = 65535u;
value_type value() const { return detail::packet::parse_uint16(i()); }
void value(value_type v) { detail::packet::write_uint16(i(),v); }
typedef boost::int32_t value_type;
static size_type const fixed_bytes = 3;
+ static value_type const min_value = -8388608;
+ static value_type const max_value = 8388607;
value_type value() const {
value_type v (detail::packet::parse_uint24(i())); return v&0x800000 ? v|0xff000000 : v; }
typedef boost::uint32_t value_type;
static size_type const fixed_bytes = 3;
+ static value_type const min_value = 0u;
+ static value_type const max_value = 16777215u;
value_type value() const { return detail::packet::parse_uint24(i()); }
void value(value_type v) { detail::packet::write_uint24(i(),v); }
typedef boost::int32_t value_type;
static size_type const fixed_bytes = 4;
+ static value_type const min_value = -2147483647 - 1;
+ static value_type const max_value = 2147483647;
value_type value() const { return detail::packet::parse_uint32(i()); }
void value(value_type v) { detail::packet::write_uint32(i(),v); }
typedef boost::uint32_t value_type;
static size_type const fixed_bytes = 4;
+ static value_type const min_value = 0u;
+ static value_type const max_value = 4294967295u;
value_type value() const { return detail::packet::parse_uint32(i()); }
void value(value_type v) { detail::packet::write_uint32(i(),v); }
///////////////////////////////////////////////////////////////////////////
typedef boost::int32_t value_type;
+ static size_type const start_bit = Start;
+ static size_type const end_bit = End;
static size_type const fixed_bytes = (End-1)/8+1;
+ static value_type const max_value = boost::low_bits_mask_t<End-Start-1>::sig_bits;
+ static value_type const min_value = - max_value - 1;
+
value_type value() const {
value_type v (detail::packet::parse_bitfield<Start,End>::parse(i()));
///////////////////////////////////////////////////////////////////////////
typedef boost::uint32_t value_type;
+ static size_type const start_bit = Start;
+ static size_type const end_bit = End;
static size_type const fixed_bytes = (End-1)/8+1;
+ static value_type const min_value = 0u;
+ static value_type const max_value = boost::low_bits_mask_t<End-Start>::sig_bits;
value_type value() const { return detail::packet::parse_bitfield<Start,End>::parse(i()); }
void value(value_type v) { detail::packet::parse_bitfield<Start,End>::write(i(),v); }
///////////////////////////////////////////////////////////////////////////
typedef bool value_type;
+ static size_type const bit = Bit;
static size_type const fixed_bytes = Bit/8+1;
+ static value_type const min_value = 0;
+ static value_type const max_value = 1;
value_type value() const { return i()[Bit/8] & (1<<(7-(Bit%8))); }
void value(value_type v) {
///////////////////////////////hh.e////////////////////////////////////////
#endif
-#if !defined(SENF_PACKETS_DECL_ONLY) && !defined(HH_ParseInt_i_)
+#if !defined(HH_Packets__decls_) && !defined(HH_ParseInt_i_)
#define HH_ParseInt_i_
//#include "ParseInt.cci"
//#include "ParseInt.ct"