vala r1797 - in trunk: . vala



Author: juergbi
Date: Sat Sep 27 09:12:16 2008
New Revision: 1797
URL: http://svn.gnome.org/viewvc/vala?rev=1797&view=rev

Log:
2008-09-27  JÃrg Billeter  <j bitron ch>

	* vala/valaclass.vala:
	* vala/valainterface.vala:
	* vala/valastruct.vala:

	Add accessors for nested types, patch by Florian Brosch,
	fixes bug 552958


Modified:
   trunk/ChangeLog
   trunk/vala/valaclass.vala
   trunk/vala/valainterface.vala
   trunk/vala/valastruct.vala

Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala	(original)
+++ trunk/vala/valaclass.vala	Sat Sep 27 09:12:16 2008
@@ -121,6 +121,42 @@
 	private Gee.List<Delegate> delegates = new ArrayList<Delegate> ();
 
 	/**
+	 * Returns a copy of the list of classes.
+	 *
+	 * @return list of classes
+	 */
+	public Gee.List<Class> get_classes () {
+		return new ReadOnlyList<Class> (classes);
+	}
+
+	/**
+	 * Returns a copy of the list of structs.
+	 *
+	 * @return list of structs
+	 */
+	public Gee.List<Struct> get_structs () {
+		return new ReadOnlyList<Struct> (structs);
+	}
+
+	/**
+	 * Returns a copy of the list of enums.
+	 *
+	 * @return list of enums
+	 */
+	public Gee.List<Enum> get_enums () {
+		return new ReadOnlyList<Enum> (enums);
+	}
+
+	/**
+	 * Returns a copy of the list of delegates.
+	 *
+	 * @return list of delegates
+	 */
+	public Gee.List<Delegate> get_delegates () {
+		return new ReadOnlyList<Delegate> (delegates);
+	}
+
+	/**
 	 * Specifies the default construction method.
 	 */
 	public Method default_construction_method { get; set; }
@@ -248,7 +284,16 @@
 	public Gee.List<Field> get_fields () {
 		return new ReadOnlyList<Field> (fields);
 	}
-	
+
+	/**
+	 * Returns a copy of the list of constants.
+	 *
+	 * @return list of constants
+	 */
+	public Gee.List<Constant> get_constants () {
+		return new ReadOnlyList<Constant> (constants);
+	}
+
 	/**
 	 * Adds the specified method as a member to this class.
 	 *

Modified: trunk/vala/valainterface.vala
==============================================================================
--- trunk/vala/valainterface.vala	(original)
+++ trunk/vala/valainterface.vala	Sat Sep 27 09:12:16 2008
@@ -52,7 +52,43 @@
 	private string lower_case_csuffix;
 	private string type_cname;
 	private string type_id;
-	
+
+	/**
+	 * Returns a copy of the list of classes.
+	 *
+	 * @return list of classes
+	 */
+	public Gee.List<Class> get_classes () {
+		return new ReadOnlyList<Class> (classes);
+	}
+
+	/**
+	 * Returns a copy of the list of structs.
+	 *
+	 * @return list of structs
+	 */
+	public Gee.List<Struct> get_structs () {
+		return new ReadOnlyList<Struct> (structs);
+	}
+
+	/**
+	 * Returns a copy of the list of enums.
+	 *
+	 * @return list of enums
+	 */
+	public Gee.List<Enum> get_enums () {
+		return new ReadOnlyList<Enum> (enums);
+	}
+
+	/**
+	 * Returns a copy of the list of delegates.
+	 *
+	 * @return list of delegates
+	 */
+	public Gee.List<Delegate> get_delegates () {
+		return new ReadOnlyList<Delegate> (delegates);
+	}
+
 	/**
 	 * Creates a new interface.
 	 *

Modified: trunk/vala/valastruct.vala
==============================================================================
--- trunk/vala/valastruct.vala	(original)
+++ trunk/vala/valastruct.vala	Sat Sep 27 09:12:16 2008
@@ -117,7 +117,16 @@
 	public Gee.List<Field> get_fields () {
 		return new ReadOnlyList<Field> (fields);
 	}
-	
+
+	/**
+	 * Returns a copy of the list of constants.
+	 *
+	 * @return list of constants
+	 */
+	public Gee.List<Constant> get_constants () {
+		return new ReadOnlyList<Constant> (constants);
+	}
+
 	/**
 	 * Adds the specified method as a member to this struct.
 	 *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]