[Zeitgeist-bugs] [Bug 53662] New: Add foreach support for libzeitgeist2's SimpleResultSet
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Aug 17 16:04:27 PDT 2012
https://bugs.freedesktop.org/show_bug.cgi?id=53662
Bug #: 53662
Summary: Add foreach support for libzeitgeist2's
SimpleResultSet
Classification: Unclassified
Product: Zeitgeist
Version: 0.9.x
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Engine
AssignedTo: zeitgeist-bugs at lists.freedesktop.org
ReportedBy: seif at lotfy.com
QAContact: zeitgeist-bugs at lists.freedesktop.org
We only need to implement three things
The collection class needs to implement an iterator() method that returns an
object capable of iterating over your collection
The iterator object needs to provide two methods:
* bool next()
* T get () where T is your element type
---
vala will translate the foreach to something like
var iter = yourcollection.iterator ();
while (iter.next ()) {
var element = iter.get ();
... your foreach loop body ...
}
if the collection class supports that, it should work with foreach
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the Zeitgeist-bugs
mailing list