gstreamermm
1.10.0
|
The base class for classes that retrieve multiple elements in a thread safe way. More...
#include <gstreamermm/iterator.h>
Public Member Functions | |
virtual IteratorResult | next () |
Moves to the next iterator item. More... | |
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... | |
Protected Member Functions | |
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... | |
The base class for classes that retrieve multiple elements in a thread safe way.
Classes derived from Gst::IteratorBase are used to retrieve multiple objects from another object in a thread safe way. They are implemented as C++ like input iterators so they do not support multi-passing, but they are usable enough for iterating through a list of items and referencing them in a single pass.
Various GStreamer objects provide access to their internal structures using an iterator.
|
virtual |
Frees the underlying C instance if a take_ownership value of true was used to wrap it.
|
protected |
Default constructor.
|
protected |
Copy constructor.
Please note that copying and assigning merely shares the underlying C object. Operations on the copy are also performed in the underlying C object of the original and if the original is destroyed, the copy is invalid.
|
explicitprotected |
Constructs an IteratorBase from an underlying C object.
castitem | The underlying C object. |
take_ownership | Whether to take over the underlying C object. If true, C object is freed when wrapper is destroyed. |
|
inline |
Provides access to the underlying C GObject.
|
inline |
Provides access to the underlying C GObject.
bool Gst::IteratorBase< CppType >::is_end | ( | ) | const |
Tells if the iterator is at the end of the list (just after the last element).
bool Gst::IteratorBase< CppType >::is_start | ( | ) | const |
Tells if the iterator is at the start of the list (not on the first item, but just before it).
Increment the iterator or use Gst::IteratorBasic::begin() to go to the first item.
|
virtual |
Moves to the next iterator item.
Reimplemented in Gst::Iterator< CppType >.
Gst::IteratorBase< CppType >::operator bool | ( | ) | const |
Tells whether the iterator is valid and can be dereferenced.
|
protected |
Assignment operator.
It replaces the contents of the iterator with the contents of the new one freeing the underlying C object if a take_ownership value of true was used when wrapping it. Please note that copying and assigning merely shares the underlying C object. Operations on the copy are also performed in the underlying C object of the original and if the original is destroyed, the copy is invalid.
void Gst::IteratorBase< CppType >::resync | ( | ) |
Resynchronize the iterator.
This function is mostly called after next() returns Gst::ITERATOR_RESYNC. A result of Gst::ITERATOR_RESYNC from next() means that a concurrent update was made to the iterator list during iteration and the iterator needs to be resynchronized before continuing. Use this function to resynchronize.