edelib 2.1.0
Public Types | Protected Member Functions | Protected Attributes | List of all members
EdbusContainer< T > Class Template Reference

Abstract container for D-Bus containers. More...

#include <edelib/EdbusContainer.h>

Public Types

typedef list< T >::iterator iterator
 
typedef list< T >::const_iterator const_iterator
 

Protected Member Functions

void dispose (void)
 
void unhook (void)
 
 EdbusContainer ()
 
 EdbusContainer (const EdbusContainer &other)
 
 ~EdbusContainer ()
 
EdbusContaineroperator= (const EdbusContainer &other)
 

Protected Attributes

EdbusContainerPrivate * impl
 

Detailed Description

template<typename T>
class edelib::EdbusContainer< T >

Abstract container for D-Bus containers.

EdbusContainer is a class for easier creating EdbusDict and EdbusList containers. It uses implicit sharing so all concrete implementations copy internal data only when is needed.

This class should be used as base class so inherited classes can provide additional funcionality.

Inherited classes also must call unhook() member when one of their members is going to write in internal EdbusContainer container.

Member Typedef Documentation

◆ const_iterator

typedef list<T>::const_iterator const_iterator

Const iterator type for container

◆ iterator

typedef list<T>::iterator iterator

Iterator type for container

Constructor & Destructor Documentation

◆ EdbusContainer() [1/2]

EdbusContainer ( )
inlineprotected

Create empty container

◆ EdbusContainer() [2/2]

EdbusContainer ( const EdbusContainer< T > &  other)
inlineprotected

Do a shallow copying from other container

References EdbusContainer< T >::impl.

◆ ~EdbusContainer()

~EdbusContainer ( )
inlineprotected

Decrease reference counter and if reached 0 it will clear allocated data

Member Function Documentation

◆ dispose()

void dispose ( void  )
inlineprotected

Clears internal data

◆ operator=()

EdbusContainer & operator= ( const EdbusContainer< T > &  other)
inlineprotected

Do a shallow copying from other container

References EdbusContainer< T >::impl.

◆ unhook()

void unhook ( void  )
inlineprotected

Do actual copying. Referece counter is set to 1. This function must be called when inherited implementations do write or change internal data

References E_ASSERT.

Member Data Documentation

◆ impl

EdbusContainerPrivate* impl
protected

Allows access to the private data by inherited classes

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


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