Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
SharedBuffer< T > Class Template Reference

#include <pointer.h>

Public Member Functions

 SharedBuffer ()
 
 SharedBuffer (unsigned int size)
 
 SharedBuffer (const SharedBuffer &buffer)
 
SharedBufferoperator= (const SharedBuffer &buffer)
 
 SharedBuffer (const T *t, unsigned int size)
 
 SharedBuffer (const Buffer< T > &buffer)
 
 ~SharedBuffer ()
 
T & operator[] (unsigned int i) const
 
T * operator* () const
 
unsigned int getSize () const
 
 operator Buffer< T > () const
 

Private Member Functions

void drop ()
 

Private Attributes

T * data
 
unsigned int m_size
 
unsigned int * refcount
 

Constructor & Destructor Documentation

◆ SharedBuffer() [1/5]

◆ SharedBuffer() [2/5]

template<typename T >
SharedBuffer< T >::SharedBuffer ( unsigned int size)
inline

◆ SharedBuffer() [3/5]

template<typename T >
SharedBuffer< T >::SharedBuffer ( const SharedBuffer< T > & buffer)
inline

◆ SharedBuffer() [4/5]

template<typename T >
SharedBuffer< T >::SharedBuffer ( const T * t,
unsigned int size )
inline

◆ SharedBuffer() [5/5]

template<typename T >
SharedBuffer< T >::SharedBuffer ( const Buffer< T > & buffer)
inline

References SharedBuffer< T >::data, Buffer< T >::getSize(), SharedBuffer< T >::m_size, and SharedBuffer< T >::refcount.

+ Here is the call graph for this function:

◆ ~SharedBuffer()

template<typename T >
SharedBuffer< T >::~SharedBuffer ( )
inline

References SharedBuffer< T >::drop().

+ Here is the call graph for this function:

Member Function Documentation

◆ drop()

template<typename T >
void SharedBuffer< T >::drop ( )
inlineprivate

References SharedBuffer< T >::data, and SharedBuffer< T >::refcount.

Referenced by SharedBuffer< T >::~SharedBuffer(), and SharedBuffer< T >::operator=().

+ Here is the caller graph for this function:

◆ getSize()

◆ operator Buffer< T >()

template<typename T >
SharedBuffer< T >::operator Buffer< T > ( ) const
inline

◆ operator*()

template<typename T >
T * SharedBuffer< T >::operator* ( ) const
inline

◆ operator=()

template<typename T >
SharedBuffer & SharedBuffer< T >::operator= ( const SharedBuffer< T > & buffer)
inline

References SharedBuffer< T >::data, SharedBuffer< T >::drop(), SharedBuffer< T >::m_size, and SharedBuffer< T >::refcount.

+ Here is the call graph for this function:

◆ operator[]()

template<typename T >
T & SharedBuffer< T >::operator[] ( unsigned int i) const
inline

Member Data Documentation

◆ data

◆ m_size

◆ refcount


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