Midgard Schema


Data Structures

struct  _MidgardSchema
struct  _MidgardSchemaClass

Functions

void midgard_schema_init (MidgardSchema *self)
gboolean midgard_schema_read_dir (MidgardSchema *self, const gchar *dirname)
gboolean midgard_schema_type_exists (MidgardSchema *self, const gchar *classname)
void midgard_schema_read_file (MidgardSchema *self, const gchar *filename)
GHashTable * midgard_schema_lookup_type_member (MidgardSchema *schema, const gchar *typename, gchar *property)

Function Documentation

void midgard_schema_init MidgardSchema self  ) 
 

Initializes basic Midgard classes

Parameters:
self MidgardSchema struct
Initializes global schema from global MgdObjects.xml schema file. This function registers only basic classes.

Caller is responsible to free allocated memory using midgard_schema_destroy. The memory is not freed for MidgardSchema object itslef. It is freed for all internal schema structures allocated for this object instance.

Definition at line 1132 of file mgdschema.c.

References midgard_schema_read_file().

Here is the call graph for this function:

gboolean midgard_schema_read_dir MidgardSchema self,
const gchar *  dirname
 

Initializes classes from schema files.

Parameters:
self MidgardSchema struct
dirname full directory path
Initializes classes which are defined in all schema files located under dirname directory. All registered classes are "appended" to self MidgardSchema structure.

Returns:
TRUE when dirname directory was read and xml schema files was parsed, FALSE otherwise.

Definition at line 1167 of file mgdschema.c.

References midgard_schema_read_file().

Here is the call graph for this function:

void midgard_schema_read_file MidgardSchema self,
const gchar *  filename
 

Initializes classes from file

Parameters:
self MidgardSchema struct
filename name of the file to parse
Filename is not limited to any directory name, and should be absolute path.

Definition at line 1150 of file mgdschema.c.

References _MidgardSchema::types.

Referenced by midgard_schema_init(), and midgard_schema_read_dir().

gboolean midgard_schema_type_exists MidgardSchema self,
const gchar *  classname
 

Checks if classname exists in schema.

Parameters:
self MidgardSchema struct Name of the class
Returns:
TRUE if classname is registered for schema, FALSE otherwise.

Definition at line 1139 of file mgdschema.c.

References _MidgardSchema::types.


Generated on Thu Feb 22 06:15:21 2007 for midgard-core by  doxygen 1.4.6