gstreamermm: Gst::Iterator< CppType > Class Template Reference

gstreamermm 1.4.3

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Gst::Iterator< CppType > Class Template Reference

A class used to retrieve multiple reference counted elements in a thread safe way. More...

Inheritance diagram for Gst::Iterator< CppType >:
[legend]
Collaboration diagram for Gst::Iterator< CppType >:
[legend]

## Public Member Functions
| Iterator ()
| Default constructor. More...
| Iterator (GstIterator* castitem, bool take_ownership=true)
| Creates a Gst::Iterator wrapper for a GstIterator object. More...
IteratorResult | next ()
| Moves to the next iterator item. More...
Glib::RefPtr< CppType > | operator* () const
| Dereferences the iterator and obtains the underlying Glib::RefPtr<>. More...
CppType* | operator-> () const
| Accesses underlying object member through the RefPtr<>. More...
Iterator< CppType >& | operator++ ()
| Prefix auto-increment operator. More...
Iterator< CppType > | operator++ (int)
| Postfix auto-increment operator. More...
Public Member Functions inherited from Gst::IteratorBasic< CppType >
| IteratorBasic ()
| Default constructor. More...
| IteratorBasic (GstIterator* castitem, bool take_ownership=true)
| Creates a Gst::IteratorBasic wrapper for a GstIterator object. More...
void | begin ()
| Resynchronizes the iterator and moves the iterator to the first item. More...
CppType | operator* () const
| Dereferences the iterator and obtains the underlying object. More...
CppType* | operator-> () const
| Accesses underlying object member through the iterator. More...
IteratorBasic< CppType >& | operator++ ()
| Prefix auto-increment operator. More...
IteratorBasic< CppType > | operator++ (int)
| Postfix auto-increment operator. More...
Public Member Functions inherited from Gst::IteratorBase< CppType >
void | resync ()
| Resynchronize the iterator. More...
bool | is_start () const
| Tells if the iterator is at the start of the list (not on the first item, but just before it). More...
bool | is_end () const
| Tells if the iterator is at the end of the list (just after the last element). More...
| operator bool () const
| Tells whether the iterator is valid and can be dereferenced. More...
GstIterator* | cobj ()
| Provides access to the underlying C GObject. More...
const GstIterator* | cobj () const
| Provides access to the underlying C GObject. More...
virtual | ~IteratorBase ()
| Frees the underlying C instance if a take_ownership value of true was used to wrap it. More...

## Additional Inherited Members
Protected Member Functions inherited from Gst::IteratorBase< CppType >
| IteratorBase ()
| Default constructor. More...
| IteratorBase (const IteratorBase< CppType >&)
| Copy constructor. More...
| IteratorBase (GstIterator* castitem, bool take_ownership=true)
| Constructs an IteratorBase from an underlying C object. More...
IteratorBase< CppType >& | operator= (const IteratorBase< CppType >& other)
| Assignment operator. More...

## Detailed Description

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

A class used to retrieve multiple reference counted elements in a thread safe way.

Gst::Iterator iterates specifically through elements that are reference counted and therefore dereferencing the elements of the iterator yields a Glib::RefPtr<> to the C++ element type.

## Constructor & Destructor Documentation

template <class CppType >

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

Default constructor.

template <class CppType >

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

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

The underlying castitem will be freed with the Gst::Iterator 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 >

IteratorResult Gst::Iterator< CppType >::next | ( |  | ) |
| virtual

Moves to the next iterator item.

Returns
  The result of the iteration. MT safe.

Reimplemented from Gst::IteratorBase< CppType >.

template <class CppType >

Glib::RefPtr<CppType> Gst::Iterator< CppType >::operator* | ( |  | ) | const

Dereferences the iterator and obtains the underlying Glib::RefPtr<>.

template <class CppType >

Iterator<CppType>& Gst::Iterator< 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).

template <class CppType >

Iterator<CppType> Gst::Iterator< 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).

template <class CppType >

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

Accesses underlying object member through the RefPtr<>.

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

- gstreamermm/bin.h
- gstreamermm/iterator.h