#define HH_ParseInt_ 1
// Custom includes
+#include <iostream>
#include "ParserBase.hh"
#include <boost/cstdint.hpp>
#include <boost/static_assert.hpp>
///////////////////////////////hh.p////////////////////////////////////////
#include "ParseInt.ih"
-namespace satcom {
-namespace pkf {
+namespace senf {
+
template <class Iterator=nil, class IPacket=nil>
struct Parse_Int8
void value(value_type v) { this->i()[0] = v; }
Parse_Int8 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_Int8<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_UInt8
void value(value_type v) { this->i()[0] = v; }
Parse_UInt8 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_UInt8<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_Int16
void value(value_type v) { impl::write_uint16(this->i(),v); }
Parse_Int16 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_Int16<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_UInt16
void value(value_type v) { impl::write_uint16(this->i(),v); }
Parse_UInt16 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_UInt16<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_Int24
void value(value_type v) { impl::write_uint24(this->i(),v); }
Parse_Int24 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_Int24<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_UInt24
void value(value_type v) { impl::write_uint24(this->i(),v); }
Parse_UInt24 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_UInt24<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_Int32
void value(value_type v) { impl::write_uint32(this->i(),v); }
Parse_Int32 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_Int32<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <class Iterator=nil, class IPacket=nil>
struct Parse_UInt32
void value(value_type v) { impl::write_uint32(this->i(),v); }
Parse_UInt32 const & operator= (value_type other) { value(other); return *this; }
};
+ template <class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_UInt32<Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <unsigned start, unsigned end, class Iterator=nil, class IPacket=nil>
struct Parse_IntField
BOOST_STATIC_ASSERT( start<end );
BOOST_STATIC_ASSERT( end-start<=32 );
};
+ template <unsigned start, unsigned end, class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_IntField<start,end,Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <unsigned start, unsigned end, class Iterator=nil, class IPacket=nil>
struct Parse_UIntField
BOOST_STATIC_ASSERT( start<end );
BOOST_STATIC_ASSERT( end-start<=32 );
};
+ template <unsigned start, unsigned end, class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_UIntField<start,end,Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
template <unsigned bit, class Iterator=nil, class IPacket=nil>
struct Parse_Flag
}
Parse_Flag const & operator= (value_type other) { value(other); return *this; }
};
+ template <unsigned bit, class Iterator, class IPacket>
+ std::ostream & operator<<(std::ostream & os, Parse_Flag<bit,Iterator,IPacket> const & i)
+ { os << i.value(); return os; }
-}}
+}
///////////////////////////////hh.e////////////////////////////////////////
//#include "ParseInt.cci"
\f
// Local Variables:
// mode: c++
-// c-file-style: "satcom"
+// c-file-style: "senf"
// End: