NCBI C++ ToolKit
Public Member Functions | Protected Attributes | List of all members
bm::byte_buffer_ptr Class Reference

Search Toolkit Book for bm::byte_buffer_ptr

Byte buffer pointer. More...

#include <util/bitset/bmbuffer.h>

+ Inheritance diagram for bm::byte_buffer_ptr:
+ Collaboration diagram for bm::byte_buffer_ptr:

Public Member Functions

 byte_buffer_ptr () noexcept
 
 byte_buffer_ptr (unsigned char *in_buf, size_t in_size) noexcept
 construct byte buffer pointer More...
 
void set_buf (unsigned char *in_buf, size_t in_size) noexcept
 Set buffer pointer. More...
 
size_t size () const noexcept
 Get buffer size. More...
 
const unsigned char * buf () const noexcept
 Get read access to buffer memory. More...
 
unsigned char * data () noexcept
 Get write access to buffer memory. More...
 
const unsigned char * data () const noexcept
 const access to buffer memory More...
 
bool operator== (const byte_buffer_ptr &lhs) const noexcept
 
bool equal (const byte_buffer_ptr &lhs) const noexcept
 return true if content and size is the same More...
 

Protected Attributes

unsigned char * byte_buf_
 byte buffer pointer to hold data More...
 
size_t size_
 current buffer size More...
 

Detailed Description

Byte buffer pointer.

Definition at line 34 of file bmbuffer.h.

Constructor & Destructor Documentation

◆ byte_buffer_ptr() [1/2]

bm::byte_buffer_ptr::byte_buffer_ptr ( )
inlinenoexcept

Definition at line 37 of file bmbuffer.h.

◆ byte_buffer_ptr() [2/2]

bm::byte_buffer_ptr::byte_buffer_ptr ( unsigned char *  in_buf,
size_t  in_size 
)
inlinenoexcept

construct byte buffer pointer

Definition at line 43 of file bmbuffer.h.

Member Function Documentation

◆ buf()

const unsigned char* bm::byte_buffer_ptr::buf ( ) const
inlinenoexcept

◆ data() [1/2]

const unsigned char* bm::byte_buffer_ptr::data ( void  ) const
inlinenoexcept

const access to buffer memory

Definition at line 63 of file bmbuffer.h.

References byte_buf_.

◆ data() [2/2]

unsigned char* bm::byte_buffer_ptr::data ( void  )
inlinenoexcept

◆ equal()

bool bm::byte_buffer_ptr::equal ( const byte_buffer_ptr lhs) const
inlinenoexcept

return true if content and size is the same

Definition at line 69 of file bmbuffer.h.

References byte_buf_, and size_.

Referenced by operator==().

◆ operator==()

bool bm::byte_buffer_ptr::operator== ( const byte_buffer_ptr lhs) const
inlinenoexcept

Definition at line 65 of file bmbuffer.h.

References equal().

◆ set_buf()

void bm::byte_buffer_ptr::set_buf ( unsigned char *  in_buf,
size_t  in_size 
)
inlinenoexcept

Set buffer pointer.

Definition at line 48 of file bmbuffer.h.

References byte_buf_, and size_.

◆ size()

size_t bm::byte_buffer_ptr::size ( void  ) const
inlinenoexcept

Member Data Documentation

◆ byte_buf_

unsigned char* bm::byte_buffer_ptr::byte_buf_
protected

◆ size_

size_t bm::byte_buffer_ptr::size_
protected

The documentation for this class was generated from the following file:
Modified on Mon May 27 04:38:13 2024 by modify_doxy.py rev. 669887