Apollo  6.0
Open source self driving car software
Public Types | Public Member Functions | List of all members
apollo::cyber::data::CacheBuffer< T > Class Template Reference

#include <cache_buffer.h>

Collaboration diagram for apollo::cyber::data::CacheBuffer< T >:
Collaboration graph

Public Types

using value_type = T
 
using size_type = std::size_t
 
using FusionCallback = std::function< void(const T &)>
 

Public Member Functions

 CacheBuffer (uint64_t size)
 
 CacheBuffer (const CacheBuffer &rhs)
 
T & operator[] (const uint64_t &pos)
 
const T & at (const uint64_t &pos) const
 
uint64_t Head () const
 
uint64_t Tail () const
 
uint64_t Size () const
 
const T & Front () const
 
const T & Back () const
 
bool Empty () const
 
bool Full () const
 
uint64_t Capacity () const
 
void SetFusionCallback (const FusionCallback &callback)
 
void Fill (const T &value)
 
std::mutex & Mutex ()
 

Member Typedef Documentation

◆ FusionCallback

template<typename T >
using apollo::cyber::data::CacheBuffer< T >::FusionCallback = std::function<void(const T&)>

◆ size_type

template<typename T >
using apollo::cyber::data::CacheBuffer< T >::size_type = std::size_t

◆ value_type

template<typename T >
using apollo::cyber::data::CacheBuffer< T >::value_type = T

Constructor & Destructor Documentation

◆ CacheBuffer() [1/2]

template<typename T >
apollo::cyber::data::CacheBuffer< T >::CacheBuffer ( uint64_t  size)
inlineexplicit

◆ CacheBuffer() [2/2]

template<typename T >
apollo::cyber::data::CacheBuffer< T >::CacheBuffer ( const CacheBuffer< T > &  rhs)
inline

Member Function Documentation

◆ at()

template<typename T >
const T& apollo::cyber::data::CacheBuffer< T >::at ( const uint64_t &  pos) const
inline

◆ Back()

template<typename T >
const T& apollo::cyber::data::CacheBuffer< T >::Back ( ) const
inline

◆ Capacity()

template<typename T >
uint64_t apollo::cyber::data::CacheBuffer< T >::Capacity ( ) const
inline

◆ Empty()

template<typename T >
bool apollo::cyber::data::CacheBuffer< T >::Empty ( ) const
inline

◆ Fill()

template<typename T >
void apollo::cyber::data::CacheBuffer< T >::Fill ( const T &  value)
inline

◆ Front()

template<typename T >
const T& apollo::cyber::data::CacheBuffer< T >::Front ( ) const
inline

◆ Full()

template<typename T >
bool apollo::cyber::data::CacheBuffer< T >::Full ( ) const
inline

◆ Head()

template<typename T >
uint64_t apollo::cyber::data::CacheBuffer< T >::Head ( ) const
inline

◆ Mutex()

template<typename T >
std::mutex& apollo::cyber::data::CacheBuffer< T >::Mutex ( )
inline

◆ operator[]()

template<typename T >
T& apollo::cyber::data::CacheBuffer< T >::operator[] ( const uint64_t &  pos)
inline

◆ SetFusionCallback()

template<typename T >
void apollo::cyber::data::CacheBuffer< T >::SetFusionCallback ( const FusionCallback callback)
inline

◆ Size()

template<typename T >
uint64_t apollo::cyber::data::CacheBuffer< T >::Size ( ) const
inline

◆ Tail()

template<typename T >
uint64_t apollo::cyber::data::CacheBuffer< T >::Tail ( ) const
inline

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