Livox SDK API  V2.2.0
fmt::v5::internal::basic_buffer< T > Class Template Referenceabstract

#include <core.h>

Inheritance diagram for fmt::v5::internal::basic_buffer< T >:
fmt::v5::basic_memory_buffer< T, SIZE, Allocator >

Public Types

typedef T value_type
 
typedef const T & const_reference
 

Public Member Functions

virtual ~basic_buffer ()
 
T * begin () throw ()
 
T * end () throw ()
 
std::size_t size () const throw ()
 
std::size_t capacity () const throw ()
 
T * data () throw ()
 
const T * data () const throw ()
 
void resize (std::size_t new_size)
 
void clear ()
 
void reserve (std::size_t new_capacity)
 
void push_back (const T &value)
 
template<typename U >
void append (const U *begin, const U *end)
 
T & operator[] (std::size_t index)
 
const T & operator[] (std::size_t index) const
 

Protected Member Functions

 basic_buffer (std::size_t sz) throw ()
 
 basic_buffer (T *p=NULL, std::size_t sz=0, std::size_t cap=0) throw ()
 
void set (T *buf_data, std::size_t buf_capacity) throw ()
 
virtual void grow (std::size_t capacity)=0
 

Detailed Description

template<typename T>
class fmt::v5::internal::basic_buffer< T >

A contiguous memory buffer with an optional growing ability.

Definition at line 215 of file core.h.

Member Typedef Documentation

template<typename T>
typedef const T& fmt::v5::internal::basic_buffer< T >::const_reference

Definition at line 242 of file core.h.

template<typename T>
typedef T fmt::v5::internal::basic_buffer< T >::value_type

Definition at line 241 of file core.h.

Constructor & Destructor Documentation

template<typename T>
fmt::v5::internal::basic_buffer< T >::basic_buffer ( std::size_t  sz)
throw (
)
inlineprotected

Definition at line 226 of file core.h.

template<typename T>
fmt::v5::internal::basic_buffer< T >::basic_buffer ( T *  p = NULL,
std::size_t  sz = 0,
std::size_t  cap = 0 
)
throw (
)
inlineprotected

Definition at line 228 of file core.h.

template<typename T>
virtual fmt::v5::internal::basic_buffer< T >::~basic_buffer ( )
inlinevirtual

Definition at line 244 of file core.h.

Member Function Documentation

template<typename T >
template<typename U >
void fmt::v5::internal::basic_buffer< T >::append ( const U *  begin,
const U *  end 
)

Appends data to the end of the buffer.

Definition at line 394 of file format.h.

template<typename T>
T* fmt::v5::internal::basic_buffer< T >::begin ( )
throw (
)
inline

Definition at line 246 of file core.h.

template<typename T>
std::size_t fmt::v5::internal::basic_buffer< T >::capacity ( ) const
throw (
)
inline

Returns the capacity of this buffer.

Definition at line 253 of file core.h.

template<typename T>
void fmt::v5::internal::basic_buffer< T >::clear ( )
inline

Clears this buffer.

Definition at line 270 of file core.h.

template<typename T>
T* fmt::v5::internal::basic_buffer< T >::data ( )
throw (
)
inline

Returns a pointer to the buffer data.

Definition at line 256 of file core.h.

template<typename T>
const T* fmt::v5::internal::basic_buffer< T >::data ( ) const
throw (
)
inline

Returns a pointer to the buffer data.

Definition at line 259 of file core.h.

template<typename T>
T* fmt::v5::internal::basic_buffer< T >::end ( )
throw (
)
inline

Definition at line 247 of file core.h.

template<typename T>
virtual void fmt::v5::internal::basic_buffer< T >::grow ( std::size_t  capacity)
protectedpure virtual
template<typename T>
T& fmt::v5::internal::basic_buffer< T >::operator[] ( std::size_t  index)
inline

Definition at line 287 of file core.h.

template<typename T>
const T& fmt::v5::internal::basic_buffer< T >::operator[] ( std::size_t  index) const
inline

Definition at line 288 of file core.h.

template<typename T>
void fmt::v5::internal::basic_buffer< T >::push_back ( const T &  value)
inline

Definition at line 278 of file core.h.

template<typename T>
void fmt::v5::internal::basic_buffer< T >::reserve ( std::size_t  new_capacity)
inline

Reserves space to store at least capacity elements.

Definition at line 273 of file core.h.

template<typename T>
void fmt::v5::internal::basic_buffer< T >::resize ( std::size_t  new_size)
inline

Resizes the buffer. If T is a POD type new elements may not be initialized.

Definition at line 264 of file core.h.

template<typename T>
void fmt::v5::internal::basic_buffer< T >::set ( T *  buf_data,
std::size_t  buf_capacity 
)
throw (
)
inlineprotected

Sets the buffer data and capacity.

Definition at line 232 of file core.h.

template<typename T>
std::size_t fmt::v5::internal::basic_buffer< T >::size ( ) const
throw (
)
inline

Returns the size of this buffer.

Definition at line 250 of file core.h.


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