MCPcopy Create free account
hub / github.com/comaps/comaps / ArrayByteSource

Class ArrayByteSource

libs/coding/byte_stream.hpp:9–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <cstring>
8
9class ArrayByteSource
10{
11public:
12 explicit ArrayByteSource(void const * p) : m_p(static_cast<uint8_t const *>(p)) {}
13
14 uint8_t ReadByte() { return *m_p++; }
15
16 void Read(void * ptr, size_t size)
17 {
18 memcpy(ptr, m_p, size);
19 m_p += size;
20 }
21
22 void const * Ptr() const { return m_p; }
23 uint8_t const * PtrUint8() const { return m_p; }
24
25 void Advance(size_t size) { m_p += size; }
26
27private:
28 uint8_t const * m_p;
29};
30
31template <class StorageT>
32class PushBackByteSink

Callers 1

ParseHeader2Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected