µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::posix::circular_buffer< T > Class Template Reference

Circular buffer class template. More...

#include <cmsis-plus/posix-driver/circular-buffer.h>

Public Types

using value_type = T
 Standard type definition.
 

Public Member Functions

Constructors & Destructor
 circular_buffer (const value_type *buf, std::size_t size, std::size_t high_water_mark, std::size_t low_water_mark=0)
 
 circular_buffer (const value_type *buf, std::size_t size)
 
 ~circular_buffer ()
 
Public Member Functions
void clear (void)
 
const value_typeoperator[] (std::size_t idx) const
 
std::size_t push_back (value_type v)
 
std::size_t push_back (const value_type *buf, std::size_t count)
 
std::size_t advance_back (std::size_t count)
 
void retreat_back (void)
 
std::size_t pop_front (value_type *buf)
 
std::size_t pop_front (value_type *buf, std::size_t size)
 
std::size_t advance_front (std::size_t count)
 
std::size_t front_contiguous_buffer (value_type **ppbuf)
 
std::size_t back_contiguous_buffer (value_type **ppbuf)
 
bool empty (void) const
 
bool full (void) const
 
bool above_high_water_mark (void) const
 
bool below_high_water_mark (void) const
 
bool above_low_water_mark (void) const
 
bool below_low_water_mark (void) const
 
std::size_t length (void) const
 
std::size_t size (void) const
 
void dump (void)
 

Detailed Description

template<typename T>
class os::posix::circular_buffer< T >

Circular buffer class template.

Definition at line 37 of file circular-buffer.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using os::posix::circular_buffer< T >::value_type = T

Standard type definition.

Definition at line 46 of file circular-buffer.h.

Constructor & Destructor Documentation

◆ circular_buffer() [1/2]

template<typename T >
os::posix::circular_buffer< T >::circular_buffer ( const value_type buf,
std::size_t  size,
std::size_t  high_water_mark,
std::size_t  low_water_mark = 0 
)

Definition at line 211 of file circular-buffer.h.

◆ circular_buffer() [2/2]

template<typename T >
os::posix::circular_buffer< T >::circular_buffer ( const value_type buf,
std::size_t  size 
)

Definition at line 226 of file circular-buffer.h.

◆ ~circular_buffer()

template<typename T >
os::posix::circular_buffer< T >::~circular_buffer

Definition at line 235 of file circular-buffer.h.

Member Function Documentation

◆ above_high_water_mark()

template<typename T >
bool os::posix::circular_buffer< T >::above_high_water_mark ( void  ) const
inline

Definition at line 277 of file circular-buffer.h.

◆ above_low_water_mark()

template<typename T >
bool os::posix::circular_buffer< T >::above_low_water_mark ( void  ) const
inline

Definition at line 300 of file circular-buffer.h.

◆ advance_back()

template<typename T >
std::size_t os::posix::circular_buffer< T >::advance_back ( std::size_t  count)

Definition at line 383 of file circular-buffer.h.

◆ advance_front()

template<typename T >
std::size_t os::posix::circular_buffer< T >::advance_front ( std::size_t  count)

Definition at line 484 of file circular-buffer.h.

◆ back_contiguous_buffer()

template<typename T >
std::size_t os::posix::circular_buffer< T >::back_contiguous_buffer ( value_type **  ppbuf)

Definition at line 529 of file circular-buffer.h.

◆ below_high_water_mark()

template<typename T >
bool os::posix::circular_buffer< T >::below_high_water_mark ( void  ) const
inline

Definition at line 293 of file circular-buffer.h.

◆ below_low_water_mark()

template<typename T >
bool os::posix::circular_buffer< T >::below_low_water_mark ( void  ) const
inline

Definition at line 285 of file circular-buffer.h.

◆ clear()

template<typename T >
void os::posix::circular_buffer< T >::clear ( void  )

Definition at line 244 of file circular-buffer.h.

◆ dump()

template<typename T >
void os::posix::circular_buffer< T >::dump ( void  )

Definition at line 547 of file circular-buffer.h.

◆ empty()

template<typename T >
bool os::posix::circular_buffer< T >::empty ( void  ) const
inline

Definition at line 263 of file circular-buffer.h.

◆ front_contiguous_buffer()

template<typename T >
std::size_t os::posix::circular_buffer< T >::front_contiguous_buffer ( value_type **  ppbuf)

Definition at line 510 of file circular-buffer.h.

◆ full()

template<typename T >
bool os::posix::circular_buffer< T >::full ( void  ) const
inline

Definition at line 270 of file circular-buffer.h.

◆ length()

template<typename T >
std::size_t os::posix::circular_buffer< T >::length ( void  ) const
inline

Definition at line 307 of file circular-buffer.h.

◆ operator[]()

template<typename T >
const circular_buffer< T >::value_type & os::posix::circular_buffer< T >::operator[] ( std::size_t  idx) const
inline

Definition at line 256 of file circular-buffer.h.

◆ pop_front() [1/2]

template<typename T >
std::size_t os::posix::circular_buffer< T >::pop_front ( value_type buf)

Definition at line 425 of file circular-buffer.h.

◆ pop_front() [2/2]

template<typename T >
std::size_t os::posix::circular_buffer< T >::pop_front ( value_type buf,
std::size_t  size 
)

Definition at line 449 of file circular-buffer.h.

◆ push_back() [1/2]

template<typename T >
std::size_t os::posix::circular_buffer< T >::push_back ( const value_type buf,
std::size_t  count 
)

Definition at line 342 of file circular-buffer.h.

◆ push_back() [2/2]

template<typename T >
std::size_t os::posix::circular_buffer< T >::push_back ( value_type  v)

Definition at line 321 of file circular-buffer.h.

◆ retreat_back()

template<typename T >
void os::posix::circular_buffer< T >::retreat_back ( void  )

Definition at line 409 of file circular-buffer.h.

◆ size()

template<typename T >
std::size_t os::posix::circular_buffer< T >::size ( void  ) const
inline

Definition at line 314 of file circular-buffer.h.


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