gstreamermm: Gst::IteratorBase< CppType > Class Template Reference
The base class for classes that retrieve multiple elements in a thread safe way. More...

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... | |
Detailed Description
template<class CppType>
class Gst::IteratorBase< CppType >
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.
Constructor & Destructor Documentation
|
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.
- Parameters
-
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.
Member Function Documentation
|
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).
- Returns
- true if the iterator is at the end of the list, false otherwise.
| 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.
- Returns
- true if the iterator is at the start of the list, false otherwise.
|
virtual |
Moves to the next iterator item.
- Returns
- The result of the iteration. MT safe.
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.
The documentation for this class was generated from the following file:
- gstreamermm/iterator.h
