glibmm 2.56.0

Public Types | Public Member Functions | List of all members
Glib::SListHandle< T, Tr > Class Template Reference
Generic container converters

This is an intermediate type. More...

`#include <glibmm/slisthandle.h>`

## Public Types
using | CppType = typename Tr::CppType
using | CType = typename Tr::CType
using | value_type = CppType
using | size_type = std::size_t
using | difference_type = std::ptrdiff_t
using | const_iterator = Glib::Container_Helpers::SListHandleIterator< Tr >
using | iterator = Glib::Container_Helpers::SListHandleIterator< Tr >

## Public Member Functions
template<class Cont >
| SListHandle (const Cont& container)
| SListHandle (GSList* glist, Glib::OwnershipType ownership)
| SListHandle (const SListHandle< T, Tr >& other)
| ~SListHandle () noexcept
const_iterator | begin () const
const_iterator | end () const
template<class U >
| operator std::vector< U > () const
template<class U >
| operator std::deque< U > () const
template<class U >
| operator std::list< U > () const
template<class Cont >
void | assign_to (Cont& container) const
template<class Out >
void | copy (Out pdest) const
GSList* | data () const
std::size_t | size () const
bool | empty () const

## Detailed Description

### template<class T, class Tr = Glib::Container_Helpers::TypeTraits<T>>
class Glib::SListHandle< T, Tr >

This is an intermediate type.

When a method takes this, or returns this, you should use a standard C++ container of your choice, such as std::list or std::vector.

However, this is not used in new API. We now prefer to just use std::vector, which is less flexibile, but makes the API clearer.

## Member Typedef Documentation

## ◆ const_iterator

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::const_iterator = Glib::Container_Helpers::SListHandleIterator<Tr>

## ◆ CppType

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::CppType = typename Tr::CppType

## ◆ CType

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::CType = typename Tr::CType

## ◆ difference_type

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::difference_type = std::ptrdiff_t

## ◆ iterator

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::iterator = Glib::Container_Helpers::SListHandleIterator<Tr>

## ◆ size_type

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::size_type = std::size_t

## ◆ value_type

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

using Glib::SListHandle< T, Tr >::value_type = CppType

## Constructor & Destructor Documentation

## ◆ SListHandle() [1/3]

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class Cont >

Glib::SListHandle< T, Tr >::SListHandle | ( | const Cont & | container | ) |
| inline

## ◆ SListHandle() [2/3]

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

Glib::SListHandle< T, Tr >::SListHandle | ( | GSList * | glist,
|  | Glib::OwnershipType | ownership
| ) |  |
| inline

## ◆ SListHandle() [3/3]

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

Glib::SListHandle< T, Tr >::SListHandle | ( | const SListHandle< T, Tr >& | other | ) |
| inline

## ◆ ~SListHandle()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

Glib::SListHandle< T, Tr >::~SListHandle | ( |  | ) |
| noexcept

## Member Function Documentation

## ◆ assign_to()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class Cont >

void Glib::SListHandle< T, Tr >::assign_to | ( | Cont & | container | ) | const
| inline

## ◆ begin()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

const_iterator Glib::SListHandle< T, Tr >::begin | ( |  | ) | const
| inline

## ◆ copy()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class Out >

void Glib::SListHandle< T, Tr >::copy | ( | Out | pdest | ) | const
| inline

## ◆ data()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

GSList* Glib::SListHandle< T, Tr >::data | ( |  | ) | const
| inline

## ◆ empty()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

bool Glib::SListHandle< T, Tr >::empty | ( |  | ) | const
| inline

## ◆ end()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

const_iterator Glib::SListHandle< T, Tr >::end | ( |  | ) | const
| inline

## ◆ operator std::deque< U >()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class U >

Glib::SListHandle< T, Tr >::operator std::deque< U > | ( |  | ) | const
| inline

## ◆ operator std::list< U >()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class U >

Glib::SListHandle< T, Tr >::operator std::list< U > | ( |  | ) | const
| inline

## ◆ operator std::vector< U >()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>
template <class U >

Glib::SListHandle< T, Tr >::operator std::vector< U > | ( |  | ) | const
| inline

## ◆ size()

template <class T , class Tr = Glib::Container_Helpers::TypeTraits<T>>

std::size_t Glib::SListHandle< T, Tr >::size | ( |  | ) | const
| inline