MidgardSchemaObjectTree

MidgardSchemaObjectTree

Synopsis

#include <midgard/midgard.h>

struct              MidgardSchemaObjectTree;
struct              MidgardSchemaObjectTreeClass;
gboolean            midgard_schema_object_tree_is_in_tree
                                                        (MidgardObject *object,
                                                         MidgardObject *parent_object);
const gchar *       midgard_schema_object_tree_get_parent_name
                                                        (MidgardObject *object);
MidgardObject *     midgard_schema_object_tree_get_parent_object
                                                        (MidgardObject *object);
MidgardObject **    midgard_schema_object_tree_list_objects
                                                        (MidgardObject *object,
                                                         guint *n_objects);
MidgardObject **    midgard_schema_object_tree_list_children_objects
                                                        (MidgardObject *object,
                                                         const gchar *classname,
                                                         guint *n_objects);

Description

Details

struct MidgardSchemaObjectTree

struct MidgardSchemaObjectTree {
	GObject parent;
};


struct MidgardSchemaObjectTreeClass

struct MidgardSchemaObjectTreeClass {
	GObjectClass parent;
};


midgard_schema_object_tree_is_in_tree ()

gboolean            midgard_schema_object_tree_is_in_tree
                                                        (MidgardObject *object,
                                                         MidgardObject *parent_object);

object :

MidgardObject instance to check existance in tree

parent_object :

parent MidgardObject instance

Returns :

TRUE, if given object exists under parent_object in tree. FALSE otherwise.

Since 10.05


midgard_schema_object_tree_get_parent_name ()

const gchar *       midgard_schema_object_tree_get_parent_name
                                                        (MidgardObject *object);

object :

MidgardObject instance

Returns :

classname which, in tree is a parent one for given object. [transfer none]

Since 10.05


midgard_schema_object_tree_get_parent_object ()

MidgardObject *     midgard_schema_object_tree_get_parent_object
                                                        (MidgardObject *object);

Get tree parent object, of the given object.

object :

MidgardObject instance

Returns :

parent object or NULL. [transfer full]

Since 10.05


midgard_schema_object_tree_list_objects ()

MidgardObject **    midgard_schema_object_tree_list_objects
                                                        (MidgardObject *object,
                                                         guint *n_objects);

List tree children objects, of given object type.

object :

MidgardObject instance

n_objects :

pointer to store number of returned objects. [out]

Returns :

newly allocated array of MidgardObject objects. [array length=n_objects][transfer full]

Since 10.05


midgard_schema_object_tree_list_children_objects ()

MidgardObject **    midgard_schema_object_tree_list_children_objects
                                                        (MidgardObject *object,
                                                         const gchar *classname,
                                                         guint *n_objects);

List all classname objects, if exist and are tree children of given object.

object :

MidgardObject instance

classname :

name of the tree child class

n_objects :

pointer to store number of returned objects. [out]

Returns :

array of MidgardObject objects, or NULL. [array length=n_objects][transfer full]

Since 10.05