73 if (pos>0)
shift(pos);
115 if (pos>0)
shift(pos);
132 if (pos>0)
shift(pos);
Reference on memory from memory pool.
unsigned SegmentSize(unsigned n=0) const
Returns size on the segment, no any boundary checks.
BufferSize_t GetTotalSize() const
Return total size of all buffer segments.
void * SegmentPtr(unsigned n=0) const
Returns pointer on the segment, no any boundary checks.
Manipulator with dabc::Buffer class.
BufferSize_t shift(BufferSize_t sz)
Pointer(const Pointer &src, BufferSize_t pos=0, BufferSize_t fullsz=0)
void reset(void *buf, BufferSize_t sz)
BufferSize_t fRawSize
size of contiguous memory, pointed by fPtr
Pointer & operator=(const Pointer &src)
int distance_to(const Pointer &child) const
bool is_same_buf(const Pointer &ptr) const
void setfullsize(BufferSize_t sz)
unsigned char * fPtr
pointer on the raw buffer
BufferSize_t copyfrom(const Pointer &src, BufferSize_t sz=0)
Returns actual size copied.
BufferSize_t copyto_shift(Pointer &src, BufferSize_t sz)
BufferSize_t copyto(void *tgt, BufferSize_t sz) const
void operator+=(BufferSize_t sz)
Pointer(const Buffer &buf, unsigned pos=0, unsigned len=0)
int distance_to_ownbuf() const
Pointer & operator=(const Buffer &src)
BufferSize_t copyfrom_shift(const void *src, BufferSize_t sz)
void long_shift(BufferSize_t sz)
BufferSize_t fullsize() const
BufferSize_t copyfromstr(const char *str, unsigned len=0)
void reset(const Buffer &src, BufferSize_t pos=0, BufferSize_t fullsz=0)
float consumed_size() const
Returns ratio between filled size and buffer size, 0 when exmpy.
BufferSize_t rawsize() const
void reset(const Pointer &src, BufferSize_t pos=0, BufferSize_t fullsz=0)
Buffer fBuf
we keep reference on the buffer, could be only used in same thread
BufferSize_t copyto_shift(void *tgt, BufferSize_t sz)
void * operator()() const
BufferSize_t copyfrom_shift(const Pointer &src, BufferSize_t sz=0)
Returns actual size copied and shifted.
Pointer(const void *buf, BufferSize_t sz)
BufferSize_t fFullSize
full size of memory from pointer till the end
void Release()
Releases reference on the object.
bool null() const
Returns true if reference contains nullptr.