Commit 0af5811b authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

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

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

svn path=/trunk/; revision=1797
parent fedc043a
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
2008-09-27 Jürg Billeter <j@bitron.ch>
* vapi/glib-2.0.vapi:
......
......@@ -120,6 +120,42 @@ public class Vala.Class : ObjectTypeSymbol {
private Gee.List<Enum> enums = new ArrayList<Enum> ();
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.
*/
......@@ -248,7 +284,16 @@ public class Vala.Class : ObjectTypeSymbol {
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.
*
......
......@@ -52,7 +52,43 @@ public class Vala.Interface : ObjectTypeSymbol {
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.
*
......
......@@ -117,7 +117,16 @@ public class Vala.Struct : TypeSymbol {
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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment