v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::base::RingBuffer< T, _SIZE > Class Template Referencefinal

#include <ring-buffer.h>

Collaboration diagram for v8::base::RingBuffer< T, _SIZE >:

Public Member Functions

constexpr RingBuffer ()=default
 
 RingBuffer (const RingBuffer &)=delete
 
RingBufferoperator= (const RingBuffer &)=delete
 
constexpr void Push (const T &value)
 
constexpr uint8_t Size () const
 
constexpr bool Empty () const
 
constexpr void Clear ()
 
template<typename Callback >
constexpr T Reduce (Callback callback, const T &initial) const
 

Static Public Attributes

static constexpr uint8_t kSize = _SIZE
 

Private Attributes

T elements_ [kSize]
 
uint8_t pos_ = 0
 
bool is_full_ = false
 

Detailed Description

template<typename T, uint8_t _SIZE = 10>
class v8::base::RingBuffer< T, _SIZE >

Definition at line 13 of file ring-buffer.h.

Constructor & Destructor Documentation

◆ RingBuffer() [1/2]

template<typename T , uint8_t _SIZE = 10>
v8::base::RingBuffer< T, _SIZE >::RingBuffer ( )
constexprdefault

◆ RingBuffer() [2/2]

template<typename T , uint8_t _SIZE = 10>
v8::base::RingBuffer< T, _SIZE >::RingBuffer ( const RingBuffer< T, _SIZE > & )
delete

Member Function Documentation

◆ Clear()

template<typename T , uint8_t _SIZE = 10>
void v8::base::RingBuffer< T, _SIZE >::Clear ( )
inlineconstexpr

Definition at line 34 of file ring-buffer.h.

Here is the caller graph for this function:

◆ Empty()

template<typename T , uint8_t _SIZE = 10>
bool v8::base::RingBuffer< T, _SIZE >::Empty ( ) const
inlineconstexpr

Definition at line 32 of file ring-buffer.h.

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

◆ operator=()

template<typename T , uint8_t _SIZE = 10>
RingBuffer & v8::base::RingBuffer< T, _SIZE >::operator= ( const RingBuffer< T, _SIZE > & )
delete

◆ Push()

template<typename T , uint8_t _SIZE = 10>
void v8::base::RingBuffer< T, _SIZE >::Push ( const T & value)
inlineconstexpr

Definition at line 22 of file ring-buffer.h.

Here is the caller graph for this function:

◆ Reduce()

template<typename T , uint8_t _SIZE = 10>
template<typename Callback >
T v8::base::RingBuffer< T, _SIZE >::Reduce ( Callback callback,
const T & initial ) const
inlineconstexpr

Definition at line 40 of file ring-buffer.h.

Here is the caller graph for this function:

◆ Size()

template<typename T , uint8_t _SIZE = 10>
uint8_t v8::base::RingBuffer< T, _SIZE >::Size ( ) const
inlineconstexpr

Definition at line 30 of file ring-buffer.h.

Here is the caller graph for this function:

Member Data Documentation

◆ elements_

template<typename T , uint8_t _SIZE = 10>
T v8::base::RingBuffer< T, _SIZE >::elements_[kSize]
private

Definition at line 55 of file ring-buffer.h.

◆ is_full_

template<typename T , uint8_t _SIZE = 10>
bool v8::base::RingBuffer< T, _SIZE >::is_full_ = false
private

Definition at line 57 of file ring-buffer.h.

◆ kSize

template<typename T , uint8_t _SIZE = 10>
uint8_t v8::base::RingBuffer< T, _SIZE >::kSize = _SIZE
staticconstexpr

Definition at line 15 of file ring-buffer.h.

◆ pos_

template<typename T , uint8_t _SIZE = 10>
uint8_t v8::base::RingBuffer< T, _SIZE >::pos_ = 0
private

Definition at line 56 of file ring-buffer.h.


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