ESP8266
Public Member Functions | Private Member Functions | Private Attributes | List of all members
cbuf Class Reference

Public Member Functions

 cbuf (size_t size)
 
 ~cbuf ()
 
size_t getSize () const
 
size_t room () const
 
bool empty () const
 
int peek ()
 
int read ()
 
size_t read (char *dst, size_t size)
 
size_t write (char c)
 
size_t write (const char *src, size_t size)
 
void flush ()
 

Private Member Functions

char * wrap_if_bufend (char *ptr)
 

Private Attributes

const size_t _size
 
char * _buf
 
const char *const _bufend
 
char * _begin
 
char * _end
 

Constructor & Destructor Documentation

cbuf::cbuf ( size_t  size)
cbuf::~cbuf ( )

Member Function Documentation

bool cbuf::empty ( ) const
void cbuf::flush ( void  )
size_t cbuf::getSize ( void  ) const
int cbuf::peek ( void  )
int cbuf::read ( void  )
size_t cbuf::read ( char *  dst,
size_t  size 
)
size_t cbuf::room ( ) const
char* cbuf::wrap_if_bufend ( char *  ptr)
private
size_t cbuf::write ( char  c)
size_t cbuf::write ( const char *  src,
size_t  size 
)

Member Data Documentation

char* cbuf::_begin
private
char* cbuf::_buf
private
const char* const cbuf::_bufend
private
char* cbuf::_end
private
const size_t cbuf::_size
private