CollectionParent


Object Hierarchy:

GXml.CollectionParent GXml.CollectionParent GXml.CollectionParent GLib.Object GLib.Object GLib.Object->GXml.CollectionParent GXml.Collection GXml.Collection GXml.Collection->GXml.CollectionParent

Description:


public interface CollectionParent : Object, Collection

Collection to manage child GXml.DomElement objects mapped to different classes, derived or child type of Collection.items_type

A collection using Collection.items_type as a common parent GLib.Type of a set of instantiatable GLib.Type.

In the next example, is possible to setup a class for Top element, having a GXml.CollectionParent implementation class, supporting reading any kind of derived classes from the Collection.items_type; for the example, Time, Goal and Reque are implementations of, say, Child interface, so they will be added to the collection and deserialized as an instance of the object, based in the node's name.

<Top>
<Time/>
<Goal/>
<Resque/>

Implementators, should override types property setting up a hash table and use add_supported_type or add_supported_types to add one or a set of types to be supported. types is used by GXml.Parser to detect the types suuported in a collection to create the corresponding objects of the currect instantiable GLib.Type at runtime, adding them to the collection, corresponding to the element's tag's name.


Namespace: GXml
Package: gxml-0.20

Content:

Properties:

Static methods:

Inherited Members:

All known members inherited from class GLib.Object
All known members inherited from interface GXml.Collection



2022 vala-language.org