Otclient  14/8/2020
DataBuffer< T > Class Template Reference

#include <databuffer.h>

Public Member Functions

 DataBuffer (uint res=64)
 
 ~DataBuffer ()
 
void reset ()
 
void clear ()
 
bool empty () const
 
uint size () const
 
T * data () const
 
const T & at (uint i) const
 
const T & last () const
 
const T & first () const
 
const T & operator[] (uint i) const
 
T & operator[] (uint i)
 
void reserve (uint n)
 
void resize (uint n, T def=T())
 
void grow (uint n)
 
void add (const T &v)
 
DataBufferoperator<< (const T &t)
 

Detailed Description

template<class T>
class DataBuffer< T >

Definition at line 27 of file databuffer.h.

Constructor & Destructor Documentation

◆ DataBuffer()

template<class T >
DataBuffer< T >::DataBuffer ( uint  res = 64)
inline

Definition at line 30 of file databuffer.h.

◆ ~DataBuffer()

template<class T >
DataBuffer< T >::~DataBuffer ( )
inline

Definition at line 34 of file databuffer.h.

Member Function Documentation

◆ add()

template<class T >
void DataBuffer< T >::add ( const T &  v)
inline

Definition at line 88 of file databuffer.h.

Here is the caller graph for this function:

◆ at()

template<class T >
const T& DataBuffer< T >::at ( uint  i) const
inline

Definition at line 50 of file databuffer.h.

◆ clear()

template<class T >
void DataBuffer< T >::clear ( )
inline

Definition at line 39 of file databuffer.h.

Here is the caller graph for this function:

◆ data()

template<class T >
T* DataBuffer< T >::data ( ) const
inline

Definition at line 48 of file databuffer.h.

Here is the caller graph for this function:

◆ empty()

template<class T >
bool DataBuffer< T >::empty ( ) const
inline

Definition at line 46 of file databuffer.h.

◆ first()

template<class T >
const T& DataBuffer< T >::first ( ) const
inline

Definition at line 52 of file databuffer.h.

◆ grow()

template<class T >
void DataBuffer< T >::grow ( uint  n)
inline

Definition at line 77 of file databuffer.h.

Here is the caller graph for this function:

◆ last()

template<class T >
const T& DataBuffer< T >::last ( ) const
inline

Definition at line 51 of file databuffer.h.

◆ operator<<()

template<class T >
DataBuffer& DataBuffer< T >::operator<< ( const T &  t)
inline

Definition at line 93 of file databuffer.h.

◆ operator[]() [1/2]

template<class T >
T& DataBuffer< T >::operator[] ( uint  i)
inline

Definition at line 54 of file databuffer.h.

◆ operator[]() [2/2]

template<class T >
const T& DataBuffer< T >::operator[] ( uint  i) const
inline

Definition at line 53 of file databuffer.h.

◆ reserve()

template<class T >
void DataBuffer< T >::reserve ( uint  n)
inline

Definition at line 56 of file databuffer.h.

Here is the caller graph for this function:

◆ reset()

template<class T >
void DataBuffer< T >::reset ( )
inline

Definition at line 38 of file databuffer.h.

Here is the caller graph for this function:

◆ resize()

template<class T >
void DataBuffer< T >::resize ( uint  n,
def = T() 
)
inline

Definition at line 68 of file databuffer.h.

Here is the caller graph for this function:

◆ size()

template<class T >
uint DataBuffer< T >::size ( ) const
inline

Definition at line 47 of file databuffer.h.

Here is the caller graph for this function:

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