# Gst::IteratorBasic<CppType> Class Template Reference

Gst::IteratorBasic - Class that retrieves multiple elements in a thread safe way. More...

`#include <iterator.h>`

Inheritance diagram for Gst::IteratorBasic< CppType >:

List of all members.

## Public Member Functions
| IteratorBasic ()
| Default constructor.
| IteratorBasic (GstIterator* castitem, bool take_ownership=true)
| Creates a Gst::IteratorBasic wrapper for a GstIterator object.
void | begin ()
| Resynchronizes the iterator and moves the iterator to the first item.
CppType | operator* () const
| Dereferences the iterator and obtains the underlying object.
CppType* | operator-> () const
| Accesses underlying object member through the iterator.
IteratorBasic<CppType>& | operator++ ()
| Prefix auto-increment operator.
IteratorBasic<CppType> | operator++ (int)
| Postfix auto-increment operator.

## Detailed Description

### template <class CppType>
class Gst::IteratorBasic< CppType >

Gst::IteratorBasic - Class that retrieves multiple elements in a thread safe way.

Gst::IteratorBasic iterates specifically through elements that are not reference counted. Gst::Iterator is used for iterating through reference counted objects.

## Constructor& Destructor Documentation

template <class CppType>

Gst::IteratorBasic<CppType>::IteratorBasic | ( |  | ) |

Default constructor.

template <class CppType>

Gst::IteratorBasic<CppType>::IteratorBasic | ( | GstIterator * | castitem,
|  | bool | take_ownership = `true` |
| ) |  |  |

Creates a Gst::IteratorBasic wrapper for a GstIterator object.

The underlying castitem will be freed with the Gst::IteratorBasic destruction if a take_ownership value of true is given.

Parameters:

  | castitem | The C instance to wrap.
  | take_ownership | Whether to take over the underlying C object. If true, C object is freed when wrapper is destroyed.

## Member Function Documentation

template <class CppType>

void Gst::IteratorBasic<CppType>::begin | ( |  | ) |

Resynchronizes the iterator and moves the iterator to the first item.

Exceptions:

  | std::runtime_error | (if a Gst::ITERATOR_ERROR is encountered or if a concurrent update to the iterator occurs while it is advanced to the first element).

template <class CppType>

CppType Gst::IteratorBasic<CppType>::operator* | ( |  | ) | const

Dereferences the iterator and obtains the underlying object.

Reimplemented in Gst::Iterator<CppType>.

template <class CppType>

IteratorBasic<CppType> Gst::IteratorBasic<CppType>::operator++ | ( | int |  | ) |

Postfix auto-increment operator.

It advances to the next item in the iterator.

Exceptions:

  | std::runtime_error | (if a Gst::ITERATOR_ERROR is encountered or if a concurrent update to the iterator occurs while it iterates).

Reimplemented in Gst::Iterator<CppType>.

template <class CppType>

IteratorBasic<CppType>& Gst::IteratorBasic<CppType>::operator++ | ( |  | ) |

Prefix auto-increment operator.

It advances to the next item in the iterator. It is faster than the postfix operator.

Exceptions:

  | std::runtime_error | (if a Gst::ITERATOR_ERROR is encountered or if a concurrent update to the iterator occurs while it iterates).

Reimplemented in Gst::Iterator<CppType>.

template <class CppType>

CppType* Gst::IteratorBasic<CppType>::operator-> | ( |  | ) | const

Accesses underlying object member through the iterator.

Reimplemented in Gst::Iterator<CppType>.

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

- iterator.h