Best code practice for new objects



Hi,

trying to adopt the 'best' way to implement my own GObject based
objects, it turns out that there is more than one way to do it.

My idea is to use g_type_class_add_private() and write set/get
public methods in the class structure for every public property,
but this will leave the instance structure as:

struct _MyInstance
{
  MyParent *parent;
};

for every object, and this sounds me quite weird.

Is this a common approach?
Is there an official/preferred/best way to do this?

Thank you
-- 
Nicola



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