BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Public Member Functions | Protected Member Functions
BeeeOn::GlibPtr< T > Class Template Reference

The class is used to store the references to objects from the GLib library. It is also responsible for automatically freeing of memory. More...

#include <GlibPtr.h>

Public Member Functions

 GlibPtr (T *ptr)
 
 GlibPtr (const GlibPtr &ptr)
 
 GlibPtr (GlibPtr &&ptr)
 
GlibPtroperator= (T *ptr)
 
GlibPtroperator= (const GlibPtr &ptr)
 
GlibPtroperator= (GlibPtr &&ptr)
 
T * operator-> ()
 
const T * operator-> () const
 
T & operator* ()
 
const T & operator* () const
 
T * raw ()
 
const T * raw () const
 
T ** operator& ()
 Returns reference of the m_ptr attribute. More...
 
const T ** operator& () const
 Returns reference of the m_ptr attribute.
 
bool operator! () const
 
bool isNull () const
 

Protected Member Functions

void release ()
 
void assign (T *ptr)
 
template<>
void release ()
 
template<>
void assign (GMainLoop *ptr)
 
template<>
void release ()
 
template<>
void assign (GError *ptr)
 
template<>
void release ()
 
template<>
void assign (GList *ptr)
 
template<>
void release ()
 
template<>
void assign (GVariant *ptr)
 

Detailed Description

template<typename T>
class BeeeOn::GlibPtr< T >

The class is used to store the references to objects from the GLib library. It is also responsible for automatically freeing of memory.

In specialization for GList are used g_object_ref and g_object_unref for its items.

Member Function Documentation

template<typename T >
T ** BeeeOn::GlibPtr< T >::operator& ( )

Returns reference of the m_ptr attribute.

Exceptions
IllegalStateExceptionin case m_ptr is not null

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