X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Packets%2FParseInt.hh;h=3f35b933c36591a9dc909ac7d368a28acb045fd2;hb=5d62f84a80b2c72cc0aa5cabc3ddad752e87fcc8;hp=1207eafe915550dd31c3c3125e71d1698ce5583f;hpb=c52cd7d87dbb525c1267aad27391b8b7365dbb57;p=senf.git diff --git a/Packets/ParseInt.hh b/Packets/ParseInt.hh index 1207eaf..3f35b93 100644 --- a/Packets/ParseInt.hh +++ b/Packets/ParseInt.hh @@ -24,6 +24,7 @@ #define HH_ParseInt_ 1 // Custom includes +#include #include "ParserBase.hh" #include #include @@ -33,8 +34,8 @@ ///////////////////////////////hh.p//////////////////////////////////////// #include "ParseInt.ih" -namespace satcom { -namespace pkf { +namespace senf { + template struct Parse_Int8 @@ -58,6 +59,9 @@ namespace pkf { void value(value_type v) { this->i()[0] = v; } Parse_Int8 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_Int8 const & i) + { os << i.value(); return os; } template struct Parse_UInt8 @@ -81,6 +85,9 @@ namespace pkf { void value(value_type v) { this->i()[0] = v; } Parse_UInt8 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_UInt8 const & i) + { os << i.value(); return os; } template struct Parse_Int16 @@ -104,6 +111,9 @@ namespace pkf { void value(value_type v) { impl::write_uint16(this->i(),v); } Parse_Int16 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_Int16 const & i) + { os << i.value(); return os; } template struct Parse_UInt16 @@ -127,6 +137,9 @@ namespace pkf { void value(value_type v) { impl::write_uint16(this->i(),v); } Parse_UInt16 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_UInt16 const & i) + { os << i.value(); return os; } template struct Parse_Int24 @@ -151,6 +164,9 @@ namespace pkf { void value(value_type v) { impl::write_uint24(this->i(),v); } Parse_Int24 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_Int24 const & i) + { os << i.value(); return os; } template struct Parse_UInt24 @@ -174,6 +190,9 @@ namespace pkf { void value(value_type v) { impl::write_uint24(this->i(),v); } Parse_UInt24 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_UInt24 const & i) + { os << i.value(); return os; } template struct Parse_Int32 @@ -197,6 +216,9 @@ namespace pkf { void value(value_type v) { impl::write_uint32(this->i(),v); } Parse_Int32 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_Int32 const & i) + { os << i.value(); return os; } template struct Parse_UInt32 @@ -220,6 +242,9 @@ namespace pkf { void value(value_type v) { impl::write_uint32(this->i(),v); } Parse_UInt32 const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_UInt32 const & i) + { os << i.value(); return os; } template struct Parse_IntField @@ -251,6 +276,9 @@ namespace pkf { BOOST_STATIC_ASSERT( start + std::ostream & operator<<(std::ostream & os, Parse_IntField const & i) + { os << i.value(); return os; } template struct Parse_UIntField @@ -278,6 +306,9 @@ namespace pkf { BOOST_STATIC_ASSERT( start + std::ostream & operator<<(std::ostream & os, Parse_UIntField const & i) + { os << i.value(); return os; } template struct Parse_Flag @@ -304,8 +335,11 @@ namespace pkf { } Parse_Flag const & operator= (value_type other) { value(other); return *this; } }; + template + std::ostream & operator<<(std::ostream & os, Parse_Flag const & i) + { os << i.value(); return os; } -}} +} ///////////////////////////////hh.e//////////////////////////////////////// //#include "ParseInt.cci" @@ -316,5 +350,5 @@ namespace pkf { // Local Variables: // mode: c++ -// c-file-style: "satcom" +// c-file-style: "senf" // End: