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::Comm::BufferInfo Struct Referencefinal

#include <swcdb/core/comm/HeaderBufferInfo.h>

Public Member Functions

SWC_CAN_INLINE BufferInfo () noexcept
 
SWC_CAN_INLINE void reset () noexcept
 
SWC_CAN_INLINE uint8_t encoded_length () const noexcept
 
SWC_CAN_INLINE void encode (uint8_t **bufp) const
 
SWC_CAN_INLINE void decode (const uint8_t **bufp, size_t *remainp)
 
void encode (Core::Encoder::Type encoder, StaticBuffer &data)
 
void decode (int &err, StaticBuffer &data) const
 
void print (std::ostream &out) const
 

Public Attributes

uint32_t size
 Buffer size. More...
 
uint32_t size_plain
 Buffer set if Encoder not PLAIN. More...
 
uint32_t chksum
 Buffer checksum. More...
 
Core::Encoder::Type encoder
 Buffer Encoder. More...
 

Detailed Description

Definition at line 19 of file HeaderBufferInfo.h.

Constructor & Destructor Documentation

◆ BufferInfo()

SWC_CAN_INLINE SWC::Comm::BufferInfo::BufferInfo ( )
inlinenoexcept

Definition at line 22 of file HeaderBufferInfo.h.

Member Function Documentation

◆ decode() [1/2]

SWC_CAN_INLINE void SWC::Comm::BufferInfo::decode ( const uint8_t **  bufp,
size_t *  remainp 
)
inline

Definition at line 53 of file HeaderBufferInfo.h.

References chksum, SWC::Serialization::decode_i32(), SWC::Serialization::decode_i8(), SWC::Serialization::decode_vi32(), encoder, size, and size_plain.

Referenced by SWC::Comm::Header::decode(), and SWC::Comm::Event::decode_buffers().

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

◆ decode() [2/2]

void SWC::Comm::BufferInfo::decode ( int &  err,
StaticBuffer data 
) const

Definition at line 35 of file HeaderBufferInfo.cc.

References SWC::Core::Buffer< T >::base, data, SWC::Core::Encoder::decode(), encoder, and size_plain.

+ Here is the call graph for this function:

◆ encode() [1/2]

void SWC::Comm::BufferInfo::encode ( Core::Encoder::Type  encoder,
StaticBuffer data 
)

Definition at line 14 of file HeaderBufferInfo.cc.

References SWC::Core::checksum32(), chksum, data, SWC::Core::Encoder::encode(), encoder, SWC::Error::OK, size, and size_plain.

+ Here is the call graph for this function:

◆ encode() [2/2]

SWC_CAN_INLINE void SWC::Comm::BufferInfo::encode ( uint8_t **  bufp) const
inline

Definition at line 44 of file HeaderBufferInfo.h.

Referenced by SWC::Comm::Header::encode(), and SWC::Comm::Buffers::prepare().

+ Here is the caller graph for this function:

◆ encoded_length()

SWC_CAN_INLINE uint8_t SWC::Comm::BufferInfo::encoded_length ( ) const
inlinenoexcept

Definition at line 36 of file HeaderBufferInfo.h.

References SWC::Serialization::encoded_length_vi32(), encoder, size, and size_plain.

Referenced by SWC::Comm::Header::encoded_length().

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

◆ print()

void SWC::Comm::BufferInfo::print ( std::ostream &  out) const

Definition at line 48 of file HeaderBufferInfo.cc.

References chksum, encoder, size, size_plain, and SWC::Core::Encoder::to_string().

Referenced by SWC::Comm::Header::print().

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

◆ reset()

SWC_CAN_INLINE void SWC::Comm::BufferInfo::reset ( )
inlinenoexcept

Definition at line 30 of file HeaderBufferInfo.h.

References chksum, encoder, size, and size_plain.

Referenced by SWC::Comm::Header::initialize_from_request(), SWC::Comm::Header::initialize_from_response(), SWC::Comm::Header::reset(), and SWC::Comm::Buffers::set_data().

+ Here is the caller graph for this function:

Member Data Documentation

◆ chksum

uint32_t SWC::Comm::BufferInfo::chksum

Buffer checksum.

Definition at line 69 of file HeaderBufferInfo.h.

Referenced by decode(), encode(), print(), and reset().

◆ encoder

Core::Encoder::Type SWC::Comm::BufferInfo::encoder

Buffer Encoder.

Definition at line 70 of file HeaderBufferInfo.h.

Referenced by decode(), encode(), encoded_length(), print(), and reset().

◆ size

uint32_t SWC::Comm::BufferInfo::size

◆ size_plain

uint32_t SWC::Comm::BufferInfo::size_plain

Buffer set if Encoder not PLAIN.

Definition at line 68 of file HeaderBufferInfo.h.

Referenced by decode(), encode(), encoded_length(), print(), and reset().


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