remove unnecessary namespace clutter
This commit is contained in:
parent
4f268fffde
commit
20c6da9ca7
|
@ -36,9 +36,6 @@ using std::uint16_t;
|
|||
using std::uint32_t;
|
||||
using std::vector;
|
||||
using std::shared_ptr;
|
||||
using std::basic_streambuf;
|
||||
using std::streamsize;
|
||||
using std::basic_istream;
|
||||
|
||||
// 2.4.1. Flags
|
||||
// Flags is a 4-bit field containing flags L, V, H and D which declare how the PDU is packed.
|
||||
|
@ -60,7 +57,7 @@ struct pdu_data { virtual ~pdu_data() {} };
|
|||
Memory buffer of uint8_t data.
|
||||
*/
|
||||
class pdu_buffer
|
||||
: public basic_streambuf<uint8_t>
|
||||
: public std::basic_streambuf<uint8_t>
|
||||
{
|
||||
public:
|
||||
pdu_buffer(uint8_t * p, size_t l) { setg(p, p, p + l); };
|
||||
|
@ -70,17 +67,17 @@ public:
|
|||
Input stream of nested PDU
|
||||
*/
|
||||
class pdu_stream
|
||||
: public basic_istream<uint8_t>
|
||||
: public std::basic_istream<uint8_t>
|
||||
{
|
||||
public:
|
||||
pdu_stream(uint8_t * p, size_t l)
|
||||
: basic_istream<uint8_t>(&_buffer)
|
||||
: std::basic_istream<uint8_t>(&_buffer)
|
||||
, _buffer(p, l) { rdbuf(&_buffer); }
|
||||
streamsize available() { return _buffer.in_avail(); }
|
||||
uint8_t * data() { return _buffer.cur_ptr(); };
|
||||
uint8_t read8 ();
|
||||
uint16_t read16();
|
||||
uint32_t read32();
|
||||
uint32_t available() { return _buffer.in_avail(); }
|
||||
uint8_t * data() { return _buffer.cur_ptr(); };
|
||||
uint8_t read8 ();
|
||||
uint16_t read16();
|
||||
uint32_t read32();
|
||||
private:
|
||||
pdu_buffer _buffer;
|
||||
};
|
||||
|
@ -106,9 +103,9 @@ public:
|
|||
// getters
|
||||
const pdu_flags flags() {return flags_;}
|
||||
const uint32_t length() {return length_;}
|
||||
const uint32_t vector();
|
||||
pdu_header * header();
|
||||
pdu_data * data();
|
||||
const uint32_t vector(); // may inherit
|
||||
pdu_header * header(); // may inherit
|
||||
pdu_data * data(); // may inherit
|
||||
shared_ptr<Pdu> parent() {return parent_;}
|
||||
Stream buffer() {return buffer_;}
|
||||
|
||||
|
|
Loading…
Reference in New Issue