[Vala] Personal iterable, collection, list classes
- From: Alessandro Pellizzari <alex amiran it>
- To: Vala ML <vala-list gnome org>
- Subject: [Vala] Personal iterable, collection, list classes
- Date: Mon, 18 Aug 2008 18:28:42 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]