Re: [Tracker] REVIEW: external-crawler branch, part2
- From: Philip Van Hoof <philip codeminded be>
- To: Philip Van Hoof <philip codeminded be>, Tracker mailing list <tracker-list gnome org>, Martyn Russell <martyn lanedo com>
- Subject: Re: [Tracker] REVIEW: external-crawler branch, part2
- Date: Fri, 08 Aug 2014 10:09:06 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
87c30cc73629ff54ff8e5170ded499c2cbbda61a
About TrackerEnumeratorIface:
In my opinion an enumerator has a Next() method to enumerate to the
next element. I think it's a bit wierd to return a linked list on
Start() of the enumerator API.
You can find examples of enumerators in Gee, Java (called Iterator
there), .NET and also in libtracker-sparql, in boost for C++, etc.
I think in GIO you also have Enumerators that work like this, and in
GVariant Ryan also has enumerator APIs that work this way.
I think TrackerEnumerator should be renamed if the API doesn't work
with a Next() call like how all other enumerator APIs in the world work.
Note that in a typical enumerator design the Start method comes from
the thing that is enumerable.
Enumerable thingThatHasItems = new List();
Enumerable e = thingThatHasItems.Enumerate();
Value v;
while (e.Next(&v))
{
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (MingW32)
iQEcBAEBAgAGBQJT5IWiAAoJEEP2NSGEz4aDAaQIAJe+2bwrPHood8n2GHcPtZRp
p1kFw6sn37QHaEgrpUZnFxS56ERlr0txCqoD3M3TWEl/SWi39MiGDlStaXObi48I
WZiVWal0+a+TQQtnijDGzcmDAgxXH0mJaGrfhFdkqQbJoJUqyPWuqjN9dXjraJDB
SvpjmNd0UsfIu+MMdsKai3i6McQ5BZEPUpN2NupL0C2PfWExAV/bC5FTA1xUuoHL
MV9qJfQtE/YxteItu9d5K1YrQiaV2fv9w1U84NSyTa+NN4m7PhWYwzT+TFZKRuR+
uLFS/Y+/Sm2RHK9CXLO8hjqc2KxWiBhcJI2niCfXi4B7ZneK2gOOWuZ/vEtRKbY=
=vmja
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]