Re: [Vala] Personal iterable, collection, list classes
- From: gege2061 <gege2061 redaction-developpez com>
- To: "Alessandro Pellizzari" <alex amiran it>
- Cc: Vala ML <vala-list gnome org>
- Subject: Re: [Vala] Personal iterable, collection, list classes
- Date: Mon, 18 Aug 2008 18:38:26 +0200
Hi,
You should implement Gee.Iterable interface.
2008/8/18 Alessandro Pellizzari
<alex amiran it>
Hi all,
I would like to create a couple of classes and use them as collections.
For example:
public class MyList()
{
protected List<MyObject> objects = new ArrayList<MyObject>;
...
}
public class MyObject()
{
protected string mydata;
}
And I would like to code like this:
var l = new MyList();
l.populate(blah blah);
foreach(MyObject o in l) {
printf(o.getData());
}
First of all: is it possible?
And, if yes, how? :)
What classes/interfaces should I inherit from?
Thank you very much.
--
Alessandro Pellizzari
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
--
Nicolas Joseph
Responsable de la rubrique GTK+ de
developpez.com /
In charge of the GTK+ section on
developpez.com
http://nicolasj.developpez.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]