CUBRID Engine  latest
string_buffer Class Reference

#include <string_buffer.hpp>

Collaboration diagram for string_buffer:
Collaboration graph

Public Member Functions

 string_buffer ()
 
 ~string_buffer ()
 
 string_buffer (const cubmem::block_allocator &alloc)
 
 string_buffer (const cubmem::block_allocator &alloc, size_t initial_size)
 
const char * get_buffer () const
 
void clear ()
 
size_t len () const
 
char * release_ptr ()
 
void operator+= (const char ch)
 
void add_bytes (size_t len, const char *bytes)
 
template<typename... Args>
int operator() (Args &&...args)
 
void hex_dump (const string_buffer &in, const size_t max_to_dump, const size_t line_size=16, const bool print_ascii=true)
 
void hex_dump (const char *ptr, const size_t length, const size_t line_size=16, const bool print_ascii=true)
 

Private Member Functions

 string_buffer (const string_buffer &)=delete
 
 string_buffer (string_buffer &&)=delete
 
void operator= (const string_buffer &)=delete
 
void operator= (string_buffer &&)=delete
 

Private Attributes

size_t m_len
 
cubmem::extensible_block m_ext_block
 

Detailed Description

Definition at line 46 of file string_buffer.hpp.

Constructor & Destructor Documentation

string_buffer::string_buffer ( )
inline

Definition at line 49 of file string_buffer.hpp.

Referenced by release_ptr().

Here is the caller graph for this function:

string_buffer::~string_buffer ( )
inline

Definition at line 55 of file string_buffer.hpp.

References m_len.

string_buffer::string_buffer ( const cubmem::block_allocator alloc)
inline

Definition at line 60 of file string_buffer.hpp.

References m_ext_block.

string_buffer::string_buffer ( const cubmem::block_allocator alloc,
size_t  initial_size 
)
inline
string_buffer::string_buffer ( const string_buffer )
privatedelete
string_buffer::string_buffer ( string_buffer &&  )
privatedelete

Member Function Documentation

void string_buffer::add_bytes ( size_t  len,
const char *  bytes 
)
void string_buffer::hex_dump ( const string_buffer in,
const size_t  max_to_dump,
const size_t  line_size = 16,
const bool  print_ascii = true 
)

Definition at line 46 of file string_buffer.cpp.

References get_buffer(), len(), and min.

Referenced by release_ptr().

Here is the caller graph for this function:

void string_buffer::hex_dump ( const char *  ptr,
const size_t  length,
const size_t  line_size = 16,
const bool  print_ascii = true 
)

Definition at line 56 of file string_buffer.cpp.

References i, and operator()().

template<typename... Args>
int string_buffer::operator() ( Args &&...  args)
inline

Definition at line 138 of file string_buffer.hpp.

References assert, cubmem::extensible_block::extend_to(), cubmem::extensible_block::get_ptr(), cubmem::extensible_block::get_size(), len(), m_ext_block, m_len, and NULL.

Referenced by hex_dump(), and release_ptr().

Here is the caller graph for this function:

void string_buffer::operator+= ( const char  ch)
inline

Definition at line 120 of file string_buffer.hpp.

References assert, cubmem::extensible_block::extend_to(), cubmem::extensible_block::get_ptr(), cubmem::extensible_block::get_size(), m_ext_block, and m_len.

Referenced by release_ptr().

Here is the caller graph for this function:

void string_buffer::operator= ( const string_buffer )
privatedelete

Referenced by release_ptr().

Here is the caller graph for this function:

void string_buffer::operator= ( string_buffer &&  )
privatedelete
char* string_buffer::release_ptr ( )
inline

Member Data Documentation

cubmem::extensible_block string_buffer::m_ext_block
private
size_t string_buffer::m_len
private

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