SWC-DB  v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
SWC::Core::BufferStreamOut Class Reference

#include <swcdb/core/BufferStream.h>

+ Inheritance diagram for SWC::Core::BufferStreamOut:
+ Collaboration diagram for SWC::Core::BufferStreamOut:

Public Member Functions

SWC_CAN_INLINE BufferStreamOut (size_t a_pre_alloc=12582912, size_t a_commit_size=8388608) noexcept
 
 BufferStreamOut (BufferStreamOut &&)=delete
 
 BufferStreamOut (const BufferStreamOut &)=delete
 
BufferStreamOutoperator= (const BufferStreamOut &)=delete
 
BufferStreamOutoperator= (BufferStreamOut &&)=delete
 
virtual ~BufferStreamOut () noexcept
 
virtual bool SWC_PURE_FUNC empty () const
 
virtual bool SWC_PURE_FUNC full () const
 
virtual size_t SWC_PURE_FUNC available ()
 
virtual void add (const uint8_t *ptr, size_t len)
 
virtual void get (StaticBuffer &output)
 

Public Attributes

int error
 

Protected Attributes

size_t pre_alloc
 
size_t commit_size
 
DynamicBuffer buffer
 

Detailed Description

Definition at line 22 of file BufferStream.h.

Constructor & Destructor Documentation

◆ BufferStreamOut() [1/3]

SWC_CAN_INLINE SWC::Core::BufferStreamOut::BufferStreamOut ( size_t  a_pre_alloc = 12582912,
size_t  a_commit_size = 8388608 
)
inlinenoexcept

Definition at line 27 of file BufferStream.h.

◆ BufferStreamOut() [2/3]

SWC::Core::BufferStreamOut::BufferStreamOut ( BufferStreamOut &&  )
delete

◆ BufferStreamOut() [3/3]

SWC::Core::BufferStreamOut::BufferStreamOut ( const BufferStreamOut )
delete

◆ ~BufferStreamOut()

virtual SWC::Core::BufferStreamOut::~BufferStreamOut ( )
inlinevirtualnoexcept

Definition at line 43 of file BufferStream.h.

Member Function Documentation

◆ add()

void SWC::Core::BufferStreamOut::add ( const uint8_t *  ptr,
size_t  len 
)
virtual

Reimplemented in SWC::Core::BufferStreamOut_ZSTD_OnAdd.

Definition at line 28 of file BufferStream.cc.

References SWC::Core::BufferDyn< BufferT >::add(), and buffer.

Referenced by SWC::Core::BufferStreamOut_ZSTD_OnAdd::add(), and SWC::Core::BufferStreamOut_ZSTD_OnAdd::get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ available()

size_t SWC::Core::BufferStreamOut::available ( )
virtual

Reimplemented in SWC::Core::BufferStreamOut_ZSTD_OnAdd.

Definition at line 24 of file BufferStream.cc.

References buffer, and SWC::Core::BufferDyn< BufferT >::fill().

Referenced by SWC::Core::BufferStreamOut_ZSTD_OnAdd::available().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ empty()

bool SWC::Core::BufferStreamOut::empty ( ) const
virtual

Reimplemented in SWC::Core::BufferStreamOut_ZSTD_OnAdd.

Definition at line 16 of file BufferStream.cc.

References buffer, and SWC::Core::BufferDyn< BufferT >::fill().

Referenced by SWC::Core::BufferStreamOut_ZSTD_OnAdd::empty().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ full()

bool SWC::Core::BufferStreamOut::full ( ) const
virtual

Reimplemented in SWC::Core::BufferStreamOut_ZSTD_OnAdd.

Definition at line 20 of file BufferStream.cc.

References buffer, commit_size, and SWC::Core::BufferDyn< BufferT >::fill().

+ Here is the call graph for this function:

◆ get()

void SWC::Core::BufferStreamOut::get ( StaticBuffer output)
virtual

Reimplemented in SWC::Core::BufferStreamOut_ENCODER, SWC::Core::BufferStreamOut_ZSTD, and SWC::Core::BufferStreamOut_ZSTD_OnAdd.

Definition at line 32 of file BufferStream.cc.

References buffer, SWC::Core::BufferDyn< BufferT >::ensure(), pre_alloc, and SWC::Core::Buffer< T >::set().

Referenced by SWC::Core::BufferStreamOut_ZSTD_OnAdd::get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=() [1/2]

BufferStreamOut& SWC::Core::BufferStreamOut::operator= ( BufferStreamOut &&  )
delete

◆ operator=() [2/2]

BufferStreamOut& SWC::Core::BufferStreamOut::operator= ( const BufferStreamOut )
delete

Member Data Documentation

◆ buffer

DynamicBuffer SWC::Core::BufferStreamOut::buffer
protected

◆ commit_size

size_t SWC::Core::BufferStreamOut::commit_size
protected

Definition at line 57 of file BufferStream.h.

Referenced by full(), and SWC::Core::BufferStreamOut_ZSTD_OnAdd::full().

◆ error

◆ pre_alloc

size_t SWC::Core::BufferStreamOut::pre_alloc
protected

Definition at line 56 of file BufferStream.h.

Referenced by get().


The documentation for this class was generated from the following files: