Re: GObject Serialization



On Tue, Jan 04, 2005 at 02:19:08PM +0100, Stefan Kost wrote:
> 
> And for part two I will define types that holds a pointer to a collection, so
> that I can use g_param_spec_object / instead of g_param_spec_pointer or
> something like that.

We took a different tack for that and defined an interface

typedef struct {
	GTypeInterface base;

	gboolean (*dom_load) (GogPersist *gp, xmlNode *node);
	void     (*dom_save) (GogPersist const *gp, xmlNode *parent);
} GogPersistClass;
Then used g_param_spec_object and tested the containee to see if it
implemented the interface.



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