X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseInt.hh;h=0d4f4f349bdfd677fa6e2488e6a25d41ae3f537d;hb=9a988902090d28007578e93bffd809f6bd913155;hp=3f35b933c36591a9dc909ac7d368a28acb045fd2;hpb=5d62f84a80b2c72cc0aa5cabc3ddad752e87fcc8;p=senf.git diff --git a/Packets/ParseInt.hh b/Packets/ParseInt.hh index 3f35b93..0d4f4f3 100644 --- a/Packets/ParseInt.hh +++ b/Packets/ParseInt.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -39,9 +39,9 @@ namespace senf { template struct Parse_Int8 - : public impl::ParseIntOps,boost::int8_t>, + : public impl::ParseIntOps,boost::int8_t>, public ParserBase - { + { template struct rebind { typedef Parse_Int8 parser; }; typedef Iterator byte_iterator; @@ -65,7 +65,7 @@ namespace senf { template struct Parse_UInt8 - : public impl::ParseIntOps,boost::uint8_t>, + : public impl::ParseIntOps,boost::uint8_t>, public ParserBase { template @@ -73,7 +73,7 @@ namespace senf { typedef Iterator byte_iterator; static unsigned bytes() { return 1; } - + Parse_UInt8() {} explicit Parse_UInt8(Iterator const & i) : ParserBase(i) {} @@ -91,7 +91,7 @@ namespace senf { template struct Parse_Int16 - : public impl::ParseIntOps,boost::int16_t>, + : public impl::ParseIntOps,boost::int16_t>, public ParserBase { template @@ -117,7 +117,7 @@ namespace senf { template struct Parse_UInt16 - : public impl::ParseIntOps,boost::uint16_t>, + : public impl::ParseIntOps,boost::uint16_t>, public ParserBase { template @@ -143,7 +143,7 @@ namespace senf { template struct Parse_Int24 - : public impl::ParseIntOps,boost::int32_t>, + : public impl::ParseIntOps,boost::int32_t>, public ParserBase { template @@ -159,7 +159,7 @@ namespace senf { typedef boost::int32_t value_type; - value_type value() const { + value_type value() const { value_type v (impl::parse_uint24(this->i())); return v&0x800000 ? v|0xff000000 : v; } void value(value_type v) { impl::write_uint24(this->i(),v); } Parse_Int24 const & operator= (value_type other) { value(other); return *this; } @@ -170,7 +170,7 @@ namespace senf { template struct Parse_UInt24 - : public impl::ParseIntOps,boost::uint32_t>, + : public impl::ParseIntOps,boost::uint32_t>, public ParserBase { template @@ -196,7 +196,7 @@ namespace senf { template struct Parse_Int32 - : public impl::ParseIntOps,boost::int32_t>, + : public impl::ParseIntOps,boost::int32_t>, public ParserBase { template @@ -222,7 +222,7 @@ namespace senf { template struct Parse_UInt32 - : public impl::ParseIntOps,boost::uint32_t>, + : public impl::ParseIntOps,boost::uint32_t>, public ParserBase { template @@ -248,7 +248,7 @@ namespace senf { template struct Parse_IntField - : public impl::ParseIntOps,boost::int32_t>, + : public impl::ParseIntOps,boost::int32_t>, public ParserBase { template @@ -264,7 +264,7 @@ namespace senf { typedef boost::int32_t value_type; - value_type value() const { + value_type value() const { value_type v (impl::parse_bitfield::parse(this->i())); return v&boost::high_bit_mask_t::high_bit ? v | ~boost::low_bits_mask_t::sig_bits : v; @@ -282,7 +282,7 @@ namespace senf { template struct Parse_UIntField - : public impl::ParseIntOps,boost::uint32_t>, + : public impl::ParseIntOps,boost::uint32_t>, public ParserBase { template @@ -312,7 +312,7 @@ namespace senf { template struct Parse_Flag - : public impl::ParseIntOps,bool>, + : public impl::ParseIntOps,bool>, public ParserBase { template @@ -329,7 +329,7 @@ namespace senf { typedef bool value_type; value_type value() const { return this->i()[bit/8] & (1<<(7-(bit%8))); } - void value(value_type v) { + void value(value_type v) { if (v) this->i()[0] |= 1<<(7-(bit%8)); else this->i()[0] &= ~(1<<(7-(bit%8))); } @@ -350,5 +350,8 @@ namespace senf { // Local Variables: // mode: c++ +// fill-column: 100 // c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: