#include <filter.h>
Public Types | |
typedef sigc::slot< bool, const Glib::RefPtr <Glib::Object >&> | SlotFilter |
For example, bool on_filter(const Glib::RefPtr<Glib::Object>& object);. | |
Static Public Member Functions | |
static Glib::ListHandle <Glib::RefPtr<Glib::Object>> | run (const Glib::ListHandle<Glib::RefPtr<Glib::Object>>& list, const SlotFilter& slot, bool first) |
Iterates over the elements in the list, calling the slot with each object. |
typedef sigc::slot<bool, const Glib::RefPtr<Glib::Object>& > Gst::Filter::SlotFilter |
For example, bool on_filter(const Glib::RefPtr<Glib::Object>& object);.
The filter function should return true if object is a match, false otherwise.
static Glib::ListHandle< Glib::RefPtr<Glib::Object> > Gst::Filter::run | ( | const Glib::ListHandle< Glib::RefPtr< Glib::Object > > & | list, | |
const SlotFilter& | slot, | |||
bool | first | |||
) | [static] |
Iterates over the elements in the list, calling the slot with each object.
If the slot returns true, the object is prepended to the list of results returned. If first is true, the search is halted after the first result is found.
list | A list of objects. | |
slot | The slot to execute for each item. | |
first | Flag to stop execution after a successful item. |